StocksNew/Modules/Stock/app/Models/Stock.php
Sampanna Rimal afb2c202d6 changes
2024-09-11 12:32:15 +05:45

28 lines
536 B
PHP

<?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');
}
}