<?php

    namespace Modules\Lpj\Models;

    use Modules\Location\Models\City;
    use Modules\Location\Models\District;
    use Modules\Location\Models\Province;
    use Modules\Location\Models\Village;
    use Modules\Lpj\Database\Factories\DokumenJaminanFactory;

    class DetailDokumenJaminan extends Base
    {
        protected $table    = 'detail_dokumen_jaminan';
        protected $fillable = [
            'dokumen_jaminan_id',
            'jenis_legalitas_jaminan_id',
            'name',
            'dokumen_jaminan',
            'dokumen_nomor',
            'keterangan',
            'details',
            'status',
            'authorized_at',
            'authorized_status',
            'authorized_by',
        ];

        public function jenisLegalitasJaminan(){
            return $this->belongsTo(JenisLegalitasJaminan::class, 'jenis_legalitas_jaminan_id', 'id');
        }

        public function dokumenJaminan(){
            return $this->belongsTo(DokumenJaminan::class, 'dokumen_jaminan_id', 'id');
        }
    }
