mirror of
https://github.com/Unkn0wnCat/matrix-veles.git
synced 2025-04-28 09:46:51 +02:00
24 lines
567 B
Go
24 lines
567 B
Go
package model
|
|
|
|
import (
|
|
"github.com/Unkn0wnCat/matrix-veles/internal/db/model"
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
)
|
|
|
|
type List struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Tags []string `json:"tags"`
|
|
RawComments []*model.DBComment
|
|
MaintainerIDs []*primitive.ObjectID
|
|
}
|
|
|
|
func MakeList(dbList *model.DBHashList) *List {
|
|
return &List{
|
|
ID: dbList.ID.Hex(),
|
|
Name: dbList.Name,
|
|
Tags: dbList.Tags,
|
|
RawComments: dbList.Comments,
|
|
MaintainerIDs: dbList.Maintainers,
|
|
}
|
|
}
|