aboutsummaryrefslogtreecommitdiff
path: root/api/internal/models/statistics.go
diff options
context:
space:
mode:
authorzberwaldt <17715430+zberwaldt@users.noreply.github.com>2024-03-15 22:03:11 -0400
committerGitHub <noreply@github.com>2024-03-15 22:03:11 -0400
commit6f8cfbd6cc3d5adbda38e74013c68e3d4745766d (patch)
treeb3f045cd06d6622e23441b442e8f3861050ed444 /api/internal/models/statistics.go
parentfac21fa0a72d4a7f1a01ccd44e3acf9c90fd95bd (diff)
parentfd1332a3df191577e91c6d846a8b5db1747099fd (diff)
Merge pull request #1 from zberwaldt/staging
Staging to Prod
Diffstat (limited to 'api/internal/models/statistics.go')
-rw-r--r--api/internal/models/statistics.go26
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 @@
1package models
2
3import "time"
4
5type 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
12type StatisticPost struct {
13 Date time.Time `json:"date"`
14 Quantity int64 `json:"quantity"`
15 UserID int64 `json:"user_id"`
16}
17
18type WeeklyStatistic struct {
19 Date string `json:"date"`
20 Total int64 `json:"total"`
21}
22
23type DailyUserTotals struct {
24 Name string `json:"name"`
25 Total int64 `json:"total"`
26}