feat: recurring expenses and reports
This commit is contained in:
parent
cda4f61939
commit
9e6ff67a87
23 changed files with 2943 additions and 56 deletions
23
internal/model/report.go
Normal file
23
internal/model/report.go
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type DailySpending struct {
|
||||
Date time.Time `db:"date"`
|
||||
TotalCents int `db:"total_cents"`
|
||||
}
|
||||
|
||||
type MonthlySpending struct {
|
||||
Month string `db:"month"`
|
||||
TotalCents int `db:"total_cents"`
|
||||
}
|
||||
|
||||
type SpendingReport struct {
|
||||
ByTag []*TagExpenseSummary
|
||||
DailySpending []*DailySpending
|
||||
MonthlySpending []*MonthlySpending
|
||||
TopExpenses []*ExpenseWithTagsAndMethod
|
||||
TotalIncome int
|
||||
TotalExpenses int
|
||||
NetBalance int
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue