forked from mtusi2026/mtusi2026lab2
ЛР 2 — БВТ2303 — Брезгунова — на 5
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type UUID string
|
||||
|
||||
type User struct {
|
||||
ID UUID `json:"id"`
|
||||
Username string `json:"username"`
|
||||
DisplayName string `json:"display_name"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type Chat struct {
|
||||
ID UUID `json:"id"`
|
||||
Title string `json:"title"`
|
||||
MemberIDs []UUID `json:"member_ids"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
ID UUID `json:"id"`
|
||||
ChatID UUID `json:"chat_id"`
|
||||
SenderID UUID `json:"sender_id"`
|
||||
Text string `json:"text"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
Reference in New Issue
Block a user