Documentation
¶
Index ¶
Constants ¶
View Source
const ArticleStatusDraft = 1 // 草稿
View Source
const ArticleStatusPublished = 2 // 发布
View Source
const CommentStatusHidden = 2 // 隐藏
View Source
const CommentStatusNormal = 1 // 展示
View Source
const TagStatusHidden = 2 // 禁用
View Source
const TagStatusNormal = 1 // 正常
View Source
const UserTypeAdmin = 1 // 管理员
View Source
const UserTypeUser = 2 // 前台用户
Variables ¶
This section is empty.
Functions ¶
func NewDBEngine ¶
func NewDBEngine(dbSetting *setting.DatabaseSetting) (*gorm.DB, error)
Types ¶
type Article ¶
type Comment ¶
type Comment struct { Model ArticleId int `json:"articleId"` UserId int `json:"userId"` MentionUserId int `json:"mentionUserId"` Content string `json:"content"` CommentStatus int `json:"commentStatus"` User User `json:"user" gorm:"foreignKey:UserId"` MentionUser User `json:"mentionUser" gorm:"foreignKey:MentionUserId"` }
type Model ¶
Click to show internal directories.
Click to hide internal directories.