29 lines
578 B
PHP
29 lines
578 B
PHP
<?php
|
|
|
|
namespace Modules\IndustrialEngineering\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class SupplierPartNumber extends Model
|
|
{
|
|
protected $table = 'ie_supplier_part_numbers';
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
protected $casts = [
|
|
'unit_price' => 'decimal:4',
|
|
'is_preferred' => 'boolean',
|
|
'is_approved' => 'boolean',
|
|
];
|
|
|
|
public function itemMaster()
|
|
{
|
|
return $this->belongsTo(ItemMaster::class, 'item_master_id');
|
|
}
|
|
|
|
public function supplier()
|
|
{
|
|
return $this->belongsTo(Supplier::class);
|
|
}
|
|
}
|