package edb_refresh import ( "github.com/beego/beego/v2/client/orm" "time" ) // EdbRefreshSource // @Description: 刷新的数据源表 type EdbRefreshSource struct { Id int `orm:"column(id);pk"` Source int `orm:"column(source)" description:"来源"` SourceName string `description:"来源名称"` SubSource int `description:"子数据来源:0:经济数据库,1:日期序列"` SubSourceName string `description:"子来源名称"` HasChild int `description:"是否有子来源,0:否,1:是"` ModifyTime time.Time `description:"修改时间"` CreateTime time.Time `description:"创建时间"` } // EdbRefreshSourceList // @Description: 获取刷新的数据源列表 type EdbRefreshSourceList struct { Source int `orm:"column(source)" description:"来源"` SourceName string `description:"来源名称"` SubSource int `description:"子数据来源:0:经济数据库,1:日期序列"` SubSourceName string `description:"子来源名称"` Child []EdbRefreshSourceList `description:"子来源"` HasChild int `description:"是否有子来源,0:否,1:是"` } // GetAllList // @Description: 获取刷新数据源列表 // @author: Roc // @datetime 2024-01-03 15:03:24 // @return items []*EdbRefreshSource // @return err error func (m EdbRefreshSource) GetAllList() (items []*EdbRefreshSource, err error) { o := orm.NewOrm() sql := ` SELECT * FROM edb_refresh_source ORDER BY id ASC ` _, err = o.Raw(sql).QueryRows(&items) return } type BaseClassifyItems struct { ClassifyId int `description:"分类id"` ClassifyName string `description:"分类名称"` ParentId int `description:"父级id"` UniqueCode string `description:"唯一编码"` Children []*BaseClassifyItems `description:"下级"` }