refactor: reorganize modules and add Linux build tooling
This commit is contained in:
28
module/base/cloud/internal/models/cloud_note.go
Normal file
28
module/base/cloud/internal/models/cloud_note.go
Normal 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{})
|
||||
}
|
||||
Reference in New Issue
Block a user