feat(dashboard): #163 first summary
This commit was merged in pull request #181.
This commit is contained in:
26
internal/types/dashboard.go
Normal file
26
internal/types/dashboard.go
Normal file
@@ -0,0 +1,26 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user