diff options
Diffstat (limited to 'api/internal/models/statistics.go')
-rw-r--r-- | api/internal/models/statistics.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/api/internal/models/statistics.go b/api/internal/models/statistics.go new file mode 100644 index 0000000..7dceb3a --- /dev/null +++ b/api/internal/models/statistics.go | |||
@@ -0,0 +1,26 @@ | |||
1 | package models | ||
2 | |||
3 | import "time" | ||
4 | |||
5 | type Statistic struct { | ||
6 | ID int64 `json:"id"` | ||
7 | Date time.Time `json:"date"` | ||
8 | User User `json:"user"` | ||
9 | Quantity int `json:"quantity"` | ||
10 | } | ||
11 | |||
12 | type StatisticPost struct { | ||
13 | Date time.Time `json:"date"` | ||
14 | Quantity int64 `json:"quantity"` | ||
15 | UserID int64 `json:"user_id"` | ||
16 | } | ||
17 | |||
18 | type WeeklyStatistic struct { | ||
19 | Date string `json:"date"` | ||
20 | Total int64 `json:"total"` | ||
21 | } | ||
22 | |||
23 | type DailyUserTotals struct { | ||
24 | Name string `json:"name"` | ||
25 | Total int64 `json:"total"` | ||
26 | } | ||