feat: recurring deposits to accounts

This commit is contained in:
juancwu 2026-02-20 16:23:01 +00:00
commit 5513bcc603
14 changed files with 1126 additions and 44 deletions

View file

@ -19,13 +19,14 @@ type MoneyAccount struct {
}
type AccountTransfer struct {
ID string `db:"id"`
AccountID string `db:"account_id"`
AmountCents int `db:"amount_cents"`
Direction TransferDirection `db:"direction"`
Note string `db:"note"`
CreatedBy string `db:"created_by"`
CreatedAt time.Time `db:"created_at"`
ID string `db:"id"`
AccountID string `db:"account_id"`
AmountCents int `db:"amount_cents"`
Direction TransferDirection `db:"direction"`
Note string `db:"note"`
RecurringDepositID *string `db:"recurring_deposit_id"`
CreatedBy string `db:"created_by"`
CreatedAt time.Time `db:"created_at"`
}
type MoneyAccountWithBalance struct {

View file

@ -0,0 +1,24 @@
package model
import "time"
type RecurringDeposit struct {
ID string `db:"id"`
SpaceID string `db:"space_id"`
AccountID string `db:"account_id"`
AmountCents int `db:"amount_cents"`
Frequency Frequency `db:"frequency"`
StartDate time.Time `db:"start_date"`
EndDate *time.Time `db:"end_date"`
NextOccurrence time.Time `db:"next_occurrence"`
IsActive bool `db:"is_active"`
Title string `db:"title"`
CreatedBy string `db:"created_by"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
type RecurringDepositWithAccount struct {
RecurringDeposit
AccountName string
}