migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Restaurant\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\Pivot;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class AddonFood extends Pivot
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'restaurant_id',
|
||||
'food_item_id',
|
||||
'addon_id',
|
||||
'status',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'deleted_at',
|
||||
];
|
||||
|
||||
public const TABLE_NAME = 'addon_food';
|
||||
|
||||
protected $table = self::TABLE_NAME;
|
||||
|
||||
public function addon(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Addon::class);
|
||||
}
|
||||
|
||||
public function food(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(FoodItem::class, 'food_item_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user