Cetaklabel/Entities/DocumentDetail.php

59 lines
1.3 KiB
PHP
Raw Normal View History

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
2023-05-26 02:31:37 +00:00
use Modules\Usermanager\Entities\User;
2023-05-15 10:03:46 +00:00
class DocumentDetail extends BaseModel
{
protected $fillable = [
'kode',
2023-05-15 10:03:46 +00:00
'document_id',
'document_type_id',
'nama_nasabah',
'no_rekening',
'no_cif',
'group',
'group',
'tanggal_upload',
'tanggal_dokumen',
'nomor_dokumen',
'perihal',
'kode_cabang',
'jumlah_halaman',
'custom_field_1',
'custom_field_2',
'custom_field_3',
'custom_field_4',
'file',
'no_urut',
'kategori',
'keterangan',
2023-05-26 02:31:37 +00:00
'status',
'approved_by',
'approved_at',
'aktif'
2023-05-15 10:03:46 +00:00
];
public function document()
{
2023-05-15 14:14:52 +00:00
return $this->belongsTo(Document::class);
2023-05-15 10:03:46 +00:00
}
public function document_type()
{
2023-05-15 14:14:52 +00:00
return $this->belongsTo(DocumentType::class);
2023-05-15 10:03:46 +00:00
}
2023-05-26 02:31:37 +00:00
public function special_code()
{
return $this->belongsTo(SpecialCode::class);
}
2023-06-14 09:20:32 +00:00
public function approved()
{
2023-05-26 02:31:37 +00:00
return $this->belongsTo(User::class, 'approved_by');
}
2023-05-15 10:03:46 +00:00
}