package data import "time" // EdbBridge 桥接数据源接口(算了别用了难用的一批, 不如直接判断商户号来的方便快捷...) type EdbBridge interface { GetIndex(GetIndexFromBridgeReq) (BridgeIndexItem, error) //GetIndexAndData(GetIndexAndDataFromBridgeReq) (BridgeIndexItem, error) } // GetIndexFromBridgeReq 获取指标信息请求体 type GetIndexFromBridgeReq struct { IndexCode string `description:"指标编码"` Source int `description:"指标来源ID"` SourceExtend string `description:"指标来源(用作查询条件)"` IndexCodeRequired int `description:"指标编码是否必填: 0-否; 1-是"` } // GetIndexAndDataFromBridgeReq 获取指标数据请求体 type GetIndexAndDataFromBridgeReq struct { IndexCode string `description:"指标编码"` Source int `description:"指标来源ID"` SourceExtend string `description:"指标来源(用作查询条件)"` StartDate string `description:"数据开始日期"` EndDate string `description:"数据结束日期"` } // BridgeIndexItem 桥接服务指标信息 type BridgeIndexItem struct { Id int `description:"自增ID"` IndexCode string `description:"指标编码"` IndexName string `description:"指标名称"` Unit string `description:"单位"` Frequency string `description:"频度"` Data []BridgeIndexDataItem `description:"数据值"` } // BridgeIndexDataItem 桥接服务指标数据信息 type BridgeIndexDataItem struct { Val float64 `description:"数据值"` DataTime time.Time `description:"数据日期"` UpdateTime time.Time `description:"更新时间"` }