2023-05-15 10:03:46 +00:00
|
|
|
<?php
|
|
|
|
|
2023-05-20 14:09:49 +00:00
|
|
|
namespace Modules\Cetaklabel\Entities;
|
2023-05-15 10:03:46 +00:00
|
|
|
|
|
|
|
class Document extends BaseModel
|
|
|
|
{
|
|
|
|
protected $fillable = [
|
|
|
|
'directorat_id',
|
|
|
|
'sub_directorat_id',
|
|
|
|
'job_id',
|
|
|
|
'sub_job_id',
|
|
|
|
'sub_sub_job_id',
|
|
|
|
'kode',
|
2023-05-25 01:53:06 +00:00
|
|
|
'kode_dus',
|
|
|
|
'kode_odner',
|
2023-05-15 10:03:46 +00:00
|
|
|
'sequence',
|
2023-05-25 01:53:06 +00:00
|
|
|
'sequence_dus',
|
|
|
|
'sequence_odner',
|
|
|
|
'status'
|
2023-05-15 10:03:46 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
public function directorat()
|
|
|
|
{
|
2023-05-15 14:14:52 +00:00
|
|
|
return $this->belongsTo(Directorat::class);
|
2023-05-15 10:03:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function sub_directorat()
|
|
|
|
{
|
2023-05-15 14:14:52 +00:00
|
|
|
return $this->belongsTo(SubDirectorat::class);
|
2023-05-15 10:03:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function job()
|
|
|
|
{
|
2023-05-15 14:14:52 +00:00
|
|
|
return $this->belongsTo(Job::class);
|
2023-05-15 10:03:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function sub_job()
|
|
|
|
{
|
2023-05-15 14:14:52 +00:00
|
|
|
return $this->belongsTo(SubJob::class);
|
2023-05-15 10:03:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function sub_sub_job()
|
|
|
|
{
|
2023-05-15 14:14:52 +00:00
|
|
|
return $this->belongsTo(SubSubJob::class);
|
2023-05-15 10:03:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function document_details()
|
|
|
|
{
|
2023-05-15 14:14:52 +00:00
|
|
|
return $this->hasMany(DocumentDetail::class);
|
2023-05-15 10:03:46 +00:00
|
|
|
}
|
|
|
|
}
|