migrate to gtea from bistbucket
This commit is contained in:
35
public/restaurant/Modules/Restaurant/app/Models/Addon.php
Normal file
35
public/restaurant/Modules/Restaurant/app/Models/Addon.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Restaurant\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Addon extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'restaurant_id',
|
||||
'name',
|
||||
'price',
|
||||
'vat',
|
||||
'pst',
|
||||
'status',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'deleted_at',
|
||||
];
|
||||
|
||||
public const TABLE_NAME = 'addons';
|
||||
|
||||
protected $table = self::TABLE_NAME;
|
||||
|
||||
public function foodItems(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(FoodItem::class, 'addon_food', 'addon_id', 'food_item_id')
|
||||
->using(AddonFood::class)
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user