31 lines
631 B
PHP
31 lines
631 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Modules\Restaurant\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
|
||
|
|
class ReservationUnavailable extends Model
|
||
|
|
{
|
||
|
|
protected $fillable = [
|
||
|
|
'restaurant_id',
|
||
|
|
'table_id',
|
||
|
|
'date',
|
||
|
|
'start_time',
|
||
|
|
'end_time',
|
||
|
|
'reason',
|
||
|
|
'created_at',
|
||
|
|
'updated_at',
|
||
|
|
'deleted_at',
|
||
|
|
];
|
||
|
|
|
||
|
|
public const TABLE_NAME = 'reservation_unavailables';
|
||
|
|
|
||
|
|
protected $table = self::TABLE_NAME;
|
||
|
|
|
||
|
|
public function table(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(Table::class)->select('id', 'name');
|
||
|
|
}
|
||
|
|
}
|