<?php
namespace App\Models;
class SalesCreditNote extends BaseModel {
    protected function casts(): array { return ['cn_date' => 'date']; }
    public function customer() { return $this->belongsTo(Customer::class); }
    public function invoice() { return $this->belongsTo(SalesInvoice::class, 'invoice_id'); }
    public function lines() { return $this->hasMany(SalesCreditNoteLine::class, 'credit_note_id'); }
}
