restaurant changes

This commit is contained in:
Sampanna Rimal
2024-09-19 18:33:08 +05:45
parent 0b438e302d
commit 2fa9d47a73
115 changed files with 3489 additions and 67 deletions

View File

View File

@ -0,0 +1,33 @@
<?php
namespace Modules\Ingredient\Models;
use App\Traits\StatusTrait;
use Illuminate\Database\Eloquent\Model;
use Modules\Supplier\Models\Supplier;
class Ingredient extends Model
{
USE StatusTrait;
protected $table = 'tbl_ingredients';
protected $guarded = [];
protected $appends = ['status_name'];
public function category()
{
return $this->belongsTo(IngredientCategory::class, 'ingredient_category_id');
}
public function unit()
{
return $this->belongsTo(Unit::class, 'unit_id');
}
public function supplier()
{
return $this->belongsTo(Supplier::class, 'supplier_id');
}
}

View File

@ -0,0 +1,16 @@
<?php
namespace Modules\Ingredient\Models;
use App\Traits\StatusTrait;
use Illuminate\Database\Eloquent\Model;
class IngredientCategory extends Model
{
USE StatusTrait;
protected $table = 'tbl_ingredient_categories';
protected $guarded = [];
protected $appends = ['status_name'];
}

View File

@ -0,0 +1,16 @@
<?php
namespace Modules\Ingredient\Models;
use App\Traits\StatusTrait;
use Illuminate\Database\Eloquent\Model;
class Unit extends Model
{
USE StatusTrait;
protected $table = 'tbl_units';
protected $guarded = [];
protected $appends = ['status_name'];
}