From 636dd03641befa2fe400eff14d1b917771125bb1 Mon Sep 17 00:00:00 2001 From: Windows Store Date: Mon, 17 Aug 2026 15:53:43 +0330 Subject: [PATCH] feat(flights): update Flight.php --- app/Models/Flight.php | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/app/Models/Flight.php b/app/Models/Flight.php index c0b70b4..099a026 100644 --- a/app/Models/Flight.php +++ b/app/Models/Flight.php @@ -11,7 +11,7 @@ use Illuminate\Database\Eloquent\Model; /** * Class Flight - * + * * @property int $id * @property string $flight_number * @property int $airline_id @@ -24,7 +24,7 @@ use Illuminate\Database\Eloquent\Model; * @property int $status * @property Carbon $created_at * @property Carbon $updated_at - * + * * @property Airline $airline * @property Airport $airport * @@ -32,7 +32,35 @@ use Illuminate\Database\Eloquent\Model; */ class Flight extends Model { - protected $table = 'flights'; + /** + * @var mixed|string + */ + public mixed $start_date_fa; + /** + * @var int|mixed + */ + public mixed $duration_hours; + /** + * @var int|mixed + */ + public mixed $duration_minutes; + /** + * @var mixed|string + */ + public mixed $start_time_fa; + /** + * @var mixed|string + */ + public mixed $end_time_fa; + /** + * @var mixed|string + */ + public mixed $full_date_fa; + /** + * @var mixed|string + */ + public mixed $end_date_fa; + protected $table = 'flights'; protected $casts = [ 'airline_id' => 'int', @@ -66,4 +94,8 @@ class Flight extends Model { return $this->belongsTo(Airport::class, 'origin_airports_id'); } + public function destinationAirport() + { + return $this->belongsTo(Airport::class, 'destination_airports_id'); + } }