<?php

namespace App\Models;

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

class SubKategori extends Model
{
    use HasFactory; use SoftDeletes;

    protected $table = 'SubKategori';

    protected $primaryKey = 'SubKategoriId';

    protected $fillable = ['KategoriId', 'NamaSubKategori'];

    public function kategori()
    {
        return $this->belongsTo(Kategori::class, 'KategoriId', 'KategoriId');
    }
}
