forked from mtusi2026/mtusi2026lab2
ЛР 2: PostgreSQL, сессии в Valkey, кэш истории (трек 1)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package dto
|
||||
|
||||
import "time"
|
||||
|
||||
type CreateMessageRequest struct {
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
type MessageResponse 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 MessagesPageResponse struct {
|
||||
Items []MessageResponse `json:"items"`
|
||||
NextCursor *string `json:"next_cursor"`
|
||||
}
|
||||
Reference in New Issue
Block a user