<?php

namespace App\Models;

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

class PaketBarang extends Model
{
    use HasFactory;

    protected $table = 'paket_barang';
    
    protected $fillable = [
        'paket_id',
        'barang_id',
        'jumlah'
    ];

    public function paket()
    {
        return $this->belongsTo(Paket::class);
    }

    public function barang()
    {
        return $this->belongsTo(StockModel::class, 'barang_id');
    }
} 