package edb_refresh import ( "eta_gn/eta_index_lib/global" "time" ) // EdbRefreshSource // @Description: 刷新的数据源表 type EdbRefreshSource struct { Id int `gorm:"primaryKey;autoIncrement;column:id" description:"ID"` Source int `gorm:"column:source" description:"来源"` SourceName string `gorm:"column:source_name" description:"来源名称"` SubSource int `gorm:"column:sub_source" description:"子数据来源:0:经济数据库,1:日期序列"` SubSourceName string `gorm:"column:sub_source_name" description:"子来源名称"` HasChild int `gorm:"column:has_child" description:"是否有子来源,0:否,1:是"` ModifyTime time.Time `gorm:"column:modify_time" description:"修改时间"` CreateTime time.Time `gorm:"column:create_time" description:"创建时间"` } // EdbRefreshSourceList // @Description: 获取刷新的数据源列表 type EdbRefreshSourceList struct { Source int `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) { sql := ` SELECT * FROM edb_refresh_source ORDER BY id ASC ` err = global.DEFAULT_DmSQL.Raw(sql).Scan(&items).Error return } type BaseClassifyItems struct { ClassifyId int `description:"分类id"` ClassifyName string `description:"分类名称"` ParentId int `description:"父级id"` UniqueCode string `description:"唯一编码"` Children []*BaseClassifyItems `description:"下级"` }