44 lines
1.2 KiB
PHP
44 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class PropertyPromotionMapping extends BaseModel
|
|
{
|
|
/**
|
|
* The database table used by the model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $table = 'property_promotion_mapping';
|
|
protected $appends = [];
|
|
|
|
const CREATED_AT = 'created_at';
|
|
const UPDATED_AT = 'updated_at';
|
|
|
|
protected $dateFormat = 'U';
|
|
protected $guarded = [];
|
|
|
|
/**
|
|
* The attributes excluded from the model's JSON form.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $hidden = [];
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
|
|
public function propertyPromotion()
|
|
{
|
|
return $this->hasOne('App\Models\PropertyPromotion', 'id', 'property_promotion_id')
|
|
->select(['id', 'property_id', 'promotion_type_id', 'start_date', 'end_date', 'reservation_start_date', 'reservation_end_date', 'exclude_dates', 'is_time', 'start_time', 'end_time', 'day_before', 'amount', 'min_stay', 'is_mobile', 'days', 'params', 'detail', 'status']);
|
|
}
|
|
|
|
public function propertyRoomRateChannelMapping()
|
|
{
|
|
return $this->hasOne('App\Models\PropertyRoomRateChannelMapping', 'id', 'room_rate_channel_mapping_id')
|
|
->select(['id', 'property_id', 'room_rate_mapping_id', 'channel_id', 'status']);
|
|
}
|
|
}
|