Files
airline-agency/app/Models/TourImage.php
T

54 lines
890 B
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class TourImage
*
* @property int $id
* @property int $tour_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 TourImage extends Model
{
protected $table = 'tour_images';
public static $snakeAttributes = false;
protected $casts = [
'tour_id' => 'int',
'file_id' => 'int',
'sort_order' => 'int',
'is_default' => 'bool'
];
protected $fillable = [
'tour_id',
'file_id',
'sort_order',
'is_default'
];
public function tour()
{
return $this->belongsTo(Tour::class);
}
public function file()
{
return $this->belongsTo(File::class);
}
}