From f32375488f5127c910021f627d83e017c5c7a10f Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Tue, 19 Nov 2024 17:15:02 +0300 Subject: Feat: add storage interface; add sqlite impl --- models/db.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 models/db.go (limited to 'models/db.go') 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"` +} -- cgit v1.2.3