You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
723 B
Go

11 months ago
package common
import "miniapp/global"
type Article struct {
global.GVA_MODEL
Title string `json:"title" form:"title" gorm:"column:title;comment:标题;type:varchar(255);size:255;"`
Content string `json:"content" form:"content" gorm:"column:content;comment:内容;type:longtext;"`
CoverImg string `json:"cover_img" form:"coverImg" gorm:"column:cover_img;comment:封面图;type:varchar(255);size:255;"`
ReadingNum int `json:"reading_num" form:"reading_num" gorm:"column:reading_num;comment:阅读量;type:int;size:10;"`
IsFavorite int `json:"is_favorite" form:"is_favorite" gorm:"column:is_favorite;comment:是否收藏;type:int;size:10;"`
11 months ago
}
func (Article) TableName() string {
return "articles"
}