db.go 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  1. package models
  2. import (
  3. _ "github.com/go-sql-driver/mysql"
  4. "hongze/hz_crm_api/models/advisory"
  5. "hongze/hz_crm_api/models/aimod"
  6. "hongze/hz_crm_api/models/business_trip"
  7. "hongze/hz_crm_api/models/company"
  8. "hongze/hz_crm_api/models/company_report_permission_log"
  9. "hongze/hz_crm_api/models/company_todo"
  10. "hongze/hz_crm_api/models/company_user"
  11. "hongze/hz_crm_api/models/contract"
  12. "hongze/hz_crm_api/models/cygx"
  13. "hongze/hz_crm_api/models/data_manage"
  14. future_good2 "hongze/hz_crm_api/models/data_manage/future_good"
  15. "hongze/hz_crm_api/models/data_manage/supply_analysis"
  16. "hongze/hz_crm_api/models/day_new"
  17. "hongze/hz_crm_api/models/eta_business"
  18. "hongze/hz_crm_api/models/eta_training_video"
  19. "hongze/hz_crm_api/models/eta_trial"
  20. "hongze/hz_crm_api/models/help_doc"
  21. "hongze/hz_crm_api/models/overseas_custom"
  22. "hongze/hz_crm_api/models/roadshow"
  23. "hongze/hz_crm_api/models/seal"
  24. "hongze/hz_crm_api/models/system"
  25. "hongze/hz_crm_api/models/video"
  26. "hongze/hz_crm_api/models/yb"
  27. "hongze/hz_crm_api/utils"
  28. "time"
  29. "github.com/beego/beego/v2/client/orm"
  30. )
  31. func init() {
  32. _ = orm.RegisterDataBase("default", "mysql", utils.MYSQL_URL)
  33. orm.SetMaxIdleConns("default", 50)
  34. orm.SetMaxOpenConns("default", 100)
  35. db, _ := orm.GetDB("default")
  36. db.SetConnMaxLifetime(10 * time.Minute)
  37. _ = orm.RegisterDataBase("rddp", "mysql", utils.MYSQL_URL_RDDP)
  38. orm.SetMaxIdleConns("rddp", 50)
  39. orm.SetMaxOpenConns("rddp", 100)
  40. report_db, _ := orm.GetDB("rddp")
  41. report_db.SetConnMaxLifetime(10 * time.Minute)
  42. _ = orm.RegisterDataBase("edb", "mysql", utils.MYSQL_URL_EDB)
  43. orm.SetMaxIdleConns("edb", 50)
  44. orm.SetMaxOpenConns("edb", 100)
  45. edb_db, _ := orm.GetDB("edb")
  46. edb_db.SetConnMaxLifetime(10 * time.Minute)
  47. _ = orm.RegisterDataBase("data", "mysql", utils.MYSQL_URL_DATA)
  48. orm.SetMaxIdleConns("data", 50)
  49. orm.SetMaxOpenConns("data", 100)
  50. data_db, _ := orm.GetDB("data")
  51. data_db.SetConnMaxLifetime(10 * time.Minute)
  52. _ = orm.RegisterDataBase("gl", "mysql", utils.MYSQL_URL_GL)
  53. orm.SetMaxIdleConns("gl", 50)
  54. orm.SetMaxOpenConns("gl", 100)
  55. gl, _ := orm.GetDB("gl")
  56. gl.SetConnMaxLifetime(10 * time.Minute)
  57. _ = orm.RegisterDataBase("comein_data", "mysql", utils.MYSQL_URL_COMEIN_DATA)
  58. orm.SetMaxIdleConns("comein_data", 50)
  59. orm.SetMaxOpenConns("comein_data", 100)
  60. comein_datadb, _ := orm.GetDB("comein_data")
  61. comein_datadb.SetConnMaxLifetime(10 * time.Minute)
  62. _ = orm.RegisterDataBase("weekly_trial", "mysql", utils.MYSQL_URL_WEEKLY_TRIAL)
  63. orm.SetMaxIdleConns("weekly_trial", 50)
  64. orm.SetMaxOpenConns("weekly_trial", 100)
  65. trial_datadb, _ := orm.GetDB("weekly_trial")
  66. trial_datadb.SetConnMaxLifetime(10 * time.Minute)
  67. _ = orm.RegisterDataBase("fms", "mysql", utils.MYSQL_URL_FMS)
  68. orm.SetMaxIdleConns("fms", 50)
  69. orm.SetMaxOpenConns("fms", 100)
  70. fms_datadb, _ := orm.GetDB("fms")
  71. fms_datadb.SetConnMaxLifetime(10 * time.Minute)
  72. _ = orm.RegisterDataBase("hz_cygx", "mysql", utils.MYSQL_URL_CYGX)
  73. orm.SetMaxIdleConns("hz_cygx", 50)
  74. orm.SetMaxOpenConns("hz_cygx", 100)
  75. cygx_db, _ := orm.GetDB("hz_cygx")
  76. cygx_db.SetConnMaxLifetime(10 * time.Minute)
  77. orm.Debug = true
  78. orm.DebugLog = orm.NewLog(utils.Binlog)
  79. //注册对象
  80. orm.RegisterModel(
  81. new(Classify),
  82. new(Banner),
  83. new(Resource),
  84. //new(Ppt),
  85. //new(PptPages),
  86. //new(PptPublishRecord),
  87. new(video.Video),
  88. new(video.VideoTags),
  89. new(OssSTSToken),
  90. //new(PptV2),
  91. //new(PptV2PublishRecord),
  92. //new(PptV2SaveLog),
  93. //new(PptV2Group),
  94. //new(PptV2GroupMapping),
  95. //new(PptV2Grant), //ppt授权操作表
  96. new(VarietyClassify), // 标签分类表
  97. new(VarietyTag), // 标签表
  98. new(ResearchVarietyTagRelation), // 研究员标签关系表
  99. //new(ReportPptImg), //Ppt转报告的图片记录表
  100. )
  101. // 系统表 数据表
  102. initSystem()
  103. // 客户相关
  104. initCompany()
  105. // 联系人相关
  106. initWxUser()
  107. // 报告相关 数据表
  108. initReport()
  109. // 合同 数据表
  110. initContract()
  111. // 用印 数据表
  112. initSeal()
  113. // 研报 数据表
  114. initYb()
  115. // 路演记录 数据表
  116. initRoadShow()
  117. // 注册Edb沙盘 数据表
  118. //initSandbox()
  119. // 上海指标服务 数据表
  120. initShEdbData()
  121. // 指标服务 数据表
  122. initEdbData()
  123. // 图表 数据表
  124. initChart()
  125. // 查研观项 数据表
  126. initCygx()
  127. // 英文报告
  128. initEnglishReport()
  129. // 英文ppt
  130. //initPptEnglish()
  131. // 期货数据库
  132. initFutureGood()
  133. // 共享网盘
  134. //initCloudDisk()
  135. //ETA试用
  136. initETATrial()
  137. //出差审批
  138. initBusinessTrip()
  139. // 每刻报销
  140. initMaycur()
  141. // 语义分析
  142. //initSemanticAnalysis()
  143. // 供应分析
  144. initSupplyAnalysis()
  145. //多图配置
  146. initMultipleGraphConfig()
  147. //AI 聊天记录
  148. initAiChat()
  149. // ETA商家
  150. initEtaBusiness()
  151. // ETA版本更新日志
  152. initEtaVersionUpdateLog()
  153. // 帮助文档
  154. initHelpDoc()
  155. // ETA培训视频
  156. initEtaTrainingVideo()
  157. //海外客户
  158. initOverseasCustom()
  159. }
  160. // initSystem 系统表 数据表
  161. func initSystem() {
  162. orm.RegisterModel(
  163. new(system.SysUserLoginRecord),
  164. new(system.SysSession),
  165. new(system.SysDepartment),
  166. new(system.SysGroup),
  167. //new(system.SysRoleMenu),
  168. new(system.SysRoleMenuCrm),
  169. new(system.Admin),
  170. new(system.SysRole),
  171. new(system.SysMenuButton),
  172. new(system.SysRoleButton),
  173. new(system.ApprovalFlow), //审批配置表
  174. new(system.ApprovalFlowNode), //审批节点配置表
  175. new(system.ResearchGroup), // 研究员研究方向分组表
  176. new(system.ResearchGroupRelation), // 研究员研究方向分组关系表
  177. new(system.SysRoleAdmin), //管理员账号和角色映射表
  178. new(system.AdminConfig), //系统用户配置表
  179. new(system.AdminOperateRecord),
  180. new(system.AdminVerifyCodeRecord), // 用户短信邮箱验证码记录表
  181. )
  182. }
  183. // initCompany 客户相关 数据表
  184. func initCompany() {
  185. orm.RegisterModel(
  186. new(company.CompanyApprovalMessage),
  187. new(company.CompanyOperationRecord),
  188. new(company.Company),
  189. new(company.CompanyPermissionLog),
  190. new(company.CompanyReportPermission),
  191. new(company.CompanyContract),
  192. new(company.CompanyContractPermission),
  193. new(company.CompanyContractPermissionLog),
  194. new(company.CompanyProduct),
  195. new(company.CompanyLog),
  196. new(company.CompanyProductLog),
  197. new(company.CompanyRenewalReason),
  198. new(company.CompanyApproval),
  199. new(company.CompanyProductRemark),
  200. new(company.CompanyDelayPermission),
  201. new(company.CompanyProductUpdateLog), //客户产品变更状态表
  202. new(company.CompanyProductTryOutUpdateLog), //客户产品试用变更状态表
  203. new(company.CompanyProductTryOutUpdatePermissionLog), //客户产品试用变更品种详情表
  204. new(company.CompanyDeleteBak), //客户删除时的信息备注表
  205. new(company.WxUserOpLog), //联系人日志记录表
  206. new(company_todo.CompanyTodo), //客户任务列表
  207. new(company.SellerCompanyPermission), //销售客户权限("添加客户"权限)
  208. new(company.CompanyServiceRecord), // 客户服务记录表
  209. new(company.CompanyAscribe), // 客户归因
  210. new(company.CompanyNoRenewedNote), // 客户未续约记录
  211. new(company.CompanyNoRenewedAscribe), // 确认不续约记录
  212. new(company.CompanyNoRenewedAscribeLog), // 确认不续约记录日志
  213. new(company.CompanyContractNoRenewedAscribe), // 合同确认不续约记录
  214. new(company.CompanyContractNoRenewedAscribeLog), // 合同确认不续约记录日志
  215. new(company.CrmConfig), // 管理后台基本配置表
  216. new(company.CompanyRenewalRecord), // 客户续约状态记录表
  217. new(company.CompanyHistoryRemark), // 客户记录历史记录表
  218. )
  219. }
  220. // initWxUser 联系人相关 数据表
  221. func initWxUser() {
  222. orm.RegisterModel(
  223. new(WxUser),
  224. new(UserSellerRelation),
  225. new(UserRecord),
  226. new(UserTrialApply),
  227. new(company_user.ChartClassifyPermission), // 联系人图表权限表
  228. new(company_user.CompanyUserChartPermissionOperationRecord), // 联系人图表权限操作记录表
  229. )
  230. }
  231. // initReport 报告相关 数据表
  232. func initReport() {
  233. orm.RegisterModel(
  234. new(Report),
  235. new(ReportViewRecord),
  236. new(advisory.AdvisoryArticle),
  237. new(advisory.AdvisoryArticleLog),
  238. //new(ResearchReport), //日报、周报信息
  239. new(ChartPermissionSearchKeyWordMapping), //报告分类权限表
  240. new(ReportChapter), // 报告章节表
  241. //new(ReportChapterTicker), // 晨报章节ticker
  242. //new(ReportChapterTypePermission), // 晨周报章节类型权限表
  243. new(company_report_permission_log.CompanyReportPermissionLog),
  244. new(ReportSendThsDetail), //报告发送至同花顺记录
  245. new(GroupSendMsg), //群发消息
  246. new(UserTemplateRecord), //模板消息记录
  247. new(ChartPermission), // 权限表
  248. new(YbPcSuncode),
  249. new(YbSuncodePars),
  250. //new(ReportAuthor), //报告作者
  251. new(ClassifyMenu), // 报告分类-子目录表
  252. new(ClassifyMenuRelation), // 报告分类-子目录关联表
  253. new(ReportSendThsConfig), //产品推送给同花顺的配置表
  254. //new(ChartPermissionChapterMapping), // 权限mapping表
  255. new(ReportChapterType), // 报告章节类型表
  256. new(UserReportViewRecord), // 用户报告阅读记录表(汇总表)
  257. )
  258. }
  259. // initContract 合同 数据表
  260. func initContract() {
  261. orm.RegisterModel(
  262. new(contract.ContractServiceTemplate), //合同服务模板表
  263. new(contract.ContractTemplate), //合同模板表
  264. new(contract.Contract), //合同主表
  265. new(contract.ContractService), //合同服务
  266. new(contract.ContractServiceDetail), //合同服务详情
  267. new(contract.ContractApproval), //合同审批单
  268. new(contract.ContractApprovalRecord), //合同审批流程单(具体审批节点)
  269. new(contract.ContractOperationRecord), //合同操作记录表
  270. new(contract.PayChannel), //支付渠道表
  271. )
  272. }
  273. // initSeal 用印 数据表
  274. func initSeal() {
  275. orm.RegisterModel(
  276. new(seal.Seal), //用印表
  277. new(seal.SealOperationRecord), // 用印操作记录表
  278. new(seal.Attachment), //用印附件表
  279. )
  280. }
  281. // initYb 研报 数据表
  282. func initYb() {
  283. orm.RegisterModel(
  284. new(yb.Activity), // 研报活动表
  285. new(yb.ActivityType), // 研报活动分类表
  286. new(yb.ActivityVoice), // 研报活动语音表
  287. new(yb.ActivityRegister), // 研报活动报名表
  288. new(yb.Speaker), // 研报主持人表
  289. new(yb.ActivityPoster), // 研报活动海报表
  290. new(yb.ApplyRecord), // 研报权限申请记录表
  291. new(yb.ActivityPermission), // 研报活动权限表
  292. new(yb.Comment), //研报留言表
  293. new(yb.Message), //研报消息表
  294. new(yb.QsEvent), // 全时会议表
  295. new(yb.QsEventUser), // 全时会议用户表
  296. new(yb.CommunityQuestion), // 研报问答社区表
  297. new(yb.CommunityQuestionAudio), // 研报问答音频表
  298. new(yb.CommunityVideo), // 研报视频社区表
  299. new(yb.CommunityVideoCover), // 研报视频社区封面库表
  300. new(yb.PriceDriven), // 价格驱动表
  301. new(yb.PriceDrivenSaveLog), // 价格驱动保存记录表
  302. new(yb.ComeinEvent), // 进门会议表
  303. new(yb.ComeinEventUser), // 进门会议用户表
  304. new(yb.PriceDrivenTag), // 价格驱动标签表
  305. new(yb.VoiceSection), // 语音播报板块表
  306. new(yb.YbCommunityQuestionLikeTease), // 问答点赞/吐槽表
  307. new(yb.YbCommunityQuestionComment), // 问答评论表
  308. new(yb.RoadVideo), // 路演视频表
  309. new(day_new.WeworkMsg), // 企业微信会话存档表
  310. new(day_new.WeworkMsgLog), // 企业微信群消息拉取日志表
  311. new(day_new.WeworkUser), // 企业微信用户信息表
  312. new(day_new.DayNewDefault), // 每日资讯默认项
  313. new(yb.BulletChat), // 研报弹幕表
  314. new(yb.CommunityQuestionProcess), // 研报问答社区流程表
  315. new(yb.Pdf), // 研报PDF表
  316. )
  317. }
  318. // 路演记录 数据表
  319. func initRoadShow() {
  320. //注册对象
  321. orm.RegisterModel(
  322. new(roadshow.RsCalendar), //路演主表
  323. new(roadshow.RsCalendarResearcher), //路演研究员信息表
  324. new(roadshow.RsMatters), //公开会议表
  325. new(roadshow.RsCalendarRelation), //路演关系表(与上海的路演日历关系)
  326. new(roadshow.RsReportRecord), //路演统计表
  327. new(roadshow.RsCalendarMeetingUser), //路演参会名单表
  328. new(roadshow.RsCalendarMeetingLabelGroup), //路演参会名单关联的标签表
  329. )
  330. }
  331. // initCygx 查研观项 数据表
  332. func initCygx() {
  333. orm.RegisterModel(
  334. new(cygx.CygxIndustryMap),
  335. new(cygx.CygxIndustrialManagement),
  336. new(cygx.CygxIndustrialAnalyst),
  337. new(cygx.CygxIndustrialSubject),
  338. new(cygx.CygxArticle),
  339. new(cygx.CygxActivity),
  340. new(cygx.CygxActivityVivoPointsSet),
  341. new(cygx.CygxActivitySignup),
  342. new(cygx.CygxActivityRestrictSignup),
  343. new(cygx.CygxActivityAttendanceDetail),
  344. new(cygx.CygxActivityOfflineMeetingDetail),
  345. new(cygx.CygxActivityUserTemplateRecord),
  346. new(cygx.CygxSummaryFastsearchKeywords),
  347. new(cygx.CygxMySchedule),
  348. new(cygx.CygxIndustrialArticleGroupManagement),
  349. new(cygx.CygxIndustrialArticleGroupSubject),
  350. new(cygx.CygxArticleDepartment),
  351. new(cygx.CygxInterfaceLog),
  352. new(cygx.CygxResearchSummary),
  353. new(cygx.CygxResearchSummaryLog),
  354. new(cygx.CygxMinutesSummary),
  355. new(cygx.CygxMinutesSummaryLog),
  356. new(cygx.CygxReportSelection),
  357. new(cygx.CygxReportSelectionLog),
  358. new(cygx.CygxActivityMeetDetailLog),
  359. new(cygx.CygxIndustrialActivityGroupManagement),
  360. new(cygx.CygxIndustrialActivityGroupSubject),
  361. new(cygx.CygxActivitySpecial),
  362. new(cygx.UserRemarks),
  363. new(cygx.CygxActivityUserRemarks),
  364. new(cygx.CygxActivityMeetingHistory),
  365. new(cygx.CygxActivityAppointment),
  366. new(cygx.CygxActivityMeetingReminder),
  367. new(cygx.CygxUserRemind),
  368. new(cygx.CygxArticleType),
  369. new(cygx.CygxIndustryFllow),
  370. new(cygx.CygxActivityVoice),
  371. new(cygx.CygxThreeApiLog),
  372. new(cygx.CygxMicroRoadshowVideo),
  373. new(cygx.CygxMicroRoadshowVideoHistory),
  374. new(cygx.CygxActivityVideo),
  375. new(cygx.CygxActivitySpecialDay),
  376. new(cygx.CygxActivitySpecialTrip),
  377. new(cygx.CygxActivitySpecialMeetingDetail),
  378. new(cygx.CygxMorningMeetingReviewChapter),
  379. new(cygx.CygxMorningMeetingReviews),
  380. new(cygx.CygxResourceData),
  381. new(cygx.CygxReportSelectionChartLog),
  382. new(cygx.CygxActivitySpecialTripBill),
  383. new(cygx.CygxCompanyUserType),
  384. new(cygx.CygxTacticsTimeLine),
  385. new(cygx.CygxProductInterior),
  386. new(cygx.CygxReportMappingCygx),
  387. new(cygx.CygxReportMappingCelue),
  388. new(cygx.CygxReportMappingGroup),
  389. new(cygx.CygxProductInteriorIndustrialGroupManagement),
  390. new(cygx.CygxProductInteriorIndustrialGroupSubject),
  391. new(cygx.CygxActivityPoster),
  392. new(cygx.CygxActivitySignupBreak),
  393. new(cygx.CygxBanner),
  394. new(cygx.CygxUserLabel),
  395. new(cygx.CygxUserLabelActivity),
  396. new(cygx.CygxUserLabelActivitySpecial),
  397. new(cygx.CygxActivitySignupDetail),
  398. new(cygx.CygxActivityPointsSet),
  399. new(cygx.CygxActivityPointsBill),
  400. new(cygx.CygxActivityPointsCompany),
  401. new(cygx.CygxTag),
  402. new(cygx.AliyunOcrLog),
  403. new(cygx.CygxReportMappingCategoryGroup),
  404. new(cygx.CygxResourceDataIndustrialGroupManagement),
  405. new(cygx.CygxResourceDataIndustrialGroupSubject),
  406. new(cygx.CygxYanxuanSpecialAuthor),
  407. new(cygx.CygxYanxuanSpecialApprovalLog),
  408. new(cygx.CygxAllocationCompanyContract),
  409. new(cygx.CygxAllocationCompanyContractLog),
  410. new(cygx.CygxAllocationCompanyContractPermission),
  411. new(cygx.CygxAllocationCompanyContractPermissionLog),
  412. new(cygx.CygxQuestionnaire),
  413. new(cygx.CygxQuestionnaireTheme),
  414. new(cygx.CygxAskserieVideo),
  415. new(cygx.CygxIndustrialAskserieVideoGroupManagement),
  416. new(cygx.CygxActivitySpecialPermissionPoints),
  417. new(cygx.CygxUserYanxuanPermission),
  418. new(cygx.CygxUserYanxuanPermissionLog),
  419. new(cygx.CygxEnterScore),
  420. new(cygx.CygxEnterScoreGroup),
  421. new(cygx.CygxEnterScorePermission),
  422. new(cygx.CygxEnterScoreResearcher),
  423. new(cygx.CygxOrderRefund),
  424. new(cygx.CygxOrder),
  425. new(cygx.CygxOrderAction),
  426. new(cygx.CygxUserFeedback),
  427. )
  428. }
  429. // initShEdbData 上海服务器指标 数据表
  430. func initShEdbData() {
  431. orm.RegisterModel(
  432. //new(Edbdata),
  433. //new(EdbdataDeleteRecord),
  434. //new(EdbdataImportFail),
  435. //new(EdbImportFail), //指标导入失败数据表
  436. //new(Edbinfo), //edb库的edbinfo表
  437. new(data_manage.ExcelStyle), //在线excel样式表
  438. new(data_manage.ExcelEdbdataMapping), //excel样式和指标映射表
  439. )
  440. }
  441. // initEdbData 指标服务 数据表
  442. func initEdbData() {
  443. orm.RegisterModel(
  444. new(data_manage.EdbClassify),
  445. new(data_manage.EdbInfo), //hz_data库的edb_info表
  446. new(data_manage.EdbDataThs),
  447. new(data_manage.EdbDataWind),
  448. new(data_manage.EdbDataPb),
  449. //new(data_manage.ManualUserClassify),
  450. new(data_manage.EdbdataClassify),
  451. //new(data_manage.ManualUser),
  452. new(data_manage.EdbInfoCalculate),
  453. new(data_manage.EdbDataCalculate),
  454. new(data_manage.EdbInfoCalculateLjzzy),
  455. new(data_manage.EdbInfoCalculateTbz),
  456. new(data_manage.EdbInfoCalculateTcz),
  457. new(data_manage.EdbInfoCalculateNszydpjjs),
  458. new(data_manage.SearchKeyword),
  459. new(data_manage.EdbInfoCalculateHbz),
  460. new(data_manage.EdbInfoCalculateHcz),
  461. new(data_manage.EdbInfoCalculateBp),
  462. new(data_manage.BaseFromSmm),
  463. new(data_manage.BaseFromSmmIndex),
  464. new(data_manage.BaseFromSmmData),
  465. new(data_manage.BaseFromSmmClassify),
  466. new(data_manage.EdbInfoLog),
  467. new(data_manage.EdbInfoCalculateMapping),
  468. new(data_manage.EdbDataCalculateZjpj), //直接拼接
  469. new(data_manage.EdbDataCalculateLjztbpj), //累计同比值拼接
  470. new(data_manage.ExcelClassify), //ETA excel表格分类
  471. new(data_manage.ExcelInfo), //ETA excel表格
  472. new(data_manage.ExcelDraft), //ETA excel表格草稿
  473. new(data_manage.PredictEdbConf), //预测指标配置
  474. new(data_manage.BaseFromMysteelChemicalClassify), //预测指标配置
  475. new(data_manage.BaseFromMysteelChemicalIndex), //钢联化工
  476. new(data_manage.BaseFromEiaSteoClassify), // Eia steo 报告指标
  477. new(data_manage.BaseFromEiaSteoIndex), // Eia steo 报告指标分类
  478. new(data_manage.PredictEdbRuleData), //预测指标,动态规则的计算数据
  479. new(data_manage.ComTradeCountry), //联合国商品贸易数据库的国家编码表
  480. new(data_manage.ComTradeData), //联合国商品贸易数据表
  481. new(data_manage.BaseFromSci),
  482. new(data_manage.BaseFromSciIndex),
  483. new(data_manage.BaseFromSciData),
  484. new(data_manage.BaseFromSciClassify),
  485. new(data_manage.TradePositionDalianTop),
  486. new(data_manage.TradePositionZhengzhouTop),
  487. new(data_manage.TradePositionCffexTop),
  488. new(data_manage.TradePositionShanghaiTop),
  489. new(data_manage.TradePositionIneTop),
  490. new(data_manage.BaseFromBaiinfo),
  491. new(data_manage.BaseFromBaiinfoIndex),
  492. new(data_manage.BaseFromBaiinfoData),
  493. new(data_manage.BaseFromBaiinfoClassify),
  494. new(data_manage.EdbDataInsertConfig), // 指标数据插入配置表
  495. new(data_manage.EdbInfoNoPermissionAdmin), //指标不可见用户配置表
  496. )
  497. }
  498. // initChart 图表 数据表
  499. func initChart() {
  500. orm.RegisterModel(
  501. new(data_manage.ChartClassify),
  502. new(data_manage.ChartInfo),
  503. new(data_manage.ChartEdbMapping),
  504. new(data_manage.MyChartClassify),
  505. new(data_manage.MyChart),
  506. new(data_manage.MyChartLog),
  507. new(data_manage.MyChartClassifyMapping),
  508. new(data_manage.ChartInfoLog),
  509. new(data_manage.ChartInfoCorrelation),
  510. )
  511. }
  512. // initEnglishReport 英文报告
  513. func initEnglishReport() {
  514. orm.RegisterModel(
  515. new(EnglishReport),
  516. //new(EnglishPolicyReport),
  517. new(EnglishReportEmail),
  518. new(EnglishReportEmailPV),
  519. new(EnglishReportEmailLog),
  520. new(EnglishClassify),
  521. new(EnglishCompany), // 英文客户
  522. new(EnglishCompanyLog), // 英文客户操作日志
  523. new(EnglishReportEmailOpLog), // 英文联系人操作日志
  524. new(EnglishCompanyTodo), // 英文客户TODO任务
  525. new(EnglishCompanyTodoPublic), // 英文客户公共TODO任务
  526. new(EnglishVideoCover), // 英文研报线上路演视频封面
  527. new(EnglishVideo), // 英文研报线上路演
  528. new(EnPermission), // 英文品种权限表
  529. new(EnCompanyPermission), // 英文客户品种权限关联表
  530. new(EnClassifyPermission), // 英文分类品种权限关联表
  531. )
  532. }
  533. // initPptEnglish ppt英文
  534. //func initPptEnglish() {
  535. // orm.RegisterModel(
  536. // new(ppt_english.PptEnglish),
  537. // new(ppt_english.PptEnglishPublishRecord),
  538. // new(ppt_english.PptEnglishSaveLog),
  539. // new(ppt_english.PptEnglishGroup),
  540. // new(ppt_english.PptEnglishGroupMapping),
  541. // new(ppt_english.PptEnglishGrant), //ppt授权操作表
  542. // new(ppt_english.ReportPptEnglishImg), //Ppt转报告的图片记录表
  543. // )
  544. //}
  545. // initFutureGood 注册期货数据 数据表
  546. func initFutureGood() {
  547. //注册对象
  548. orm.RegisterModel(
  549. new(future_good2.FutureGoodEdbInfo), //期货指标表
  550. new(future_good2.FutureGoodEdbData), //期货指标数据表
  551. //new(future_good2.FutureGoodChartClassify), //期货指标分类表
  552. new(future_good2.ChartInfoFutureGoodProfit), //期货利润图的扩展表
  553. )
  554. }
  555. // initETATrial ETA试用
  556. func initETATrial() {
  557. orm.RegisterModel(
  558. new(eta_trial.EtaTrial),
  559. new(eta_trial.EtaTrialApproval),
  560. new(eta_trial.EtaTrialQuestionnaire),
  561. )
  562. }
  563. // initCloudDisk 共享云盘
  564. //func initCloudDisk() {
  565. // //注册对象
  566. // orm.RegisterModel(
  567. // new(CloudDiskMenu), // 云盘目录表
  568. // new(CloudDiskResource), // 云盘资源表
  569. // )
  570. //}
  571. // 出差
  572. func initBusinessTrip() {
  573. orm.RegisterModel(
  574. new(business_trip.BusinessApply),
  575. new(business_trip.BusinessApplyPeer),
  576. )
  577. }
  578. // 每刻报销
  579. func initMaycur() {
  580. orm.RegisterModel(
  581. new(MaycurCompanyProfile), // 每刻报销-客户档案表
  582. new(MaycurPublicOfferingCompany), // 每刻报销-公募客户表
  583. new(MaycurPublicOfferingSale), // 每刻报销-公募销售表
  584. )
  585. }
  586. // initSemanticAnalysis 语义分析
  587. //func initSemanticAnalysis() {
  588. // orm.RegisterModel(
  589. // new(semantic_analysis.SaLabel), // 语义分析-标签表
  590. // new(semantic_analysis.SaDocClassify), // 语义分析-文档分类表
  591. // new(semantic_analysis.SaDoc), // 语义分析-文档表
  592. // new(semantic_analysis.SaDocSection), // 语义分析-文档段落表
  593. // new(semantic_analysis.SaCompareClassify), // 语义分析-比对分类表
  594. // new(semantic_analysis.SaCompare), // 语义分析-比对表
  595. // new(semantic_analysis.SaCompareDoc), // 语义分析-比对关联文档表
  596. // new(semantic_analysis.SaCompareLabel), // 语义分析-比对段落表
  597. // new(semantic_analysis.SaCompareSearchKeyword), // 语义分析-比对搜索关键词
  598. // )
  599. //}
  600. // initSupplyAnalysis 供应分析
  601. func initSupplyAnalysis() {
  602. orm.RegisterModel(
  603. new(supply_analysis.Variety),
  604. new(supply_analysis.VarietyAdminPermission),
  605. new(supply_analysis.VarietyEdbInfo),
  606. new(supply_analysis.VarietyPlant),
  607. )
  608. }
  609. // initMultipleGraphConfig 多图配置 数据表
  610. func initMultipleGraphConfig() {
  611. //注册对象
  612. orm.RegisterModel(
  613. new(data_manage.MultipleGraphConfig), //多图配置表
  614. new(data_manage.MultipleGraphConfigChartMapping), //图表与多图配置的关系表
  615. new(data_manage.MultipleGraphConfigEdbMapping), //指标与多图配置的关系表
  616. )
  617. }
  618. func initAiChat() {
  619. //注册对象
  620. orm.RegisterModel(
  621. new(aimod.AiChatTopic), //主题
  622. new(aimod.AiChat), //聊天
  623. )
  624. }
  625. // initEtaBusiness ETA商家相关表
  626. func initEtaBusiness() {
  627. orm.RegisterModel(
  628. new(eta_business.EtaBusiness), // ETA商家表
  629. new(eta_business.EtaBusinessContract), // ETA合同表
  630. new(eta_business.EtaBusinessOperationRecord), // ETA操作记录表
  631. new(eta_business.EtaBusinessMenu), // ETA商家菜单表
  632. new(eta_business.EtaBusinessMenuRelate), // ETA商家菜单关联表
  633. new(eta_business.EtaBusinessConfigRelate), // ETA商家配置关联表
  634. new(eta_business.EtaBusinessMenuIcon), // ETA商家菜单icon表
  635. )
  636. }
  637. // initEtaVersionUpdateLog ETA版本更新日志
  638. func initEtaVersionUpdateLog() {
  639. orm.RegisterModel(
  640. new(EtaVersionUpdateLog), // 更新日志表
  641. )
  642. }
  643. func initHelpDoc() {
  644. //注册对象
  645. orm.RegisterModel(
  646. new(help_doc.HelpDocClassify), //分类
  647. new(help_doc.HelpDoc), //文章
  648. )
  649. }
  650. // initEtaTrainingVideo ETA培训视频相关表
  651. func initEtaTrainingVideo() {
  652. orm.RegisterModel(
  653. new(eta_training_video.EtaTrainingVideo), // 视频表
  654. new(eta_training_video.EtaTrainingVideoOpLog), // 视频操作记录表
  655. //new(eta_training_video.EtaTrainingVideoViewLog), // 视频访问记录表
  656. new(eta_training_video.EtaTrainingVideoTag), // 标签表
  657. new(eta_training_video.EtaTrainingVideoTagRelate), // 标签关联表
  658. new(eta_training_video.EtaTrainingVideoClassify), // 分类表
  659. new(eta_training_video.EtaTrainingVideoClassifyRelate), // 分类关联表
  660. )
  661. }
  662. func initOverseasCustom() {
  663. orm.RegisterModel(
  664. new(overseas_custom.OverseasCustomerSale),
  665. )
  666. }