57 lines
1.4 KiB
Go
57 lines
1.4 KiB
Go
package model
|
|
|
|
import "go.mongodb.org/mongo-driver/bson/primitive"
|
|
|
|
// FilePhoto ...
|
|
type FilePhoto struct {
|
|
ID string `json:"_id"`
|
|
Name string `json:"name,omitempty"`
|
|
Dimensions *FileDimensions `json:"dimensions"`
|
|
}
|
|
|
|
// FileSize ...
|
|
type FileSize struct {
|
|
Width int `json:"width"`
|
|
Height int `json:"height"`
|
|
URL string `json:"url"`
|
|
}
|
|
|
|
// FileDimensions ...
|
|
type FileDimensions struct {
|
|
Small *FileSize `json:"sm"`
|
|
Medium *FileSize `json:"md"`
|
|
}
|
|
|
|
// ListPhoto ...
|
|
type ListPhoto []*FilePhoto
|
|
|
|
// Video ...
|
|
type Video struct {
|
|
ID primitive.ObjectID `json:"_id"`
|
|
Name string `json:"name"`
|
|
Dimensions *FileVideoDimensions `json:"dimensions"`
|
|
VideoExtension string `json:"ext"`
|
|
Thumbnail *FilePhoto `json:"thumbnail"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
// FileVideoDimensions ...
|
|
type FileVideoDimensions struct {
|
|
Dimension480p *FileVideoSize `json:"size480p"`
|
|
Dimension720p *FileVideoSize `json:"size720p"`
|
|
Dimension1080p *FileVideoSize `json:"size1080p"`
|
|
DimensionOriginal *FileVideoSize `json:"original"`
|
|
}
|
|
|
|
// FileVideoSize ...
|
|
type FileVideoSize struct {
|
|
Name string `json:"name"`
|
|
Width int `json:"width"`
|
|
Height int `json:"height"`
|
|
Size string `json:"size"`
|
|
URL string `json:"url"`
|
|
}
|
|
|
|
// ListVideo ...
|
|
type ListVideo []Video
|