<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class QuoteTransportRule extends Model
{
    public const MODE_FIXED = 'fixed';
    public const MODE_KM = 'km';

    protected $fillable = [
        'organization_id',
        'name',
        'city',
        'zone_keywords',
        'pricing_mode',
        'fixed_amount',
        'base_km',
        'per_km_amount',
        'min_amount',
        'is_active',
        'sort_order',
    ];

    protected $casts = [
        'organization_id' => 'integer',
        'fixed_amount' => 'float',
        'base_km' => 'float',
        'per_km_amount' => 'float',
        'min_amount' => 'float',
        'is_active' => 'boolean',
        'sort_order' => 'integer',
    ];
}

