<?php
namespace App\Models;
class Account extends BaseModel {
    public function parent() { return $this->belongsTo(Account::class, 'parent_id'); }
    public function children() { return $this->hasMany(Account::class, 'parent_id'); }
    public function getDisplayNameAttribute(): string { return $this->code.' – '.$this->name; }
}
