summaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2024-11-19 17:15:02 +0300
committerGrail Finder <wohilas@gmail.com>2024-11-19 17:15:02 +0300
commitf32375488f5127c910021f627d83e017c5c7a10f (patch)
tree5a697ca8a42e3651fa57ea346af223b67f3e3a3a /models
parentd3cc8774b13a0c8e9fbf11947b9caca216595a8d (diff)
Feat: add storage interface; add sqlite impl
Diffstat (limited to 'models')
-rw-r--r--models/db.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/models/db.go b/models/db.go
new file mode 100644
index 0000000..24bef41
--- /dev/null
+++ b/models/db.go
@@ -0,0 +1,11 @@
+package models
+
+import "time"
+
+type Chat struct {
+ ID uint32 `db:"id" json:"id"`
+ Name string `db:"name" json:"name"`
+ Msgs string `db:"msgs" json:"msgs"` // []MessagesStory to string json
+ CreatedAt time.Time `db:"created_at" json:"created_at"`
+ UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
+}