39 lines
803 B
PHP
39 lines
803 B
PHP
<?php
|
|
|
|
namespace Modules\SalesEntry\Models;
|
|
|
|
use App\Traits\StatusTrait;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Modules\SalesEntry\Models\SalesEntry;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Modules\Supplier\Models\Supplier;
|
|
|
|
|
|
class SalesEntryDetail extends Model
|
|
{
|
|
USE StatusTrait;
|
|
|
|
protected $table = 'tbl_salesentrydetails';
|
|
protected $fillable = [
|
|
'salesentry_id',
|
|
'product_id',
|
|
'category_id',
|
|
'stock_id',
|
|
'size_id',
|
|
'unit',
|
|
'rate',
|
|
'quantity',
|
|
'amount',
|
|
'desc',
|
|
'created_at',
|
|
'updated_at'
|
|
];
|
|
protected $appends = ['status_name'];
|
|
|
|
|
|
public function order(): BelongsTo
|
|
{
|
|
return $this->belongsTo(SalesEntry::class);
|
|
}
|
|
}
|