Documentation
¶
Index ¶
Constants ¶
View Source
const ( NoteMetaIDField = "_id" NoteMetaUserIDField = "user_id" NoteMetaCreatedAtField = "created_at" NoteMetaNoteIDField = "note_id" )
View Source
const NoteMetaCollection = "note_meta"
Variables ¶
This section is empty.
Functions ¶
func InsertNoteMeta ¶
func InsertNoteMeta(ctx *biz_context.BizContext, noteMeta *NoteMeta) error
func UpdateNoteMeta ¶
func UpdateNoteMeta(ctx *biz_context.BizContext, noteMeta *NoteMeta) error
Types ¶
type NoteMeta ¶
type NoteMeta struct { ID string `bson:"_id"` UserID string `bson:"user_id"` Title string `bson:"title"` Type string `bson:"type"` // markdown/mindmap/table etc NoteID string `bson:"note_id"` // 指向具体内容的ID Version int64 `bson:"version"` Tags []string `bson:"tags,omitempty"` CreatedAt time.Time `bson:"created_at"` UpdatedAt time.Time `bson:"updated_at"` }
func GetNoteMetaByNoteIDAndUserID ¶
func GetNoteMetaByNoteIDAndUserID(ctx *biz_context.BizContext, noteID string, userID string) (*NoteMeta, error)
func ListNoteMetas ¶
func ListNoteMetas(ctx *biz_context.BizContext, userID string, page, pageSize int64) ([]*NoteMeta, error)
Click to show internal directories.
Click to hide internal directories.