56 lines
1.1 KiB
PHP
56 lines
1.1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Enums\PassengerType;
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class BookingPassenger
|
|
*
|
|
* @property int $id
|
|
* @property int $booking_id
|
|
* @property string $first_name
|
|
* @property string $last_name
|
|
* @property string $national_code
|
|
* @property int $passenger_type
|
|
* @property Carbon $birth_date
|
|
* @property Carbon $created_at
|
|
* @property Carbon $updated_at
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class BookingPassenger extends Model
|
|
{
|
|
protected $table = 'booking_passengers';
|
|
public $timestamps = false;
|
|
public static $snakeAttributes = false;
|
|
|
|
protected $casts = [
|
|
'booking_id' => 'int',
|
|
'birth_date' => 'datetime',
|
|
'passenger_type' => PassengerType::class,
|
|
'created_ar' => 'datetime'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'booking_id',
|
|
'first_name',
|
|
'last_name',
|
|
'national_code',
|
|
'passenger_type',
|
|
'birth_date',
|
|
'created_at',
|
|
'updated_at'
|
|
];
|
|
public function booking()
|
|
{
|
|
return $this->belongsTo(Booking::class);
|
|
}
|
|
}
|