madipo2611 a5a90bed7e v0.0.1
2025-04-28 15:14:02 +03:00

29 lines
719 B
Go

package domain
import "time"
type Chat struct {
ID int `json:"id"`
User1ID int `json:"user1Id"`
User2ID int `json:"user2Id"`
CreatedAt time.Time `json:"createdAt"`
}
type Message struct {
ID int `json:"id"`
ChatID int `json:"chatId"`
SenderID int `json:"senderId"`
Content string `json:"content"`
Status string `json:"status"` // "sent", "delivered", "read"
CreatedAt time.Time `json:"createdAt"`
}
type WSMessage struct {
Type string `json:"type"`
MessageID int `json:"messageId"`
ChatID int `json:"chatId"`
SenderID int `json:"senderId"`
Content string `json:"content"`
Recipient int `json:"recipient"`
}