28 lines
536 B
PHP
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');
|
|
}
|
|
}
|
|
|