Add entry API endpoints

This commit is contained in:
Kevin Kandlbinder 2022-03-01 13:17:17 +01:00
parent c8d1c33cb4
commit 1e071ffed4
8 changed files with 325 additions and 31 deletions

View file

@ -1,8 +1,12 @@
package model
import "go.mongodb.org/mongo-driver/bson/primitive"
import (
"go.mongodb.org/mongo-driver/bson/primitive"
"time"
)
type DBComment struct {
Timestamp time.Time `bson:"timestamp" json:"timestamp"`
CommentedBy *primitive.ObjectID `bson:"commented_by" json:"commented_by"` // CommentedBy contains a reference to the user who commented
Content string `bson:"content" json:"content"` // Content is the body of the comment
}