feat(flights): update Flight.php

This commit is contained in:
2026-08-17 15:53:43 +03:30
parent 9e757ba8ed
commit 636dd03641
+35 -3
View File
@@ -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');
}
}