58 lines
1.5 KiB
PHP
58 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class PbgTask extends Model
|
|
{
|
|
use HasFactory;
|
|
protected $table = 'pbg_task';
|
|
protected $fillable = [
|
|
'uuid',
|
|
'name',
|
|
'owner_name',
|
|
'application_type',
|
|
'application_type_name',
|
|
'condition',
|
|
'registration_number',
|
|
'document_number',
|
|
'address',
|
|
'status',
|
|
'status_name',
|
|
'slf_status',
|
|
'slf_status_name',
|
|
'function_type',
|
|
'consultation_type',
|
|
'due_date',
|
|
'land_certificate_phase',
|
|
'task_created_at'
|
|
];
|
|
|
|
public function pbg_task_retributions(){
|
|
return $this->hasOne(PbgTaskRetributions::class, 'pbg_task_uid', 'uuid');
|
|
}
|
|
|
|
public function pbg_task_index_integrations(){
|
|
return $this->hasOne(PbgTaskIndexIntegrations::class, 'pbg_task_uid', 'uuid');
|
|
}
|
|
|
|
public function pbg_task_detail(){
|
|
return $this->hasOne(PbgTaskDetail::class, 'pbg_task_uid', 'uuid');
|
|
}
|
|
|
|
public function googleSheet(){
|
|
return $this->hasOne(PbgTaskGoogleSheet::class, 'formatted_registration_number', 'registration_number');
|
|
}
|
|
|
|
public function taskAssignments()
|
|
{
|
|
return $this->hasMany(TaskAssignment::class, 'pbg_task_uid', 'uuid');
|
|
}
|
|
|
|
public function attachments(){
|
|
return $this->hasMany(PbgTaskAttachment::class, 'pbg_task_id', 'id');
|
|
}
|
|
}
|