mirror of
https://github.com/Unkn0wnCat/matrix-veles.git
synced 2025-08-03 00:28:50 +02:00
Initial commit
This commit is contained in:
commit
b81af24e50
21 changed files with 2283 additions and 0 deletions
21
internal/db/model/entry.go
Normal file
21
internal/db/model/entry.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"time"
|
||||
)
|
||||
|
||||
type DBEntry struct {
|
||||
ID primitive.ObjectID `bson:"_id" json:"id"`
|
||||
Tags []string `bson:"tags" json:"tags"`
|
||||
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 []*DBEntryComment `bson:"comments" json:"comments"`
|
||||
}
|
||||
|
||||
type DBEntryComment struct {
|
||||
CommentedBy *primitive.ObjectID `bson:"commented_by" json:"commented_by"`
|
||||
Content string `bson:"content" json:"content"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue