36 lines
752 B
PHP
36 lines
752 B
PHP
<?php
|
|
|
|
namespace Modules\IndustrialEngineering\Models;
|
|
|
|
use App\User;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class BuildGenealogyEvent extends Model
|
|
{
|
|
use BelongsToBusiness;
|
|
|
|
protected $table = 'ie_build_genealogy_events';
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
protected $casts = [
|
|
'performed_at' => 'datetime',
|
|
'event_data' => 'array',
|
|
];
|
|
|
|
public function serializedUnit()
|
|
{
|
|
return $this->belongsTo(SerializedUnit::class, 'serialized_unit_id');
|
|
}
|
|
|
|
public function component()
|
|
{
|
|
return $this->belongsTo(SerializedUnitComponent::class, 'serialized_unit_component_id');
|
|
}
|
|
|
|
public function performedBy()
|
|
{
|
|
return $this->belongsTo(User::class, 'performed_by');
|
|
}
|
|
}
|