<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Corridor extends Model { protected $fillable=['from_country_id','to_country_id','min_amount_minor','max_amount_minor','daily_cap_minor','code_validity_hours','is_active']; protected function casts():array{return ['min_amount_minor'=>'integer','max_amount_minor'=>'integer','daily_cap_minor'=>'integer','code_validity_hours'=>'integer','is_active'=>'boolean'];} public function fromCountry():BelongsTo{return $this->belongsTo(Country::class,'from_country_id');} public function toCountry():BelongsTo{return $this->belongsTo(Country::class,'to_country_id');} }
