Create auth API & comment code

This commit is contained in:
Kevin Kandlbinder 2022-02-23 18:58:46 +01:00
parent 1b15b12859
commit c8d1c33cb4
17 changed files with 475 additions and 101 deletions

View file

@ -7,11 +7,11 @@ import (
type DBEntry struct {
ID primitive.ObjectID `bson:"_id" json:"id"`
Tags []string `bson:"tags" json:"tags"`
PartOf []*primitive.ObjectID `bson:"part_of" json:"part_of"`
HashValue string `bson:"hash_value" json:"hash"`
FileURL string `bson:"file_url" json:"file_url"`
Timestamp time.Time `bson:"timestamp" json:"timestamp"`
AddedBy *primitive.ObjectID `bson:"added_by" json:"added_by"`
Comments []*DBComment `bson:"comments" json:"comments"`
Tags []string `bson:"tags" json:"tags"` // Tags used for searching entries and ordering
PartOf []*primitive.ObjectID `bson:"part_of" json:"part_of"` // PartOf specifies the lists this entry is part of
HashValue string `bson:"hash_value" json:"hash"` // HashValue is the SHA512-hash of the file
FileURL string `bson:"file_url" json:"file_url"` // FileURL may be set to a file link
Timestamp time.Time `bson:"timestamp" json:"timestamp"` // Timestamp of when this entry was added
AddedBy *primitive.ObjectID `bson:"added_by" json:"added_by"` // AddedBy is a reference to the user who added this
Comments []*DBComment `bson:"comments" json:"comments"` // Comments regarding this entry
}