20 lines
481 B
Go
20 lines
481 B
Go
package domain
|
|
|
|
import "time"
|
|
|
|
// CashEntry amounts are integer CNY cents; no floating-point accounting.
|
|
type CashEntry struct {
|
|
ID string `db:"id"`
|
|
AccountID string `db:"account_id"`
|
|
EntryType string `db:"entry_type"`
|
|
AmountMinor int64 `db:"amount_minor"`
|
|
CreatedAt time.Time `db:"created_at"`
|
|
}
|
|
|
|
func (CashEntry) TableName() string { return "veyra_cash_entry" }
|
|
|
|
type AccountSummary struct {
|
|
Account
|
|
CashBalance *string `json:"cash_balance"`
|
|
}
|