<?php

namespace App\Models;

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

class StandarKompetensiJabatan extends Model
{
    use HasFactory;

    protected $table = 'standar_kompetensi_jabatan';

    protected $fillable = [
        'jenjang_jabatan_id',
        'kompetensi_id',
        'level',
        'deskripsi',
    ];

    public function jenjangJabatan(): BelongsTo
    {
        return $this->belongsTo(JenjangJabatan::class, 'jenjang_jabatan_id');
    }

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