This commit is contained in:
Sampanna Rimal
2024-09-11 12:32:15 +05:45
parent 82fab174dc
commit afb2c202d6
170 changed files with 3352 additions and 363 deletions

View File

View File

@ -0,0 +1,27 @@
<?php
namespace Modules\Stock\Models;
use App\Traits\StatusTrait;
use Illuminate\Database\Eloquent\Model;
use Modules\Product\Models\Product;
class Stock extends Model
{
use StatusTrait;
protected $table = 'tbl_stocks';
protected $guarded = [];
protected $appends = ['status_name'];
public function stockLocation()
{
return $this->belongsTo(StockLocation::class, 'stocklocation_id');
}
public function product()
{
return $this->belongsTo(Product::class, 'product_id');
}
}

View File

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