This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user