<?php

namespace App\Models;

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

class Hukum extends Model
{
    use HasFactory;

    protected $table = 'Hukum';

    protected $fillable = [
        'PerusahaanId',
        'JenisSanksiId',
        'SanksiNumber',
        'SanksiDate',
        'SanksiFile',
        'StatusPenaatan',
        'PenaatanNumber',
        'PenaatanDate',
        'PenaatanFile',
        'IsDeleted',
    ];

    public function perusahaan()
    {
        return $this->belongsTo(Perusahaan::class, 'PerusahaanId');
    }

    /**
     * Relasi ke tabel jenis sanksi.
     */
    public function jenisSanksi()
    {
        return $this->belongsTo(JenisSanksi::class, 'JenisSanksiId');
    }
}
