fix : 모델, BOM 구성 수정
- 설계용 모델, BOM 기능 추가
This commit is contained in:
23
app/Models/Design/BomTemplateItem.php
Normal file
23
app/Models/Design/BomTemplateItem.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user