<?php

namespace Modules\Lpj\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Lpj\Database\Factories\FotoJaminanFactory;

class FotoJaminan extends Base
{
    use HasFactory;

    protected $table = 'foto_jaminan';

    /**
     * The attributes that are mass assignable.
     */
    protected $fillable = ['permohonan_id', 'pendamping', 'jenis_jaminan_id'];



    public function objekJaminan(){

        return $this->hasMany(ObjekJaminan::class, 'foto_jaminan_id');
    }


    public function ruteJaminan(){
        return $this->hasMany(RuteJaminan::class, 'foto_jaminan_id');
    }


    public function lingkungan(){
        return $this->hasMany(Lingkungan::class, 'foto_jaminan_id');
    }


    public function lantaiUnit(){
        return $this->hasMany(lantaiUnit::class, 'objek_jaminan_id', 'id');
    }
}
