Added Crew and General Aviation Filters

This commit is contained in:
2026-04-20 22:30:34 +10:00
parent e007824fa9
commit a57775e141
26 changed files with 559 additions and 98 deletions
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class CrewType extends Model
{
protected $table = 'crew_types';
protected $fillable = [
'name',
'internal_name',
];
}
+4 -1
View File
@@ -6,5 +6,8 @@ use Illuminate\Database\Eloquent\Model;
class FlightClass extends Model
{
//
protected $fillable = [
'name',
'internal_name',
];
}
+7
View File
@@ -23,6 +23,7 @@ class UserFlight extends Model
'seat_type_id',
'flight_class_id',
'flight_reason_id',
'crew_type_id',
'note',
'auto_update',
];
@@ -66,11 +67,17 @@ class UserFlight extends Model
return $this->belongsTo(Airport::class, 'arrival_airport_id');
}
public function crewType(): BelongsTo
{
return $this->belongsTo(CrewType::class);
}
public function airline(): BelongsTo
{
return $this->belongsTo(Airline::class);
}
public function aircraft(): BelongsTo
{
return $this->belongsTo(Aircraft::class);