28 lines
556 B
PHP
28 lines
556 B
PHP
<?php
|
|
|
|
namespace Modules\IndustrialEngineering\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class BomLineAlternate extends Model
|
|
{
|
|
protected $table = 'ie_bom_line_alternates';
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
protected $casts = [
|
|
'is_approved' => 'boolean',
|
|
'cost_delta' => 'decimal:4',
|
|
];
|
|
|
|
public function bomLine()
|
|
{
|
|
return $this->belongsTo(BomLine::class, 'bom_line_id');
|
|
}
|
|
|
|
public function alternateItem()
|
|
{
|
|
return $this->belongsTo(ItemMaster::class, 'alternate_item_id');
|
|
}
|
|
}
|