natsio/model.go

45 lines
772 B
Go
Raw Normal View History

2022-12-04 17:09:25 +00:00
package natsio
import "go.mongodb.org/mongo-driver/bson/primitive"
2022-12-21 04:38:29 +00:00
//
// Common
//
type IDAndName struct {
ID string `json:"_id"`
Name string `json:"name"`
}
2022-12-18 03:56:37 +00:00
//
// USER
//
type User struct {
ID primitive.ObjectID `json:"_id"`
Name string `json:"name"`
2022-12-18 03:56:55 +00:00
Type string `json:"type"`
2022-12-18 03:56:37 +00:00
Avatar *FilePhoto `json:"avatar"`
}
//
// FILE PHOTO
//
2022-12-04 17:09:25 +00:00
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"`
}