add model FilePhoto

This commit is contained in:
Nam Huynh 2022-12-05 00:09:25 +07:00
parent 930f4a0020
commit 11247a81c1
1 changed files with 20 additions and 0 deletions

20
model.go Normal file
View File

@ -0,0 +1,20 @@
package natsio
import "go.mongodb.org/mongo-driver/bson/primitive"
type FilePhoto struct {
ID primitive.ObjectID `json:"_id"`
Name string `json:"name"`
Dimensions *FileDimensions `json:"dimensions"`
}
type FileSize struct {
Width int `json:"width"`
Height int `json:"height"`
URL string `json:"url,omitempty"`
}
type FileDimensions struct {
Small *FileSize `json:"sm"`
Medium *FileSize `json:"md"`
}