36 lines
675 B
Go
36 lines
675 B
Go
package natsio
|
|
|
|
import "go.mongodb.org/mongo-driver/bson/primitive"
|
|
|
|
//
|
|
// USER
|
|
//
|
|
|
|
type User struct {
|
|
ID primitive.ObjectID `json:"_id"`
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
Avatar *FilePhoto `json:"avatar"`
|
|
}
|
|
|
|
//
|
|
// FILE PHOTO
|
|
//
|
|
|
|
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"`
|
|
}
|