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;"`
}

func (Article) TableName() string {
	return "articles"
}
