<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;

class PostView extends Model
{
    public $timestamps  = false;
    protected $fillable = [
        'post_id', 'session_id', 'user_id', 'ip_hash',
        'country_code', 'device_type', 'referrer',
        'utm_source', 'utm_medium', 'utm_campaign',
    ];
    const CREATED_AT = 'created_at';

    public function post() { return $this->belongsTo(Post::class); }
}
