feat(domain):lab4 add attachments, status, errors

This commit is contained in:
Голиков Maximillian Антон
2026-10-19 10:25:52 +03:00
parent 4441156621
commit 200615f5ba
4 changed files with 61 additions and 8 deletions
+29 -5
View File
@@ -22,11 +22,12 @@ type Chat struct {
}
type Message struct {
ID string
ChatID string
SenderID string
Text string
CreatedAt time.Time
ID string
ChatID string
SenderID string
Text string
AttachmentIDs []string
CreatedAt time.Time
}
type Session struct {
@@ -35,3 +36,26 @@ type Session struct {
ExpiresAt time.Time
CreatedAt time.Time
}
type AttachmentStatus string
const (
AttachmentStatusPending AttachmentStatus = "pending"
AttachmentStatusReady AttachmentStatus = "ready"
AttachmentStatusFailed AttachmentStatus = "failed"
)
type Attachment struct {
ID string
ChatID string
OwnerID string
Filename string
ContentType string
SizeBytes int64
SHA256 []byte
ObjectKey string
Status AttachmentStatus
ErrorCode *string
CreatedAt time.Time
UpdatedAt time.Time
}