Files
mtusi2026lab6/service/internal/dto/message.go
T
2026-11-17 13:08:13 +03:00

46 lines
775 B
Go

package dto
import (
"time"
"github.com/google/uuid"
)
type Message struct {
AttachmentIDs []uuid.UUID
ID uuid.UUID
ChatID uuid.UUID
SenderID uuid.UUID
Text string
CreatedAt time.Time
}
type CreateMessage struct {
AttachmentIDs []uuid.UUID
IdempotencyKey string
ChatID uuid.UUID
SenderID uuid.UUID
Text string
}
type MessageFilters struct {
ChatID uuid.UUID
UserID uuid.UUID
Limit *int
AfterID *uuid.UUID
}
// MessageAttachment contains only the data needed to authorize linking an attachment.
type MessageAttachment struct {
ID uuid.UUID
ChatID uuid.UUID
Missing bool
Status string
}
type MessageReplay struct {
Hash []byte
HashVersion int
MessageID uuid.UUID
}