From 11247a81c17288c22d8c0e57059c849af1f41feb Mon Sep 17 00:00:00 2001 From: Nam Huynh Date: Mon, 5 Dec 2022 00:09:25 +0700 Subject: [PATCH] add model FilePhoto --- model.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 model.go diff --git a/model.go b/model.go new file mode 100644 index 0000000..7ae43fb --- /dev/null +++ b/model.go @@ -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"` +}