Files
mtusi2026lab2/models/models.go
T

28 lines
619 B
Go

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"`
}