B: Some more comments

This commit is contained in:
Preston Baxter 2023-11-14 12:58:08 -06:00
parent 4079ff16a6
commit abac8d7822
1 changed files with 6 additions and 0 deletions

View File

@ -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()
}