<?php

namespace App\Models;

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

class PembelianBarang extends Model
{
    use HasFactory;
    protected $guarded = ['id'];
    protected $table = 'pembelian_barang';

    public function laundry()
    {
        return $this->belongsTo(Laundry::class, 'id_laundry', 'id');
    }

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

    public function MetodePembayaran()
    {
        return $this->belongsTo(Metode_Pembayaran::class, 'metode_id', 'id');
    }
}
