Cetaklabel/Entities/DocumentDetail.php

59 lines
1.3 KiB
PHP

<?php
namespace Modules\Cetaklabel\Entities;
use Modules\Usermanager\Entities\User;
class DocumentDetail extends BaseModel
{
protected $fillable = [
'kode',
'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',
'status',
'approved_by',
'approved_at',
'aktif'
];
public function document()
{
return $this->belongsTo(Document::class);
}
public function document_type()
{
return $this->belongsTo(DocumentType::class);
}
public function special_code()
{
return $this->belongsTo(SpecialCode::class);
}
public function approved()
{
return $this->belongsTo(User::class, 'approved_by');
}
}