<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class OnlinePlayer extends Model
{
    public $timestamps = false;

    protected $fillable = ['fivem_server_id', 'citizen_id', 'name', 'source_id', 'updated_at'];

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

    public function server()
    {
        return $this->belongsTo(FiveMServer::class, 'fivem_server_id');
    }
}
