aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/db/models.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-07-28 13:03:17 +0900
committernsfisis <nsfisis@gmail.com>2024-07-28 13:03:17 +0900
commit1520f8c87a4ab9ff4bd2e8af6debf8f361e0582e (patch)
tree40babf2259e904b08346bd426b62a99e268cf801 /backend/db/models.go
parent90741e8336b4ffba090bf08c3b899992860e2d98 (diff)
downloadphperkaigi-2025-albatross-1520f8c87a4ab9ff4bd2e8af6debf8f361e0582e.tar.gz
phperkaigi-2025-albatross-1520f8c87a4ab9ff4bd2e8af6debf8f361e0582e.tar.zst
phperkaigi-2025-albatross-1520f8c87a4ab9ff4bd2e8af6debf8f361e0582e.zip
feat(backend): change games table and create problems table
Diffstat (limited to 'backend/db/models.go')
-rw-r--r--backend/db/models.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/backend/db/models.go b/backend/db/models.go
index a54fd8c..e60cb8a 100644
--- a/backend/db/models.go
+++ b/backend/db/models.go
@@ -9,10 +9,19 @@ import (
)
type Game struct {
- GameID int32
- Type string
- CreatedAt pgtype.Timestamp
- State string
+ GameID int32
+ State string
+ DisplayName string
+ DurationSeconds int32
+ CreatedAt pgtype.Timestamp
+ StartedAt pgtype.Timestamp
+ ProblemID pgtype.Int4
+}
+
+type Problem struct {
+ ProblemID int32
+ Title string
+ Description string
}
type User struct {