package models import ( "eta_gn/eta_api/models/ai_summary" "eta_gn/eta_api/models/aimod" "eta_gn/eta_api/models/data_manage" "eta_gn/eta_api/models/data_manage/chart_theme" "eta_gn/eta_api/models/data_manage/cross_variety" "eta_gn/eta_api/models/data_manage/data_manage_permission" "eta_gn/eta_api/models/data_manage/edb_refresh" "eta_gn/eta_api/models/data_manage/excel" future_good2 "eta_gn/eta_api/models/data_manage/future_good" "eta_gn/eta_api/models/data_manage/supply_analysis" "eta_gn/eta_api/models/fe_calendar" "eta_gn/eta_api/models/report" "eta_gn/eta_api/models/report_approve" "eta_gn/eta_api/models/sandbox" "eta_gn/eta_api/models/semantic_analysis" "eta_gn/eta_api/models/smart_report" "eta_gn/eta_api/models/speech_recognition" "eta_gn/eta_api/models/system" _ "github.com/go-sql-driver/mysql" "github.com/beego/beego/v2/client/orm" ) func init() { orm.RegisterModel( new(Classify), new(Resource), new(PptV2), new(PptV2PublishRecord), new(PptV2SaveLog), new(PptV2Group), new(PptV2GroupMapping), new(PptV2Grant), //ppt授权操作表 new(ResearchVarietyTagRelation), // 研究员标签关系表 new(ReportPptImg), //Ppt转报告的图片记录表 ) initSystem() initReport() initSandbox() initShEdbData() initEdbData() initChart() initFutureGood() initSemanticAnalysis() initSupplyAnalysis() initMultipleGraphConfig() initBusinessConf() initChartFramework() initOutLink() initSmartReport() initExcel() initCrossVariety() initAi() initReportApprove() initChartTheme() initEdbRefresh() initSpeechRecognition() initDataMangePerMission() initFeCalendar() initFactorEdbSeries() } func initSystem() { orm.RegisterModel( new(system.SysUserLoginRecord), new(system.SysSession), new(system.SysDepartment), new(system.SysGroup), new(system.SysRoleMenu), new(system.Admin), new(system.SysRole), new(system.SysMenuButton), new(system.SysRoleButton), new(system.SysRoleAdmin), //管理员账号和角色映射表 new(system.AdminConfig), //系统用户配置表 new(system.AdminOperateRecord), new(system.AdminVerifyCodeRecord), // 用户短信邮箱验证码记录表 ) } func initReport() { orm.RegisterModel( new(Report), new(ReportViewRecord), new(ChartPermissionSearchKeyWordMapping), //报告分类权限表 new(ReportChapter), // 报告章节表 new(ReportChapterTicker), // 晨报章节ticker new(ReportChapterTypePermission), // 晨周报章节类型权限表 new(ChartPermission), // 权限表 new(YbPcSuncode), new(YbSuncodePars), new(ReportAuthor), //报告作者 new(ClassifyMenu), // 报告分类-子目录表 new(ClassifyMenuRelation), // 报告分类-子目录关联表 new(ChartPermissionChapterMapping), // 权限mapping表 new(ReportChapterType), // 报告章节类型表 new(ReportStateRecord), // 研报状态修改记录表 new(report.ReportGrant), // 报告授权用户表 new(report.ReportChapterGrant), // 报告章节授权用户表 new(report.ReportChapterPermissionMapping), // 报告章节的权限关系表 ) } func initSandbox() { orm.RegisterModel( new(sandbox.Sandbox), //沙盘主表 new(sandbox.SandboxVersion), //沙盘版本表 new(sandbox.SandboxDraft), //沙盘草稿表 new(sandbox.SandboxClassify), //沙盘分类表 ) } func initShEdbData() { orm.RegisterModel( new(Edbdata), new(EdbdataDeleteRecord), new(EdbdataImportFail), new(EdbImportFail), //指标导入失败数据表 new(Edbinfo), //edb库的edbinfo表 new(data_manage.ExcelStyle), //在线excel样式表 new(data_manage.ExcelEdbdataMapping), //excel样式和指标映射表 new(EdbinfoOpRecord), // 手工数据的操作日志 ) } func initEdbData() { orm.RegisterModel( new(data_manage.EdbClassify), new(data_manage.EdbInfo), //hz_data库的edb_info表 new(data_manage.ManualUserClassify), new(data_manage.EdbdataClassify), new(data_manage.ManualUser), new(data_manage.EdbInfoCalculate), new(data_manage.SearchKeyword), new(data_manage.EdbInfoLog), new(data_manage.EdbInfoRecord), new(data_manage.EdbInfoCalculateMapping), new(data_manage.PredictEdbConf), //预测指标配置 new(data_manage.PredictEdbRuleData), //预测指标,动态规则的计算数据 new(data_manage.TradePositionDalianTop), new(data_manage.TradePositionZhengzhouTop), new(data_manage.TradePositionCffexTop), new(data_manage.TradePositionShanghaiTop), new(data_manage.TradePositionIneTop), new(data_manage.EdbDataInsertConfig), // 指标数据插入配置表 new(data_manage.EdbInfoNoPermissionAdmin), //指标不可见用户配置表 new(data_manage.EdbTerminal), //指标终端 new(data_manage.BaseFromEdbMapping), new(data_manage.EdbInfoRelation), //指标关系表 ) } func initChart() { orm.RegisterModel( new(data_manage.ChartClassify), new(data_manage.ChartInfo), new(data_manage.ChartEdbMapping), new(data_manage.MyChartClassify), new(data_manage.MyChart), new(data_manage.MyChartLog), new(data_manage.MyChartClassifyMapping), new(data_manage.ChartInfoLog), new(data_manage.ChartInfoCorrelation), new(data_manage.ChartSeries), new(data_manage.ChartSeriesEdbMapping), ) } func initFutureGood() { orm.RegisterModel( new(future_good2.FutureGoodEdbInfo), //期货指标表 new(future_good2.FutureGoodEdbData), //期货指标数据表 new(future_good2.ChartInfoFutureGoodProfit), //期货利润图的扩展表 ) } func initSemanticAnalysis() { orm.RegisterModel( new(semantic_analysis.SaLabel), // 语义分析-标签表 new(semantic_analysis.SaDocClassify), // 语义分析-文档分类表 new(semantic_analysis.SaDoc), // 语义分析-文档表 new(semantic_analysis.SaDocSection), // 语义分析-文档段落表 new(semantic_analysis.SaCompareClassify), // 语义分析-比对分类表 new(semantic_analysis.SaCompare), // 语义分析-比对表 new(semantic_analysis.SaCompareDoc), // 语义分析-比对关联文档表 new(semantic_analysis.SaCompareLabel), // 语义分析-比对段落表 new(semantic_analysis.SaCompareSearchKeyword), // 语义分析-比对搜索关键词 ) } func initSupplyAnalysis() { orm.RegisterModel( new(supply_analysis.Variety), new(supply_analysis.VarietyAdminPermission), new(supply_analysis.VarietyEdbInfo), new(supply_analysis.VarietyPlant), ) } func initMultipleGraphConfig() { orm.RegisterModel( new(data_manage.MultipleGraphConfig), //多图配置表 new(data_manage.MultipleGraphConfigChartMapping), //图表与多图配置的关系表 new(data_manage.MultipleGraphConfigEdbMapping), //指标与多图配置的关系表 ) } func initBusinessConf() { orm.RegisterModel( new(BusinessConf), // 商家配置表 new(BusinessConfOperationRecord), // 商家配置操作记录表 ) } func initOutLink() { orm.RegisterModel( new(OutLink)) // 外部链接表 } func initChartFramework() { orm.RegisterModel( new(data_manage.ChartFramework), // 图库框架主表 new(data_manage.ChartFrameworkNode), // 图库框架节点表 ) } func initExcel() { orm.RegisterModel( new(excel.ExcelClassify), //ETA excel表格分类 new(excel.ExcelInfo), //ETA excel表格 new(excel.ExcelDraft), //ETA excel表格草稿 new(excel.ExcelSheet), //ETA excel sheet new(excel.ExcelSheetData), //ETA excel sheet data new(excel.ExcelEdbMapping), //ETA excel 与 指标 的关系表 new(excel.ExcelWorker), // 平衡表协作人表格 new(excel.ExcelChartEdb), // 平衡表做图指标 new(excel.ExcelChartData), // 平衡表作图数据 new(excel.ExcelInfoRuleMapping), //表格的管理规则 ) } func initSmartReport() { orm.RegisterModel( new(smart_report.SmartReportResource), // 智能研报-资源表 ) } func initCrossVariety() { orm.RegisterModel( new(cross_variety.ChartVariety), // 品种表 new(cross_variety.ChartTag), // 标签表 new(cross_variety.ChartTagVariety), // 标签、品种、指标关系表 new(cross_variety.ChartVarietyMapping), // 图表与品种的关系表 new(cross_variety.ChartInfoCrossVariety), // 跨品种分析配置表 ) } func initAi() { orm.RegisterModel( new(aimod.AiChatTopic), new(aimod.AiChat), new(aimod.FileUploadRecord), new(ai_summary.AiSummaryClassify), new(ai_summary.AiSummary), new(ai_summary.AiPrompt), ) } func initReportApprove() { orm.RegisterModel( new(report_approve.ReportApprove), // 审批表 new(report_approve.ReportApproveFlow), // 审批流表 new(report_approve.ReportApproveNode), // 审批节点表 new(report_approve.ReportApproveRecord), // 审批记录表 new(report_approve.ReportApproveMessage), // 审批消息表 ) } func initChartTheme() { orm.RegisterModel( new(chart_theme.ChartTheme), // 图表主题 new(chart_theme.ChartThemeType), // 图表主题类型 new(chart_theme.ChartThemeDefaultData), //默认数据 ) } func initEdbRefresh() { orm.RegisterModel( new(edb_refresh.EdbRefreshSource), // 刷新的数据源表 new(edb_refresh.EdbRefreshDefaultConfig), // 指标的默认刷新时间配置表 new(edb_refresh.EdbRefreshConfig), // 指标的刷新时间配置表 new(edb_refresh.EdbRefreshMapping), // 指标刷新时间配置关系表 ) } func initSpeechRecognition() { orm.RegisterModel( new(speech_recognition.SpeechRecognition), // 语音识别表 new(speech_recognition.SpeechRecognitionApiLog), // 语音识别-API请求日志 new(speech_recognition.SpeechRecognitionContent), // 语音识别-转换内容表 new(speech_recognition.SpeechRecognitionMenu), // 语音识别-目录表 new(speech_recognition.SpeechRecognitionTag), // 语音识别-标签表 new(speech_recognition.SpeechRecognitionTagMenu), // 语音识别-标签目录表 new(speech_recognition.SpeechRecognitionTagMapping), // 语音识别-标签关联表 ) } func initDataMangePerMission() { orm.RegisterModel( new(data_manage_permission.EdbInfoPermission), // 指标权限表 new(data_manage_permission.EdbClassifyPermission), // 指标分类权限表 new(data_manage_permission.ChartInfoPermission), // 图表权限表 new(data_manage_permission.ChartClassifyPermission), // 图表分类权限表 new(data_manage_permission.ExcelInfoPermission), // ETA表格权限表 new(data_manage_permission.ExcelClassifyPermission), // ETA表格分类权限表 new(data_manage_permission.DataPermissionMessage), // 数据权限变更消息表 new(data_manage_permission.DataPermissionMoveRecord), // 数据资产转移记录表 new(data_manage_permission.EdbInfoPermissionNoAuthRecord), // 指标资产数据未授权分类记录表 new(data_manage_permission.ChartInfoPermissionNoAuthRecord), // 图表资产数据未授权分类记录表 new(data_manage_permission.ExcelInfoPermissionNoAuthRecord), // ETA表格资产数据未授权分类记录表 new(data_manage_permission.EdbInfoClassifyPermissionNoAuthRecord), // 指标资产分类数据未授权分类记录表 new(data_manage_permission.ChartInfoClassifyPermissionNoAuthRecord), // 图表资产分类数据未授权分类记录表 new(data_manage_permission.ExcelInfoClassifyPermissionNoAuthRecord), // ETA表格资产分类数据未授权分类记录表 new(data_manage_permission.DataPermissionClassifyNoAuthRecord), // 资产分类数据权限未授权记录表 new(data_manage_permission.DataPermissionNoAuthRecord), // 资产数据权限设置记录表 ) } func initFeCalendar() { orm.RegisterModel( new(fe_calendar.FeCalendarMatter), // 事项表 ) } func initFactorEdbSeries() { orm.RegisterModel( new(data_manage.FactorEdbSeries), // 因子指标系列 new(data_manage.FactorEdbSeriesChartMapping), // 因子指标系列-图表关联 new(data_manage.FactorEdbSeriesMapping), // 因子指标系列-指标计算数据 new(data_manage.FactorEdbSeriesCalculateData), // 因子指标系列-指标关联 new(data_manage.FactorEdbSeriesCalculateDataQjjs), // 因子指标系列-区间计算数据 ) }