16 lines
599 B
Go
16 lines
599 B
Go
|
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;"`
|
||
|
}
|
||
|
|
||
|
func (Article) TableName() string {
|
||
|
return "articles"
|
||
|
}
|