2020-02-18 14:01:04 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Webkul\BookingProduct\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Webkul\BookingProduct\Contracts\Booking as BookingContract;
|
|
|
|
|
use Webkul\Sales\Models\OrderProxy;
|
|
|
|
|
use Webkul\Sales\Models\OrderItemProxy;
|
|
|
|
|
|
|
|
|
|
class Booking extends Model implements BookingContract
|
|
|
|
|
{
|
|
|
|
|
public $timestamps = false;
|
|
|
|
|
|
2020-02-26 14:19:04 +00:00
|
|
|
protected $fillable = ['qty', 'from', 'to', 'order_item_id', 'booking_product_event_ticket_id', 'product_id', 'order_id'];
|
2020-02-18 14:01:04 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the order record associated with the order item.
|
|
|
|
|
*/
|
|
|
|
|
public function order()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(OrderProxy::modelClass());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the child item record associated with the order item.
|
|
|
|
|
*/
|
|
|
|
|
public function order_item()
|
|
|
|
|
{
|
|
|
|
|
return $this->hasOne(OrderItemProxy::modelClass());
|
|
|
|
|
}
|
|
|
|
|
}
|