package model import "time" type DocArticle struct { Id int64 `excel:"name=主键id" xorm:"pk autoincr" json:"id" ` //主键id Label string `excel:"name=文章标题" xorm:"varchar(128)" json:"label" binding:"required"` //文章标题 CatId int64 `excel:"name=文章分类" xorm:"bigint(20)" json:"catId" binding:"required"` //文章分类 Profile string `excel:"name=简介" xorm:"varchar(2000)" json:"profile" ` //简介 Url string `excel:"name=封面图" xorm:"varchar(256)" json:"url" ` //封面图 IsTop int `excel:"name=是否推荐,format=1=否,2=是" xorm:"tinyint(1)" json:"isTop" ` //是否推荐(1否 2是) IsHot int `excel:"name=是否热门,format=1=否,2=是" xorm:"tinyint(1)" json:"isHot" ` //是否热门(1否 2是) Content string `excel:"name=内容" xorm:"text" json:"content" ` //内容 Sort int `excel:"name=排序" xorm:"smallint(11)" json:"sort" binding:"required"` //排序 CreateBy string `excel:"name=创建者" xorm:"varchar(64)" json:"createBy" ` //创建者 CreateTime time.Time `excel:"name=创建时间" xorm:"datetime" json:"createTime" ` //创建时间 UpdateBy string `excel:"name=更新者" xorm:"varchar(64)" json:"updateBy" ` //更新者 UpdateTime time.Time `excel:"name=更新时间" xorm:"datetime" json:"updateTime" ` //更新时间 } func (m DocArticle) TableName() string { return "doc_article" }