<?php

namespace App\Models;

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

class Attachment extends Model
{
    public $incrementing = false;
    protected $table = 'ms_attachment';

    protected $fillable = [
        'id',
        'nama',
        'id_kategori_dokumen',
        'updated_at',
        'created_at',
        'deleted_at',
    ];

    public function rAgenda()
    {
        return $this->belongsTo(Agenda::class, 'idattachment', 'id');
    }

    public function rKategoriDokumen()
    {
        return $this->hasOne(KategoriDokumen::class, 'id_kategori_dokumen', 'id');
    }
}
