<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;

class Laporan extends Model
{
    use HasFactory;

    protected $fillable = [
        'user_id',
        'pelapor_nama',
        'pelapor_nim_nidn',
        'pelapor_email',
        'pts_nama',
        'tipe_laporan',
        'judul',
        'deskripsi',
        'jalur',
        'status',
        'pelapor_tipe',
        'jenis_identitas',
        'no_telepon',
        'file_identitas',
        'file_bukti',
        'jenis_kelamin',
        'tanggal_kejadian',
        'lokasi_kejadian',
        'jenis_kekerasan',
        'alasan_penolakan',
        'dipantau_lldikti',
    ];

    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }

    public function tindakanSatgas(): HasOne
    {
        return $this->hasOne(TindakanSatgas::class);
    }

    public function tindakanPenilai(): HasOne
    {
        return $this->hasOne(TindakanPenilai::class);
    }

    public function catatanKlinisPsikolog(): HasOne
    {
        return $this->hasOne(CatatanKlinisPsikolog::class);
    }

    public function eksekusiRektor(): HasOne
    {
        return $this->hasOne(EksekusiRektor::class);
    }
}
