ultimatepos/Modules/IndustrialEngineering/Models/EngineeringFinding.php

40 lines
829 B
PHP

<?php
namespace Modules\IndustrialEngineering\Models;
use App\User;
use Illuminate\Database\Eloquent\Model;
class EngineeringFinding extends Model
{
use BelongsToBusiness;
protected $table = 'ie_engineering_findings';
protected $guarded = ['id'];
protected $casts = [
'recommendations' => 'array',
];
public function researchProject()
{
return $this->belongsTo(ResearchProject::class, 'research_project_id');
}
public function changeRequest()
{
return $this->belongsTo(BomChangeRequest::class, 'change_request_id');
}
public function costScenario()
{
return $this->belongsTo(CostScenario::class, 'cost_scenario_id');
}
public function documentedBy()
{
return $this->belongsTo(User::class, 'documented_by');
}
}