<?php

namespace App\Models\invoice;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use app\Models\invoice\Invoice;

class Deposit extends Model
{
    use HasFactory;

    public $table = 'deposit';

    protected $fillable = [
        'depositNo',
        'depositNoAcc',
        'debtor',
        'depositAmount',
        'paymentMethod',
        'InvoiceID'
    ];

    //define relationship with invoice Model
    public function invoice()
    {
        return $this->belongsTo(Invoice::class, 'InvoiceID');
    }
}
