package models import ( "time" "go-admin/common/models" ) type Banner struct { models.Model Title string `json:"title" gorm:"type:varchar(1023);comment:标题"` Url string `json:"url" gorm:"type:text;comment:内容"` Slug string `json:"slug" gorm:"type:varchar(127);comment:slug"` Type int64 `json:"type" gorm:"type:int;comment:类型"` Order int64 `json:"order" gorm:"type:int;comment:排序"` Status int64 `json:"status" gorm:"type:int;comment:状态"` PublishAt time.Time `json:"publishAt" gorm:"type:datetime;comment:发布时间"` models.ModelTime models.ControlBy } func (Banner) TableName() string { return "banner" } func (e *Banner) Generate() models.ActiveRecord { o := *e return &o } func (e *Banner) GetId() interface{} { return e.Id }