From e9ff4e2f3b6736635e4dca8c9131683da25d7bb8 Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Wed, 28 Sep 2022 20:18:27 -0700 Subject: [PATCH] better data structure comments --- models/cow.go | 4 ++-- models/device.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/models/cow.go b/models/cow.go index 7f5e380..6734e5f 100644 --- a/models/cow.go +++ b/models/cow.go @@ -13,7 +13,7 @@ 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 + Devices []string `json:"devices" bson:"Devices"` // Array of device ID's Block string `json:"block" bson:"Block"` // Block that is booked 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 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) - Devices []string `json:"devices" bson:"Devices"` // Array of device mongo ID's + Devices []string `json:"devices" bson:"Devices"` // Array of device ID's } diff --git a/models/device.go b/models/device.go index ce0f09f..40b2657 100644 --- a/models/device.go +++ b/models/device.go @@ -10,5 +10,5 @@ type Device struct { type DeviceDetails struct { Type string `json:"type" bson:"Type"` // eg. Laptop, Ipdad, etc 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 }