35 lines
551 B
Go
35 lines
551 B
Go
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
|
|
}
|