feat: recurring deposits to accounts
This commit is contained in:
parent
85ecd67bc1
commit
5513bcc603
14 changed files with 1126 additions and 44 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
24
internal/model/recurring_deposit.go
Normal file
24
internal/model/recurring_deposit.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue