chore: initial commit of HouseholdBudgetBook (backend, frontend, desktop)
This commit is contained in:
commit
4a5db3f1f9
167 files changed
+21732
No files matched your search
@@ -0,0 +1,53 @@
|
||||
package model
|
||||
|
||||
type Account struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Balance int64 `json:"balance"` // 开账初值(手工录入)
|
||||
CurrentBalance int64 `json:"current_balance"` // = balance + 历史流水净额(实时派生)
|
||||
BankName string `json:"bank_name"`
|
||||
CardNumber string `json:"card_number"`
|
||||
BranchName string `json:"branch_name"`
|
||||
Note string `json:"note"`
|
||||
IsActive bool `json:"is_active"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
type CreateAccountRequest struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Balance int64 `json:"balance"`
|
||||
BankName string `json:"bank_name"`
|
||||
CardNumber string `json:"card_number"`
|
||||
BranchName string `json:"branch_name"`
|
||||
Note string `json:"note"`
|
||||
}
|
||||
|
||||
type UpdateAccountRequest struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
Balance *int64 `json:"balance,omitempty"`
|
||||
BankName *string `json:"bank_name,omitempty"`
|
||||
CardNumber *string `json:"card_number,omitempty"`
|
||||
BranchName *string `json:"branch_name,omitempty"`
|
||||
Note *string `json:"note,omitempty"`
|
||||
IsActive *bool `json:"is_active,omitempty"`
|
||||
}
|
||||
|
||||
type ReconcileAccountRequest struct {
|
||||
ActualBalance int64 `json:"actual_balance"`
|
||||
Note string `json:"note"`
|
||||
CreateAdjustment bool `json:"create_adjustment"`
|
||||
}
|
||||
type AccountReconciliation struct {
|
||||
ID int64 `json:"id"`
|
||||
AccountID int64 `json:"account_id"`
|
||||
SystemBalance int64 `json:"system_balance"`
|
||||
ActualBalance int64 `json:"actual_balance"`
|
||||
Difference int64 `json:"difference"`
|
||||
TransactionID *int64 `json:"transaction_id"`
|
||||
Note string `json:"note"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
}
|
||||
Reference in new issue
Block a user