19 lines
508 B
PHP
19 lines
508 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class SwapRequest extends Model
|
|
{
|
|
protected $fillable = [
|
|
'event_id','flight_member_id','to_flight_id','to_seat_no','reason',
|
|
'status','requested_by','approved_by','approved_at'
|
|
];
|
|
|
|
protected $casts = ['approved_at' => 'datetime'];
|
|
|
|
public function flightMember(){ return $this->belongsTo(FlightMember::class); }
|
|
public function toFlight(){ return $this->belongsTo(Flight::class, 'to_flight_id'); }
|
|
}
|