feat(attachments): add upload, metadata and content endpoints

This commit is contained in:
kk10
2026-11-02 22:21:07 +03:00
parent 42ddd2cad9
commit 759986f642
7 changed files with 454 additions and 1 deletions
+34
View File
@@ -0,0 +1,34 @@
package model
import (
"time"
"github.com/google/uuid"
)
type ContentType string
const (
ContentTypePNG ContentType = "image/png"
ContentTypeJPEG ContentType = "image/jpeg"
)
type AttachmentStatus string
const (
AttachmentStatusReady AttachmentStatus = "ready"
)
type Attachment struct {
ID uuid.UUID
ChatID uuid.UUID
OwnerID uuid.UUID
Filename string
ContentType ContentType
SizeBytes int
Sha256 string
Status AttachmentStatus
ErrorCode *string
CreatedAt time.Time
UpdatedAt time.Time
}