<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class UlasanPegawai extends Model
{
    use HasFactory;
    
    
    protected $fillable = [
        'lesen_penjaja_id','borang_ulasan_ik_id','pegawai_id','pegawai_jawatan',
        'dt_pegawai_ulas','pegawai_cadangan','pegawai_syarat','pegawai_notis_perlu_dipatuhi',
        'pegawai_tidak_menyokong_sebab','pegawai_dirujuk_unit_penguatkuasa','pegawai_catatan',
        'pengarah_id','pengarah_jawatan','dt_pengarah_ulas','pengarah_ulasan','pengarah_mesyuarat_untuk',
        'pengarah_ditolak_sebab','pengarah_catatan'
    ];

    public function borangUlasanIk(){
        return $this->belongsTo(borangUlasanIk::class);
    }

    public function pegawai(){
        return $this->belongsTo(User::class, 'pegawai_id');
    }

    public function pengarah(){
        return $this->belongsTo(User::class, 'pengarah_id');
    }
}
