<?php

namespace App\Models;

use App\Traits\Blameable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class KelompokKategoriPivot extends Model
{
    use HasFactory, Blameable, SoftDeletes;

    protected $table = 'kelompok_kategori_pivots';

    protected $fillable = [
        'kelompok_kategori_id',
        'produk_id',
    ];

    public function kelompokKategori()
    {
        return $this->belongsTo(KelompokKategori::class, 'kelompok_kategori_id');
    }

    public function produk()
    {
        return $this->belongsTo(Produk::class, 'produk_id');
    }
}
