<?php

namespace App\Models;

use App\Models\Concerns\HasPublicId;
use Illuminate\Database\Eloquent\Model;

final class TransportRoute extends Model
{
    use HasPublicId;

    protected $table = 'transport_routes';

    protected $fillable = [
        'public_id',
        'company_id',
        'code',
        'name',
        'origin',
        'destination',
        'origin_emirate',
        'destination_emirate',
        'origin_country',
        'destination_country',
        'distance_km',
        'is_active',
    ];

    protected function casts(): array
    {
        return ['distance_km'=>'decimal:2', 'is_active'=>'boolean'];
    }
}
