note

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PackBriefItem

func PackBriefItem(item *BriefNoteItem) miknas.H

func PackNoteAttach

func PackNoteAttach(attach *NoteAttach) miknas.H

func PackNoteFolder

func PackNoteFolder(folder *NoteFolder) miknas.H

func PackNoteItem

func PackNoteItem(item *NoteItem) miknas.H

Types

type BriefNoteItem

type BriefNoteItem struct {
	ID     uint
	Folder uint
	Title  string
}

简约数据

type MikNasExt

type MikNasExt struct {
	miknas.Extension
}

func New

func New() *MikNasExt

func (*MikNasExt) OnBind

func (ext *MikNasExt) OnBind()

func (*MikNasExt) OnInit

func (ext *MikNasExt) OnInit()

type NoteAttach

type NoteAttach struct {
	miknas.PrimaryUintModel
	NoteItemID uint
	Uid        string `gorm:"index;size:64"`
	Type       string
	Data       string //json
}

func GetAttachById

func GetAttachById(db *gorm.DB, id uint) *NoteAttach

type NoteFolder

type NoteFolder struct {
	miknas.PrimaryUintModel
	Uid    string `gorm:"index;size:64"`
	Name   string `gorm:"size:255"`
	Parent uint   `gorm:"index"`
}

func GetFolderById

func GetFolderById(db *gorm.DB, id uint) *NoteFolder

func GetSubFolderByName

func GetSubFolderByName(db *gorm.DB, parent uint, name string) *NoteFolder

type NoteItem

type NoteItem struct {
	miknas.PrimaryUintModel
	Folder      uint
	Uid         string `gorm:"index;size:64"`
	Title       string
	Content     string
	NoteAttachs []NoteAttach // has many
}

func GetItemById

func GetItemById(db *gorm.DB, id uint, preloadAttach bool) *NoteItem

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL