Use date_trunc instead of splitting date into year and month

This commit is contained in:
2021-12-08 15:15:35 +00:00
parent c3a022b595
commit 7cb7527704
5 changed files with 36 additions and 45 deletions

View File

@ -25,8 +25,7 @@ type Assignment struct {
}
type AssignmentsByMonth struct {
Year float64
Month float64
Date time.Time
CategoryID uuid.UUID
BudgetID uuid.UUID
Amount int64
@ -68,8 +67,7 @@ type Transaction struct {
}
type TransactionsByMonth struct {
Year float64
Month float64
Date time.Time
CategoryID uuid.NullUUID
BudgetID uuid.UUID
Amount int64