#21 base code for accepting/rejecting PIREPs
This commit is contained in:
@@ -29,6 +29,7 @@ class Pirep extends Model
|
||||
'route_leg',
|
||||
'dpt_airport_id',
|
||||
'arr_airport_id',
|
||||
'source',
|
||||
'level',
|
||||
'route',
|
||||
'notes',
|
||||
@@ -43,14 +44,10 @@ class Pirep extends Model
|
||||
*/
|
||||
protected $casts
|
||||
= [
|
||||
'user_id' => 'integer',
|
||||
'flight_id' => 'string',
|
||||
'aircraft_id' => 'integer',
|
||||
'flight_time' => 'integer',
|
||||
'level' => 'integer',
|
||||
'route' => 'string',
|
||||
'notes' => 'string',
|
||||
'raw_data' => 'string',
|
||||
'source' => 'integer',
|
||||
'status' => 'integer',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -92,6 +89,11 @@ class Pirep extends Model
|
||||
return $this->belongsTo('App\Models\Flight', 'flight_id');
|
||||
}
|
||||
|
||||
public function pilot()
|
||||
{
|
||||
return $this->user();
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('App\Models\User', 'user_id');
|
||||
|
||||
Reference in New Issue
Block a user