better data structure comments
This commit is contained in:
2 files changed
+3
-3
No files matched your search
+2
-2
@@ -13,7 +13,7 @@ type Cow struct {
|
|||||||
// BookDetails holds the checkout details
|
// BookDetails holds the checkout details
|
||||||
type BookDetails struct {
|
type BookDetails struct {
|
||||||
Author string `json:"author" bson:"Author"` // User who booked
|
Author string `json:"author" bson:"Author"` // User who booked
|
||||||
Devices []string `json:"devices" bson:"Devices"` // Array of device mongo ID's
|
Devices []string `json:"devices" bson:"Devices"` // Array of device ID's
|
||||||
Block string `json:"block" bson:"Block"` // Block that is booked
|
Block string `json:"block" bson:"Block"` // Block that is booked
|
||||||
Date primitive.DateTime `json:"date" bson:"Date"` // Date this booking occurs
|
Date primitive.DateTime `json:"date" bson:"Date"` // Date this booking occurs
|
||||||
}
|
}
|
||||||
@@ -25,5 +25,5 @@ type CowDetails struct {
|
|||||||
Collection string `json:"collection" bson:"Collection"` // eg. Laptop, Ipad, etc
|
Collection string `json:"collection" bson:"Collection"` // eg. Laptop, Ipad, etc
|
||||||
DeviceTotal int `json:"deviceTotal" bson:"DeviceTotal"` // # of devices in that cart collection
|
DeviceTotal int `json:"deviceTotal" bson:"DeviceTotal"` // # of devices in that cart collection
|
||||||
Bookings []BookDetails `json:"bookings" bson:"Bookings"` // An array of all active bookings (send top 10)
|
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
|
Devices []string `json:"devices" bson:"Devices"` // Array of device ID's
|
||||||
}
|
}
|
||||||
+1
-1
@@ -10,5 +10,5 @@ type Device struct {
|
|||||||
type DeviceDetails struct {
|
type DeviceDetails struct {
|
||||||
Type string `json:"type" bson:"Type"` // eg. Laptop, Ipdad, etc
|
Type string `json:"type" bson:"Type"` // eg. Laptop, Ipdad, etc
|
||||||
Name string `json:"name" bson:"Name"` // eg. SULH-LAP-01
|
Name string `json:"name" bson:"Name"` // eg. SULH-LAP-01
|
||||||
Parent string `json:"parent" bson:"Parent"` // Parent cow Mongo ID
|
Parent string `json:"parent" bson:"Parent"` // Parent cow ID
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user