update responses and add query search endpoint
This commit is contained in:
4 files changed
+59
-19
No files matched your search
+9
-9
@@ -12,18 +12,18 @@ type Cow struct {
|
||||
|
||||
// BookDetails holds the checkout details
|
||||
type BookDetails struct {
|
||||
Author string `json:"Author" bson:"Author"` // User who booked
|
||||
Devices []string `json:"Devices" bson:"Devices"` // Array of device mongo ID's
|
||||
Block string `json:"Block" bson:"Block"` // Block that is booked
|
||||
Date primitive.DateTime `json:"Date" bson:"Date"` // Date this booking occurs
|
||||
Author string `json:"author" bson:"author"` // User who booked
|
||||
Devices []string `json:"devices" bson:"devices"` // Array of device mongo ID's
|
||||
Block string `json:"block" bson:"block"` // Block that is booked
|
||||
Date primitive.DateTime `json:"date" bson:"date"` // Date this booking occurs
|
||||
}
|
||||
|
||||
// CowDetails holds the structure for the inner cow structure as
|
||||
// defined in the cow collection in mongo
|
||||
type CowDetails struct {
|
||||
CowCode string `json:"CowCode" bson:"CowCode"` // eg. CA-01
|
||||
CollectionType string `json:"CollectionType" bson:"CollectionType"` // eg. Laptop, Ipad, etc
|
||||
TotalDevices int `json:"TotalDevices" bson:"TotalDevices"` // # of devices in that cart collection
|
||||
Bookings []BookDetails `json:"Bookings" bson:"Bookings"` // An array of all active bookings (send top 10)
|
||||
Devices []string `json:"Devices" bson:"Devices"` // Array of device mongo ID's
|
||||
Name string `json:"name" bson:"name"` // eg. CA-01
|
||||
Collection string `json:"collection" bson:"collection"` // eg. Laptop, Ipad, etc
|
||||
TotalDevices int `json:"totalDevices" bson:"totalDevices"` // # of devices in that cart collection
|
||||
Bookings []BookDetails `json:"bookings" bson:"bookings"` // An array of all active bookings (send top 10)
|
||||
Devices []string `json:"devices" bson:"devices"` // Array of device mongo ID's
|
||||
}
|
||||
Reference in new issue
Block a user