2023-11-02 04:34:46 +08:00
|
|
|
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;"`
|
2024-01-11 16:03:51 +08:00
|
|
|
CoverImg string `json:"cover_img" form:"coverImg" gorm:"column:cover_img;comment:封面图;"`
|
2023-11-02 04:34:46 +08:00
|
|
|
ReadingNum int `json:"reading_num" form:"reading_num" gorm:"column:reading_num;comment:阅读量;type:int;size:10;"`
|
2023-11-02 05:11:27 +08:00
|
|
|
IsFavorite int `json:"is_favorite" form:"is_favorite" gorm:"column:is_favorite;comment:是否收藏;type:int;size:10;"`
|
2023-11-02 04:34:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (Article) TableName() string {
|
|
|
|
return "articles"
|
|
|
|
}
|