forked from mtusi2026/mtusi2026lab6
Реализация на 5
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user