Initial commit: Animexe Laravel platform
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Analytics;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\User;
|
||||
use App\Models\Anime;
|
||||
|
||||
class PageView extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'analytics_pageviews';
|
||||
|
||||
protected $fillable = [
|
||||
'user_id', 'session_id', 'url', 'page_type',
|
||||
'anime_id', 'episode_id', 'ip', 'country', 'city',
|
||||
'device', 'browser', 'referrer', 'is_bot', 'user_agent',
|
||||
'time_on_page', 'created_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'created_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function user() { return $this->belongsTo(User::class); }
|
||||
public function anime() { return $this->belongsTo(Anime::class); }
|
||||
}
|
||||
Reference in New Issue
Block a user