package knowledge import "time" type KnowledgeResource struct { KnowledgeResourceId int `gorm:"column:knowledge_resource_id;;primaryKey;autoIncrement"` ResourceType int `gorm:"column:resource_type;"` ClassifyId int `gorm:"column:classify_id"` title string `gorm:"column:title;"` CreateTime string `gorm:"column:create_time" description:"创建时间"` ModifyTime time.Time `gorm:"column:modify_time;autoUpdateTime" description:"修改时间"` State int `gorm:"column:state" description:"1:未发布;2:已发布;3-待提交;4-待审批;5-已驳回;6-已通过"` Content string `gorm:"column:content"` ResourceCode string `gorm:"column:resource_code"` AdminId int `gorm:"column:admin_id" description:"创建者账号"` AdminRealName string `gorm:"column:admin_real_name" description:"创建者姓名"` SourceFrom string `gorm:"column:source_from"` TagId int `gorm:"column:tag_id;default:0;NOT NULL"` StartTime string `gorm:"column:start_time"` EndTime string `gorm:"column:end_time"` } func (k *KnowledgeResource) TableName() string { return "knowledge_resource" } // 查询列表 func (k *KnowledgeResource) QueryList(condition string, pars []interface{}) (items []*KnowledgeResource, err error) { return }