<?php
namespace App\Models;
class SupplierPayment extends BaseModel {
    protected function casts(): array { return ['payment_date' => 'date']; }
    public function supplier() { return $this->belongsTo(Supplier::class); }
    public function invoice() { return $this->belongsTo(PurchaseInvoice::class, 'invoice_id'); }
    public function bankAccount() { return $this->belongsTo(BankAccount::class, 'bank_account_id'); }
}
