84 lines
2.8 KiB
PHP
84 lines
2.8 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class BookingServiceItem
|
|
*
|
|
* @property int $id
|
|
* @property int $booking_id
|
|
* @property int $travel_company_id
|
|
* @property float $service_price
|
|
* @property float $service_price_refund
|
|
* @property float $commission
|
|
* @property Carbon $travel_date
|
|
* @property Carbon $created_at
|
|
* @property Carbon $updated_at
|
|
* @property string $name
|
|
* @property bool $is_commission_locked
|
|
* @property Booking $booking
|
|
* @property TravelCompany $travel_company
|
|
* @package App\Models
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereBookingId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereCommission($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereIsCommissionLocked($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereName($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereServicePrice($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereServicePriceRefund($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereTravelCompanyId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereTravelDate($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingServiceItem whereUpdatedAt($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class BookingServiceItem extends Model
|
|
{
|
|
protected $connection = 'mysql';
|
|
|
|
protected $table = 'booking_service_item';
|
|
|
|
protected $casts = [
|
|
'booking_id' => 'int',
|
|
'travel_company_id' => 'int',
|
|
'service_price' => 'float',
|
|
'service_price_refund' => 'float',
|
|
'commission' => 'float',
|
|
'is_commission_locked' => 'bool'
|
|
];
|
|
|
|
protected $dates = [
|
|
'travel_date'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'booking_id',
|
|
'travel_company_id',
|
|
'service_price',
|
|
'service_price_refund',
|
|
'commission',
|
|
'travel_date',
|
|
'name',
|
|
'is_commission_locked'
|
|
];
|
|
|
|
public function booking()
|
|
{
|
|
return $this->belongsTo(Booking::class);
|
|
}
|
|
|
|
public function travel_company()
|
|
{
|
|
return $this->belongsTo(TravelCompany::class);
|
|
}
|
|
}
|