refactor: reorganize modules and add Linux build tooling

This commit is contained in:
2026-08-09 12:41:08 +08:00
parent 86024fa81d
commit 5cc5fd92ed
1461 changed files with 4054 additions and 4724 deletions

View File

@@ -0,0 +1,28 @@
package models
import (
"git.apinb.com/bsm-sdk/core/database"
"git.apinb.com/bsm-sdk/engine/types"
)
// 知识笔记模型
type CloudNote struct {
types.Std_IICUDS
types.Std_Passport
CloudBase
Title string `gorm:"size:200" json:"title"` // 标题
Content string `gorm:"type:text" json:"content"` // 内容
Category string `gorm:"size:50" json:"category"` // 分类
Tags string `gorm:"size:500" json:"tags"` // 标签,逗号分隔
IsMarkdown bool `gorm:"default:true" json:"is_markdown"` // 是否是markdown格式
IsPinned bool `gorm:"default:false" json:"is_pinned"` // 是否是置顶
IsPrivate bool `gorm:"default:false" json:"is_private"` // 是否是私有
Views int `gorm:"default:0" json:"views"` // 浏览次数
// 关联关系
Attachments []NoteAttachment `gorm:"foreignKey:NoteID" json:"attachments"`
}
func init() {
database.AppendMigrate(&CloudNote{})
}