'boolean', ]; public function company(): BelongsTo { return $this->belongsTo(FilamentCompanies::companyModel(), 'company_id'); } public function owner(): BelongsTo { return $this->company->owner; } public function currency(): BelongsTo { return $this->belongsTo(Currency::class, 'currency_code', 'code'); } public static function getAccountTypes(): array { return [ 'bank' => 'Bank', 'card' => 'Credit Card', ]; } public static function getCurrencyCodes(): array { $codes = array_keys(Config::get('money')); return array_combine($codes, $codes); } public static function getDefaultCurrencyCode(): ?string { $defaultCurrency = Currency::where('enabled', true) ->where('company_id', Auth::user()->currentCompany->id) ->first(); return $defaultCurrency?->code; } protected static function newFactory(): Factory { return AccountFactory::new(); } }