<?php
namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes;
class Supplier extends BaseModel {
    use SoftDeletes;
    public function orders() { return $this->hasMany(PurchaseOrder::class); }
    public function invoices() { return $this->hasMany(PurchaseInvoice::class); }
    public function getDisplayNameAttribute(): string { return $this->code.' – '.$this->name; }
}
