StocksNew/Modules/Stock/app/Models/Stock.php

28 lines
536 B
PHP
Raw Permalink Normal View History

2024-09-11 06:47:15 +00:00
<?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');
}
}