package domain import "time" type Chat struct { ID int `json:"id"` User1ID int `json:"user1Id"` User2ID int `json:"user2Id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` LastMessage *Message `json:"lastMessage"` } type Message struct { ID int `json:"id"` ChatID int `json:"chatId"` SenderID int `json:"senderId"` ReceiverID int `json:"receiverId"` Content string `json:"content"` Status string `json:"status"` // "sent", "delivered", "read" CreatedAt time.Time `json:"createdAt"` } type ChatSession struct { User *User `json:"user"` LastMessage *Message `json:"lastMessage"` UnreadCount int `json:"unreadCount"` }