feat: update models
This commit is contained in:
parent
7be5510753
commit
735d9e810c
20 changed files with 91 additions and 586 deletions
41
internal/model/financial_management.go
Normal file
41
internal/model/financial_management.go
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type Account struct {
|
||||
ID string `db:"id"`
|
||||
Name string `db:"name"`
|
||||
SpaceID string `db:"space_id"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at"`
|
||||
}
|
||||
|
||||
type TransactionType string
|
||||
|
||||
const (
|
||||
TransactionTypeDeposit TransactionType = "deposit"
|
||||
TransactionTypeWithdrawal TransactionType = "withdrawal"
|
||||
)
|
||||
|
||||
type Transaction struct {
|
||||
ID string `db:"id"`
|
||||
Value decimal.Decimal `db:"value"`
|
||||
Type TransactionType `db:"type"`
|
||||
AccountID string `db:"account_id"`
|
||||
Description *string `db:"description"`
|
||||
RelatedTransactionID *string `db:"related_transaction_id"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at"`
|
||||
}
|
||||
|
||||
type Tag struct {
|
||||
ID string `db:"id"`
|
||||
Name string `db:"name"`
|
||||
SpaceID string `db:"space_id"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at"`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue