StocksNew/Modules/PurchaseEntry/app/Models/PurchaseEntryDetail.php

40 lines
841 B
PHP
Raw Normal View History

2024-09-19 12:48:08 +00:00
<?php
namespace Modules\PurchaseEntry\Models;
use App\Traits\StatusTrait;
use Illuminate\Database\Eloquent\Model;
use Modules\PurchaseEntry\Models\PurchaseEntry;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Modules\Supplier\Models\Supplier;
class PurchaseEntryDetail extends Model
{
USE StatusTrait;
protected $table = 'tbl_purchaseentrydetails';
protected $fillable = [
'purchaseentry_id',
'product_id',
'category_id',
'stock_id',
'size_id',
'unit',
'price',
'rate',
'quantity',
'amount',
'desc',
'created_at',
'updated_at'
];
protected $appends = ['status_name'];
public function order(): BelongsTo
{
return $this->belongsTo(PurchaseEntry::class);
}
}