aboutsummaryrefslogtreecommitdiff
path: root/api/internal/models
diff options
context:
space:
mode:
Diffstat (limited to 'api/internal/models')
-rw-r--r--api/internal/models/auth.go2
-rw-r--r--api/internal/models/preferences.go8
-rw-r--r--api/internal/models/statistics.go2
-rw-r--r--api/internal/models/user.go2
4 files changed, 7 insertions, 7 deletions
diff --git a/api/internal/models/auth.go b/api/internal/models/auth.go
index 41344d5..fa7dbe4 100644
--- a/api/internal/models/auth.go
+++ b/api/internal/models/auth.go
@@ -3,7 +3,7 @@ package models
3import "time" 3import "time"
4 4
5type Token struct { 5type Token struct {
6 ID int64 `json:"-"` 6 ID int64 `json:"id"`
7 UserID int64 `json:"user_id"` 7 UserID int64 `json:"user_id"`
8 Token string `json:"token"` 8 Token string `json:"token"`
9 CreatedAt time.Time `json:"created_at"` 9 CreatedAt time.Time `json:"created_at"`
diff --git a/api/internal/models/preferences.go b/api/internal/models/preferences.go
index cbbd47c..8022099 100644
--- a/api/internal/models/preferences.go
+++ b/api/internal/models/preferences.go
@@ -1,14 +1,14 @@
1package models 1package models
2 2
3type Preference struct { 3type Preference struct {
4 ID int64 `json:"-"` 4 ID int64 `json:"id"`
5 Color string `json:"color"` 5 Color string `json:"color"`
6 UserID int64 `json:"-"` 6 UserID int64 `json:"user_id"`
7 Size Size `json:"size"` 7 SizeID int64 `json:"size_id"`
8} 8}
9 9
10type Size struct { 10type Size struct {
11 ID int64 `json:"-"` 11 ID int64 `json:"id"`
12 Size int64 `json:"size"` 12 Size int64 `json:"size"`
13 Unit string `json:"unit"` 13 Unit string `json:"unit"`
14} 14}
diff --git a/api/internal/models/statistics.go b/api/internal/models/statistics.go
index 457e6a0..7dceb3a 100644
--- a/api/internal/models/statistics.go
+++ b/api/internal/models/statistics.go
@@ -3,7 +3,7 @@ package models
3import "time" 3import "time"
4 4
5type Statistic struct { 5type Statistic struct {
6 ID int64 `json:"-"` 6 ID int64 `json:"id"`
7 Date time.Time `json:"date"` 7 Date time.Time `json:"date"`
8 User User `json:"user"` 8 User User `json:"user"`
9 Quantity int `json:"quantity"` 9 Quantity int `json:"quantity"`
diff --git a/api/internal/models/user.go b/api/internal/models/user.go
index 2a3e6fd..ca5daa4 100644
--- a/api/internal/models/user.go
+++ b/api/internal/models/user.go
@@ -3,7 +3,7 @@ package models
3import "github.com/google/uuid" 3import "github.com/google/uuid"
4 4
5type User struct { 5type User struct {
6 ID int64 `json:"-"` 6 ID int64 `json:"id"`
7 Name string `json:"name"` 7 Name string `json:"name"`
8 UUID uuid.UUID `json:"uuid"` 8 UUID uuid.UUID `json:"uuid"`
9 Password string `json:"-"` 9 Password string `json:"-"`