From abac8d78224267f1d0ef99bc357bfb0dc7880bcd Mon Sep 17 00:00:00 2001 From: Preston Baxter Date: Tue, 14 Nov 2023 12:58:08 -0600 Subject: [PATCH] B: Some more comments --- ui/db/db.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/db/db.go b/ui/db/db.go index 8661909..32abd66 100644 --- a/ui/db/db.go +++ b/ui/db/db.go @@ -11,8 +11,14 @@ import ( "go.mongodb.org/mongo-driver/mongo/options" ) +//Interface for any object that wants to take advantage of the DB package type Model interface { + + //Should return the _id field of the object if it exits + //if it is new it should generate a new objectId MongoId() primitive.ObjectID + + //It is expected that this will update the CommonFields part of the model UpdateObjectInfo() }