'boolean', 'type' => BankAccountType::class, 'access_token' => 'encrypted', ]; protected $appends = [ 'masked_number', ]; public function company(): BelongsTo { return $this->belongsTo(FilamentCompanies::companyModel(), 'company_id'); } public function institution(): BelongsTo { return $this->belongsTo(Institution::class, 'institution_id'); } public function bankAccount(): BelongsTo { return $this->belongsTo(BankAccount::class, 'bank_account_id'); } protected function maskedNumber(): Attribute { return Attribute::get(static function (mixed $value, array $attributes): ?string { return $attributes['mask'] ? '•••• ' . substr($attributes['mask'], -4) : null; }); } public function createdBy(): BelongsTo { return $this->belongsTo(FilamentCompanies::userModel(), 'created_by'); } public function updatedBy(): BelongsTo { return $this->belongsTo(FilamentCompanies::userModel(), 'updated_by'); } }