This commit is contained in:
hashbro
2026-08-24 06:23:07 +08:00
parent c00396dc1f
commit db574cc629
114 changed files with 108297 additions and 266 deletions
+11
View File
@@ -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);