init
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
package media
|
||||
|
||||
import "github.com/google/uuid"
|
||||
|
||||
const (
|
||||
StatusUploading = "UPLOADING"
|
||||
StatusProcessing = "PROCESSING"
|
||||
StatusReady = "READY"
|
||||
StatusFailed = "FAILED"
|
||||
)
|
||||
|
||||
type Record struct {
|
||||
ID uuid.UUID
|
||||
GalleryID uuid.UUID
|
||||
OriginalFilename string
|
||||
MimeType string
|
||||
FileSize int64
|
||||
StorageKey string
|
||||
ExternalURL string
|
||||
ThumbnailKey string
|
||||
PreviewKey string
|
||||
ProcessingStatus string
|
||||
ProcessingError string
|
||||
Width int
|
||||
Height int
|
||||
DurationSeconds float64
|
||||
SortOrder int
|
||||
CreatedAt string
|
||||
UpdatedAt string
|
||||
}
|
||||
|
||||
type Public struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
OriginalFilename string `json:"originalFilename"`
|
||||
MimeType string `json:"mimeType"`
|
||||
FileSize int64 `json:"fileSize"`
|
||||
ProcessingStatus string `json:"processingStatus"`
|
||||
Width int `json:"width,omitempty"`
|
||||
Height int `json:"height,omitempty"`
|
||||
DurationSeconds float64 `json:"durationSeconds,omitempty"`
|
||||
SortOrder int `json:"sortOrder"`
|
||||
ThumbnailURL string `json:"thumbnailUrl,omitempty"`
|
||||
PreviewURL string `json:"previewUrl,omitempty"`
|
||||
OriginalURL string `json:"originalUrl,omitempty"`
|
||||
Favorited bool `json:"favorited"`
|
||||
}
|
||||
Reference in New Issue
Block a user