gin-blog/internal/model/article.go

22 lines
398 B
Go
Raw Normal View History

2021-05-28 10:40:39 +00:00
package model
import "blog/pkg/app"
type Article struct {
*Model
Title string `json:"title"`
Desc string `json:"desc"`
Content string `json:"content"`
CoverImageUrl string `json:"cover_image_url"`
State uint8 `json:"state"`
}
func (a Article) TableName() string {
return "blog_article"
}
type ArticleSwagger struct {
List []*Article
Pager *app.Pager
}