feat: ds
This commit is contained in:
@@ -8,9 +8,14 @@ class PageVisit extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
public const CHAIN_CORUNA = 0;
|
||||
|
||||
public const CHAIN_DARKSWORD = 1;
|
||||
|
||||
protected $fillable = [
|
||||
'channel_id',
|
||||
'client_uid',
|
||||
'chain',
|
||||
'session_id',
|
||||
'user_agent',
|
||||
'os',
|
||||
@@ -26,10 +31,16 @@ class PageVisit extends Model
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'chain' => 'integer',
|
||||
'created_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public static function chainLabel(int $chain): string
|
||||
{
|
||||
return $chain === self::CHAIN_DARKSWORD ? 'DarkSword' : 'Coruna';
|
||||
}
|
||||
|
||||
public static function normalizeDomain(?string $value): ?string
|
||||
{
|
||||
$value = trim((string) $value);
|
||||
|
||||
Reference in New Issue
Block a user