<?php

namespace App\Models;

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

class Peminjaman extends Model
{
    use HasFactory;

    protected $table = 'borrow_transactions';

    protected $fillable = [
        'member_id',
        'koleksi_id',
        'tgl_peminjaman',
        'tgl_pengembalian',
        'status',
    ];

    public function member()
    {
        return $this->belongsTo(Member::class);
    }

    public function koleksi()
    {
        return $this->belongsTo(Koleksi::class);
    }
}

