使用qoder优化后更新
Some checks failed
Go build / build and run (push) Has been cancelled

This commit is contained in:
2026-02-12 13:48:35 +08:00
parent abd5962ae9
commit bc59f616fd
15 changed files with 130 additions and 278 deletions

View File

@@ -1,7 +1,6 @@
package models
const TableNameContent = "contents"
// Content 内容模型(文章/页面)
type Content struct {
Cid int32 `gorm:"column:cid;primaryKey;autoIncrement:true" json:"cid"`
Title string `gorm:"column:title" json:"title"`
@@ -22,7 +21,7 @@ type Content struct {
Parent int32 `gorm:"column:parent" json:"parent"`
}
// TableName Content's table name
// TableName 指定表名
func (*Content) TableName() string {
return TableNameContent
return "contents"
}