49 lines
1.1 KiB
PHP
49 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Modules\IndustrialEngineering\Models;
|
|
|
|
use App\User;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Modules\Project\Entities\Project;
|
|
|
|
class ResearchProject extends Model
|
|
{
|
|
use BelongsToBusiness;
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'ie_research_projects';
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
public function project()
|
|
{
|
|
return $this->belongsTo(Project::class, 'project_id');
|
|
}
|
|
|
|
public function competitiveProducts()
|
|
{
|
|
return $this->hasMany(CompetitiveProduct::class, 'research_project_id');
|
|
}
|
|
|
|
public function benchmarks()
|
|
{
|
|
return $this->hasMany(CompetitiveBenchmark::class, 'research_project_id');
|
|
}
|
|
|
|
public function findings()
|
|
{
|
|
return $this->hasMany(EngineeringFinding::class, 'research_project_id');
|
|
}
|
|
|
|
public function leadResearcher()
|
|
{
|
|
return $this->belongsTo(User::class, 'lead_researcher_id');
|
|
}
|
|
|
|
public function lessonsLearned()
|
|
{
|
|
return $this->hasMany(LessonsLearned::class, 'research_project_id');
|
|
}
|
|
}
|