feat: implement BankAccount management with CRUD operations and selection for tenants

This commit is contained in:
2026-07-03 13:43:32 -03:00
parent b94efea4e0
commit b1e40b3430
13 changed files with 497 additions and 2 deletions

View File

@@ -55,5 +55,21 @@ class Tenant extends Model
{
return $this->hasMany(Product::class, 'tenant_codigo', 'codigo');
}
/**
* @return HasMany<BankAccount, $this>
*/
public function bankAccounts(): HasMany
{
return $this->hasMany(BankAccount::class, 'tenant_code', 'codigo');
}
/**
* @return BelongsTo<BankAccount, $this>
*/
public function selectedBankAccount(): BelongsTo
{
return $this->belongsTo(BankAccount::class, 'selected_bank_account_id');
}
}