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,41 @@
|
||||
package model
|
||||
|
||||
type Budget struct {
|
||||
ID int64 `json:"id"`
|
||||
Year int `json:"year"`
|
||||
Month *int `json:"month"`
|
||||
CategoryID *int64 `json:"category_id"`
|
||||
CategoryName string `json:"category_name"`
|
||||
CategoryType string `json:"category_type"`
|
||||
Amount int64 `json:"amount"`
|
||||
Spent int64 `json:"spent"`
|
||||
Remaining int64 `json:"remaining"`
|
||||
UsagePercent float64 `json:"usage_percent"`
|
||||
Note string `json:"note"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
type UpsertBudgetRequest struct {
|
||||
Year int `json:"year"`
|
||||
Month *int `json:"month"`
|
||||
CategoryID *int64 `json:"category_id"`
|
||||
Amount int64 `json:"amount"`
|
||||
Note string `json:"note"`
|
||||
}
|
||||
|
||||
type BudgetOverview struct {
|
||||
Year int `json:"year"`
|
||||
Month int `json:"month"`
|
||||
AnnualBudget int64 `json:"annual_budget"`
|
||||
AnnualSpent int64 `json:"annual_spent"`
|
||||
AnnualRemaining int64 `json:"annual_remaining"`
|
||||
AnnualUsagePercent float64 `json:"annual_usage_percent"`
|
||||
MonthlyBudget int64 `json:"monthly_budget"`
|
||||
MonthlySpent int64 `json:"monthly_spent"`
|
||||
MonthlyBudgetedSpent int64 `json:"monthly_budgeted_spent"`
|
||||
MonthlyUnbudgetedSpent int64 `json:"monthly_unbudgeted_spent"`
|
||||
MonthlyRemaining int64 `json:"monthly_remaining"`
|
||||
MonthlyUsagePercent float64 `json:"monthly_usage_percent"`
|
||||
Items []Budget `json:"items"`
|
||||
}
|
||||
Reference in new issue
Block a user