<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class TrackingSearch extends Model
{
    use HasFactory;

    protected $fillable = [
        'device_id',
        'user_agent',
        'ip_address',
        'platform',
        'search_type',
        'search_query',
        'search_filters',
        'action_at',
    ];

    protected $casts = [
        'search_filters' => 'array',
        'action_at' => 'datetime',
        'created_at' => 'datetime',
        'updated_at' => 'datetime',
    ];

    protected $attributes = [
        'platform' => 'web',
    ];
}