<?php

namespace App\FiveM\Models\ESX;

use Illuminate\Database\Eloquent\Model;

/**
 * Maps to ESX Legacy's `owned_vehicles` table: owner (identifier), plate,
 * vehicle (json blob of the vehicle props), type, job.
 */
class Vehicle extends Model
{
    protected $connection = 'fivem';

    public $timestamps = false;

    protected function casts(): array
    {
        return [
            'vehicle' => 'array',
        ];
    }

    public function getTable()
    {
        return config('fivem.tables.esx.vehicles', 'owned_vehicles');
    }
}
