Files
spend-sparrow/internal/types/dashboard.go
Tim Wundenberg b0f9719762
Some checks failed
Build Docker Image / Build-Docker-Image (push) Has been cancelled
feat(dashboard): #163 first summary
2025-06-15 22:03:47 +02:00

27 lines
755 B
Go

package types
import "time"
// Account | TreasureChest | Value | Description
// --------|---------------|-------|----------------
// Y | Y | + | Invalid
// Y | Y | - | Expense
// Y | N | + | Deposit
// Y | N | - | Withdrawal (for moving between accounts)
// N | Y | + | Saving
// N | Y | - | Withdrawal (for moving between treasure chests)
// N | N | + | Invalid
// N | N | - | Invalid
type DashboardMonthlySummary struct {
Month time.Time
// Sum of all Transactions with TreasureChests and no Accounts
Savings int64
// Sum of all Transactions with Accounts and no TreasureChests
Income int64
// Sum of all Transactions with Accounts and TreasureChests
Expenses int64
// Income - Expenses
Total int64
}