ultimatepos/Modules/AssetExchange/Models/ResearchTask.php

48 lines
988 B
PHP

<?php
namespace Modules\AssetExchange\Models;
use App\User;
use Illuminate\Database\Eloquent\Model;
class ResearchTask extends Model
{
protected $table = 'aex_research_tasks';
protected $fillable = [
'business_id',
'research_case_id',
'template_key',
'category',
'title',
'description',
'instructions',
'assignee_user_id',
'status',
'priority',
'due_date',
'completed_at',
'findings',
'findings_json',
'crm_schedule_id',
'sort_order',
];
protected $casts = [
'due_date' => 'date',
'completed_at' => 'datetime',
'findings_json' => 'array',
'sort_order' => 'integer',
];
public function researchCase()
{
return $this->belongsTo(ResearchCase::class, 'research_case_id');
}
public function assignee()
{
return $this->belongsTo(User::class, 'assignee_user_id');
}
}