diff options
Diffstat (limited to 'internal/models/models.go')
-rw-r--r-- | internal/models/models.go | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/internal/models/models.go b/internal/models/models.go index a2b3628..bd38eaf 100644 --- a/internal/models/models.go +++ b/internal/models/models.go @@ -11,19 +11,22 @@ const ( type ( UserScore struct { - Username string - Actions []*Action - BurnTime time.Time - Score int8 + ID uint32 `db:"id"` + Username string `db:"username"` + Actions []Action + BurnTime time.Time `db:"burn_time"` + Score int8 `db:"score"` + CreatedAt time.Time `db:"created_at"` } Action struct { - ID uint32 - Name string - Magnitude uint8 - Repeatable bool - Type ActionType - Done bool - Username string + ID uint32 `db:"id"` + Name string `db:"name"` + Magnitude uint8 `db:"magnitude"` + Repeatable bool `db:"repeatable"` + Type ActionType `db:"type"` + Done bool `db:"done"` + Username string `db:"username"` + CreatedAt time.Time `db:"created_at"` } ) |