feat: v3 增强 - FTS5全文搜索+双向链接/知识图谱+自动保存草稿+标签管理+实时预览编辑器+PWA
- FTS5中文分词搜索(需-tags=sqlite_fts5) - [[wiki链接]]反向链接+SVG知识图谱 - 自动保存草稿(不触发版本历史) - 标签重命名/合并/删除+使用统计 - 后台编辑实时预览+格式工具栏 - PWA manifest+service worker+移动端适配 - 冒烟测试扩至66例全通过
This commit is contained in:
@@ -59,6 +59,7 @@ type Note struct {
|
||||
ID uint `json:"id" gorm:"primaryKey"`
|
||||
Title string `json:"title" gorm:"size:255;not null"`
|
||||
Content string `json:"content" gorm:"type:text"`
|
||||
DraftContent string `json:"draft_content,omitempty" gorm:"type:text"` // 未保存的草稿(自动保存用)
|
||||
Category string `json:"category" gorm:"size:100;index"`
|
||||
Tags string `json:"tags" gorm:"type:text"` // JSON 数组格式存储
|
||||
Password string `json:"-" gorm:"size:255"` // 访问密码(哈希存储)
|
||||
@@ -147,3 +148,9 @@ type NoteVersion struct {
|
||||
func (NoteVersion) TableName() string {
|
||||
return "note_versions"
|
||||
}
|
||||
|
||||
// TagUsage 标签使用统计
|
||||
type TagUsage struct {
|
||||
Name string `json:"name"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user