Реализация на 5

This commit is contained in:
Grbisba
2026-11-13 12:48:18 +03:00
parent ce035c8528
commit 2198368a44
60 changed files with 3253 additions and 181 deletions
+47
View File
@@ -1 +1,48 @@
package dto
import (
"gitea.privcloud.tech/mtusi2026/internal/gen/contracts"
"github.com/google/uuid"
"io"
"time"
)
type AttachmentRecord struct {
Public contracts.Attachment
Key string
StagingKey string
PipelineVersion int
VariantKeys map[string]string
Missing bool
}
type UploadAttachment struct {
UserID, ChatID uuid.UUID
Filename, ContentType string
Body io.Reader
}
type AttachmentContent struct {
Body io.ReadCloser
ContentType string
Size int64
}
type JobMessage struct {
Traceparent string `json:"traceparent,omitempty"`
Tracestate string `json:"tracestate,omitempty"`
SchemaVersion int `json:"schema_version"`
JobID uuid.UUID `json:"job_id"`
Type string `json:"type"`
AttachmentID uuid.UUID `json:"attachment_id"`
PipelineVersion int `json:"pipeline_version"`
Attempt int `json:"attempt"`
CreatedAt time.Time `json:"created_at"`
}
type AttachmentJob struct {
Message JobMessage
State string
Token uuid.UUID
LeaseUntil *time.Time
NextAttemptAt time.Time
AttemptLimit int
ErrorCode *string
UpdatedAt time.Time
}
+7
View File
@@ -35,4 +35,11 @@ type MessageAttachment struct {
ID uuid.UUID
ChatID uuid.UUID
Missing bool
Status string
}
type MessageReplay struct {
Hash []byte
HashVersion int
MessageID uuid.UUID
}