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

This commit is contained in:
Grbisba
2026-11-17 13:08:13 +03:00
parent 470d9d6f1e
commit 60f48c0337
229 changed files with 74928 additions and 47 deletions
+48
View File
@@ -0,0 +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
}