note_meta

package
v0.0.0-...-443efec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 3 Imported by: 0

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"`
	IsShare   bool      `bson:"is_share"`
	ShareID   string    `bson:"share_id,omitempty"`
	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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳