feat(flights): update Flight.php
This commit is contained in:
+33
-1
@@ -32,7 +32,35 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
*/
|
*/
|
||||||
class Flight extends 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 = [
|
protected $casts = [
|
||||||
'airline_id' => 'int',
|
'airline_id' => 'int',
|
||||||
@@ -66,4 +94,8 @@ class Flight extends Model
|
|||||||
{
|
{
|
||||||
return $this->belongsTo(Airport::class, 'origin_airports_id');
|
return $this->belongsTo(Airport::class, 'origin_airports_id');
|
||||||
}
|
}
|
||||||
|
public function destinationAirport()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Airport::class, 'destination_airports_id');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user