<?php

namespace App\Models\Sales;

use Illuminate\Database\Eloquent\Model;
use OwenIt\Auditing\Contracts\Auditable;
use OwenIt\Auditing\Auditable as AuditableTrait;

class ShowCancel extends Model implements Auditable
{
    use AuditableTrait;
    protected $table='show_cancel';
    protected $primaryKey = 'id';
    protected $fillable = ['facility_id','show_time_id','show_date','approval_flag','cancelled_time','cancelled_by','approved_by','approved_date'];
    
    function showtime()
    {
        return $this->belongsTo('\App\Models\Facility\ShowTimings','show_time_id','id');
    }
    function facility()
    {
        return $this->belongsTo('\App\Models\Facility\Facility','facility_id','id');
    }
    function cancelledby()
    {
        return $this->belongsTo('\App\Models\User','cancelled_by','id');
    }
    function approvedby()
    {
        return $this->belongsTo('\App\Models\User','approved_by','id');
    }

}
