From c08a83558b9f9852e54022d576ea46cb3fbb0082 Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Wed, 28 Sep 2022 10:23:28 -0700 Subject: [PATCH] update device data structre --- models/device.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/models/device.go b/models/device.go index 4021945..634a935 100644 --- a/models/device.go +++ b/models/device.go @@ -1,8 +1,13 @@ package models -// Device holds the structure for the Device collection in mongo +// Device holds the structure for the device collection in mongo type Device struct { - ID string `json:"ID" bson:"ID"` // MongoDB ID + ID string `json:"_id" bson:"_id"` // MongoDB ID + Details DeviceDetails `json:"device" bson:"device"` // Details +} + +// Device holds the structure for the Device collection in mongo +type DeviceDetails struct { Type string `json:"Type" bson:"Type"` // eg. Laptop, Ipdad, etc Code string `json:"Code" bson:"Code"` // eg. SULH-LAP-01 Parent string `json:"Parent" bson:"Parent"` // Parent cow Mongo ID