init
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class TourDeparture
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $tour_id
|
||||
* @property Carbon $start_date
|
||||
* @property Carbon $end_date
|
||||
* @property int $price
|
||||
* @property int $capacity
|
||||
* @property int $status
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*
|
||||
* @property Tour $tour
|
||||
* @property Collection|Booking[] $bookings
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class TourDeparture extends Model
|
||||
{
|
||||
protected $table = 'tour_departures';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'tour_id' => 'int',
|
||||
'start_date' => 'datetime',
|
||||
'end_date' => 'datetime',
|
||||
'price' => 'int',
|
||||
'capacity' => 'int',
|
||||
'status' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'tour_id',
|
||||
'start_date',
|
||||
'end_date',
|
||||
'price',
|
||||
'capacity',
|
||||
'status'
|
||||
];
|
||||
|
||||
public function tour()
|
||||
{
|
||||
return $this->belongsTo(Tour::class);
|
||||
}
|
||||
|
||||
public function bookings()
|
||||
{
|
||||
return $this->hasMany(Booking::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user