From 91590ade7201e6d5b5f72a46e8fb0e12a9b43ec1 Mon Sep 17 00:00:00 2001 From: qowevisa Date: Fri, 29 Nov 2024 20:58:56 +0200 Subject: [PATCH] Add StatsType and StatsTypeCurrencyChart structs to types package --- types/types.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/types/types.go b/types/types.go index fdb3f53..7d29ac6 100644 --- a/types/types.go +++ b/types/types.go @@ -180,3 +180,20 @@ type DbItemBought struct { MetricValue uint64 `json:"metric_value" example:"100"` Item DbItem `json:"itme"` } + +// User Spendings that are connected by types: +// +// -- DbExpense +// -- DbItemBought -> DbItem +type StatsType struct { + Value uint64 `json:"value" example:"20015"` + Name string `json:"name" example:"Meat"` + Color string `json:"color" example:"#1e2e3e"` +} + +// Contains a number of StatsType +// StatsTypeCurrencyChart is like a struct for chart with specific Currency bound +type StatsTypeCurrencyChart struct { + CurrencyLabel string `json:"label" example:"$ (USD)"` + Elements []StatsType `json:"elements"` +}