<?php

namespace App\Models;

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

class MasterProduct extends Model
{
    use HasFactory;
    protected $table = 'master_products';
    public $primaryKey = 'id';
    protected $fillable = [
        'id', 'nama', 'kode', 'qty', 'supplier', 'jenis', 'ukuran', 'harga_beli', 'harga_jual', 'additional_cost', 'payment_type'
    ];
    
    public function warehouse()
    {
        return $this->belongsTo(WarehouseStock::class, 'id');
    }
}
