feat(admin): implement full flight management for panel admin
This commit is contained in:
@@ -16,6 +16,7 @@ use Illuminate\Database\Eloquent\Attributes\Scope;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
/**
|
||||
* Class Flight
|
||||
@@ -43,6 +44,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Flight extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
protected $table = 'flights';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
@@ -52,12 +54,13 @@ class Flight extends Model
|
||||
'destination_airport_id' => 'int',
|
||||
'file_id' => 'int',
|
||||
'departure_time' => 'datetime',
|
||||
'arrival_time'=> 'datetime',
|
||||
'price' => 'int',
|
||||
'capacity' => 'int',
|
||||
'status' => FlightStatus::class,
|
||||
'trip_type' => FlightTripType::class,
|
||||
'flight_scope'=> FlightScope::class,
|
||||
'flight_type', FlightType::class,
|
||||
'flight_type'=> FlightType::class,
|
||||
'views_count' => 'int'
|
||||
];
|
||||
|
||||
@@ -67,6 +70,7 @@ class Flight extends Model
|
||||
'destination_airport_id',
|
||||
'file_id',
|
||||
'flight_number',
|
||||
'arrival_time',
|
||||
'departure_time',
|
||||
'price',
|
||||
'capacity',
|
||||
@@ -74,7 +78,8 @@ class Flight extends Model
|
||||
'trip_type',
|
||||
'flight_scope',
|
||||
'flight_type',
|
||||
'views_count'
|
||||
'views_count',
|
||||
'is_default'
|
||||
];
|
||||
#[Scope]
|
||||
protected function applySort(Builder $query, ?string $sort = null): void
|
||||
|
||||
Reference in New Issue
Block a user