forked from mtusi2026/mtusi2026lab4
34 lines
880 B
Go
34 lines
880 B
Go
package dto
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// Attachment contains private persistence metadata and the public file description.
|
|
type Attachment struct {
|
|
// ID identifies the immutable upload.
|
|
ID uuid.UUID
|
|
// ChatID defines the authorization scope.
|
|
ChatID uuid.UUID
|
|
// OwnerID identifies the uploader.
|
|
OwnerID uuid.UUID
|
|
// Filename is display-only and never an object path.
|
|
Filename string
|
|
// ContentType is validated against decoded bytes.
|
|
ContentType string
|
|
// SizeBytes is the original encoded length.
|
|
SizeBytes int64
|
|
// SHA256 is the lowercase original checksum.
|
|
SHA256 string
|
|
// Status is the durable upload state.
|
|
Status string
|
|
// ObjectKey is private and must not reach HTTP responses.
|
|
ObjectKey string
|
|
// CreatedAt is the reservation timestamp.
|
|
CreatedAt time.Time
|
|
// UpdatedAt is the latest durable transition.
|
|
UpdatedAt time.Time
|
|
}
|