lab2 - оценка 4
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
Rakshasa2
2026-10-15 12:52:25 +03:00
parent 65003b6119
commit 84a40ae7ac
16 changed files with 2376 additions and 25 deletions
+34
View File
@@ -0,0 +1,34 @@
package model
import "time"
type User struct {
ID string `json:"id"`
Username string `json:"username"`
DisplayName string `json:"display_name"`
CreatedAt time.Time `json:"created_at"`
PasswordHash string `json:"-"` // Никогда не отдаём в JSON
}
type Chat struct {
ID string `json:"id"`
Title string `json:"title"`
MemberIDs []string `json:"member_ids"`
CreatedAt time.Time `json:"created_at"`
}
type Message struct {
ID string `json:"id"`
ChatID string `json:"chat_id"`
SenderID string `json:"sender_id"`
Text string `json:"text"`
CreatedAt time.Time `json:"created_at"`
}
type Session struct {
ID string `json:"-"`
UserID string `json:"-"`
TokenHash string `json:"-"`
ExpiresAt time.Time `json:"expires_at"`
CreatedAt time.Time `json:"created_at"`
}