29 lines
629 B
PHP
29 lines
629 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Modules\Restaurant\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||
|
|
|
||
|
|
class FoodAvailabilityTime extends Model
|
||
|
|
{
|
||
|
|
use SoftDeletes;
|
||
|
|
|
||
|
|
protected $fillable = [
|
||
|
|
'restaurant_id',
|
||
|
|
'food_availability_id',
|
||
|
|
'open_time',
|
||
|
|
'close_time',
|
||
|
|
];
|
||
|
|
|
||
|
|
public const TABLE_NAME = 'food_availability_times';
|
||
|
|
|
||
|
|
protected $table = self::TABLE_NAME;
|
||
|
|
|
||
|
|
public function availability(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(FoodAvailability::class, 'food_availability_id');
|
||
|
|
}
|
||
|
|
}
|