30 lines
581 B
PHP
30 lines
581 B
PHP
<?php
|
|
|
|
namespace Modules\IndustrialEngineering\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class SerialRegistry extends Model
|
|
{
|
|
use BelongsToBusiness;
|
|
|
|
protected $table = 'ie_serial_registry';
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
protected $casts = [
|
|
'manufactured_at' => 'date',
|
|
'metadata' => 'array',
|
|
];
|
|
|
|
public function itemMaster()
|
|
{
|
|
return $this->belongsTo(ItemMaster::class, 'item_master_id');
|
|
}
|
|
|
|
public function manufacturer()
|
|
{
|
|
return $this->belongsTo(Manufacturer::class, 'manufacturer_id');
|
|
}
|
|
}
|