54 lines
906 B
PHP
54 lines
906 B
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class FlightImage
|
|
*
|
|
* @property int $id
|
|
* @property int $flight_id
|
|
* @property int $file_id
|
|
* @property int|null $sort_order
|
|
* @property bool|null $is_default
|
|
* @property Carbon|null $created_at
|
|
* @property Carbon|null $updated_at
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class FlightImage extends Model
|
|
{
|
|
protected $table = 'flight_images';
|
|
public static $snakeAttributes = false;
|
|
|
|
protected $casts = [
|
|
'flight_id' => 'int',
|
|
'file_id' => 'int',
|
|
'sort_order' => 'int',
|
|
'is_default' => 'bool'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'flight_id',
|
|
'file_id',
|
|
'sort_order',
|
|
'is_default'
|
|
];
|
|
|
|
public function flight()
|
|
{
|
|
return $this->belongsTo(Flight::class);
|
|
}
|
|
|
|
public function file()
|
|
{
|
|
return $this->belongsTo(File::class);
|
|
}
|
|
}
|