65 lines
1.1 KiB
PHP
65 lines
1.1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
/**
|
|
* Class Passenger
|
|
*
|
|
* @property int $id
|
|
* @property int $user_id
|
|
* @property string $first_name
|
|
* @property string $last_name
|
|
* @property string $national_code
|
|
* @property string $passport_number
|
|
* @property int $gender
|
|
* @property Carbon|null $birth_date
|
|
* @property string $mobile
|
|
* @property string $email
|
|
* @property string $nationality
|
|
* @property Carbon $created_at
|
|
* @property Carbon $updated_at
|
|
* @property string|null $deleted_at
|
|
*
|
|
* @property User $user
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class Passenger extends Model
|
|
{
|
|
use SoftDeletes;
|
|
protected $table = 'passengers';
|
|
public static $snakeAttributes = false;
|
|
|
|
protected $casts = [
|
|
'user_id' => 'int',
|
|
'gender' => 'int',
|
|
'birth_date' => 'datetime'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'user_id',
|
|
'first_name',
|
|
'last_name',
|
|
'national_code',
|
|
'passport_number',
|
|
'gender',
|
|
'birth_date',
|
|
'mobile',
|
|
'email',
|
|
'nationality'
|
|
];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|