24 lines
519 B
PHP
24 lines
519 B
PHP
<?php
|
|
|
|
namespace App\Models\Design;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class BomTemplateItem extends Model
|
|
{
|
|
protected $table = 'bom_template_items';
|
|
|
|
protected $fillable = [
|
|
'tenant_id','bom_template_id','ref_type','ref_id','qty','waste_rate','uom_id','notes','sort_order',
|
|
];
|
|
|
|
protected $casts = [
|
|
'qty' => 'decimal:6',
|
|
'waste_rate' => 'decimal:6',
|
|
];
|
|
|
|
public function template() {
|
|
return $this->belongsTo(BomTemplate::class, 'bom_template_id');
|
|
}
|
|
}
|