123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753 |
- package models
- import (
- _ "github.com/go-sql-driver/mysql"
- "hongze/hz_crm_api/models/advisory"
- "hongze/hz_crm_api/models/aimod"
- "hongze/hz_crm_api/models/business_trip"
- "hongze/hz_crm_api/models/company"
- "hongze/hz_crm_api/models/company_report_permission_log"
- "hongze/hz_crm_api/models/company_todo"
- "hongze/hz_crm_api/models/company_user"
- "hongze/hz_crm_api/models/contract"
- "hongze/hz_crm_api/models/cygx"
- "hongze/hz_crm_api/models/data_manage"
- future_good2 "hongze/hz_crm_api/models/data_manage/future_good"
- "hongze/hz_crm_api/models/data_manage/supply_analysis"
- "hongze/hz_crm_api/models/day_new"
- "hongze/hz_crm_api/models/eta_business"
- "hongze/hz_crm_api/models/eta_training_video"
- "hongze/hz_crm_api/models/eta_trial"
- "hongze/hz_crm_api/models/help_doc"
- "hongze/hz_crm_api/models/overseas_custom"
- "hongze/hz_crm_api/models/roadshow"
- "hongze/hz_crm_api/models/seal"
- "hongze/hz_crm_api/models/system"
- "hongze/hz_crm_api/models/video"
- "hongze/hz_crm_api/models/yb"
- "hongze/hz_crm_api/utils"
- "time"
- "github.com/beego/beego/v2/client/orm"
- )
- func init() {
- _ = orm.RegisterDataBase("default", "mysql", utils.MYSQL_URL)
- orm.SetMaxIdleConns("default", 50)
- orm.SetMaxOpenConns("default", 100)
- db, _ := orm.GetDB("default")
- db.SetConnMaxLifetime(10 * time.Minute)
- _ = orm.RegisterDataBase("rddp", "mysql", utils.MYSQL_URL_RDDP)
- orm.SetMaxIdleConns("rddp", 50)
- orm.SetMaxOpenConns("rddp", 100)
- report_db, _ := orm.GetDB("rddp")
- report_db.SetConnMaxLifetime(10 * time.Minute)
- _ = orm.RegisterDataBase("edb", "mysql", utils.MYSQL_URL_EDB)
- orm.SetMaxIdleConns("edb", 50)
- orm.SetMaxOpenConns("edb", 100)
- edb_db, _ := orm.GetDB("edb")
- edb_db.SetConnMaxLifetime(10 * time.Minute)
- _ = orm.RegisterDataBase("data", "mysql", utils.MYSQL_URL_DATA)
- orm.SetMaxIdleConns("data", 50)
- orm.SetMaxOpenConns("data", 100)
- data_db, _ := orm.GetDB("data")
- data_db.SetConnMaxLifetime(10 * time.Minute)
- _ = orm.RegisterDataBase("gl", "mysql", utils.MYSQL_URL_GL)
- orm.SetMaxIdleConns("gl", 50)
- orm.SetMaxOpenConns("gl", 100)
- gl, _ := orm.GetDB("gl")
- gl.SetConnMaxLifetime(10 * time.Minute)
- _ = orm.RegisterDataBase("comein_data", "mysql", utils.MYSQL_URL_COMEIN_DATA)
- orm.SetMaxIdleConns("comein_data", 50)
- orm.SetMaxOpenConns("comein_data", 100)
- comein_datadb, _ := orm.GetDB("comein_data")
- comein_datadb.SetConnMaxLifetime(10 * time.Minute)
- _ = orm.RegisterDataBase("weekly_trial", "mysql", utils.MYSQL_URL_WEEKLY_TRIAL)
- orm.SetMaxIdleConns("weekly_trial", 50)
- orm.SetMaxOpenConns("weekly_trial", 100)
- trial_datadb, _ := orm.GetDB("weekly_trial")
- trial_datadb.SetConnMaxLifetime(10 * time.Minute)
- _ = orm.RegisterDataBase("fms", "mysql", utils.MYSQL_URL_FMS)
- orm.SetMaxIdleConns("fms", 50)
- orm.SetMaxOpenConns("fms", 100)
- fms_datadb, _ := orm.GetDB("fms")
- fms_datadb.SetConnMaxLifetime(10 * time.Minute)
- _ = orm.RegisterDataBase("hz_cygx", "mysql", utils.MYSQL_URL_CYGX)
- orm.SetMaxIdleConns("hz_cygx", 50)
- orm.SetMaxOpenConns("hz_cygx", 100)
- cygx_db, _ := orm.GetDB("hz_cygx")
- cygx_db.SetConnMaxLifetime(10 * time.Minute)
- orm.Debug = true
- orm.DebugLog = orm.NewLog(utils.Binlog)
-
- orm.RegisterModel(
- new(Classify),
- new(Banner),
- new(Resource),
-
-
-
- new(video.Video),
- new(video.VideoTags),
- new(OssSTSToken),
-
-
-
-
-
-
- new(VarietyClassify),
- new(VarietyTag),
- new(ResearchVarietyTagRelation),
-
- )
-
- initSystem()
-
- initCompany()
-
- initWxUser()
-
- initReport()
-
- initContract()
-
- initSeal()
-
- initYb()
-
- initRoadShow()
-
-
-
- initShEdbData()
-
- initEdbData()
-
- initChart()
-
- initCygx()
-
- initEnglishReport()
-
-
-
- initFutureGood()
-
-
-
- initETATrial()
-
- initBusinessTrip()
-
- initMaycur()
-
-
-
- initSupplyAnalysis()
-
- initMultipleGraphConfig()
-
- initAiChat()
-
- initEtaBusiness()
-
- initEtaVersionUpdateLog()
-
- initHelpDoc()
-
- initEtaTrainingVideo()
-
- initOverseasCustom()
- }
- func initSystem() {
- orm.RegisterModel(
- new(system.SysUserLoginRecord),
- new(system.SysSession),
- new(system.SysDepartment),
- new(system.SysGroup),
-
- new(system.SysRoleMenuCrm),
- new(system.Admin),
- new(system.SysRole),
- new(system.SysMenuButton),
- new(system.SysRoleButton),
- new(system.ApprovalFlow),
- new(system.ApprovalFlowNode),
- new(system.ResearchGroup),
- new(system.ResearchGroupRelation),
- new(system.SysRoleAdmin),
- new(system.AdminConfig),
- new(system.AdminOperateRecord),
- new(system.AdminVerifyCodeRecord),
- )
- }
- func initCompany() {
- orm.RegisterModel(
- new(company.CompanyApprovalMessage),
- new(company.CompanyOperationRecord),
- new(company.Company),
- new(company.CompanyPermissionLog),
- new(company.CompanyReportPermission),
- new(company.CompanyContract),
- new(company.CompanyContractPermission),
- new(company.CompanyContractPermissionLog),
- new(company.CompanyProduct),
- new(company.CompanyLog),
- new(company.CompanyProductLog),
- new(company.CompanyRenewalReason),
- new(company.CompanyApproval),
- new(company.CompanyProductRemark),
- new(company.CompanyDelayPermission),
- new(company.CompanyProductUpdateLog),
- new(company.CompanyProductTryOutUpdateLog),
- new(company.CompanyProductTryOutUpdatePermissionLog),
- new(company.CompanyDeleteBak),
- new(company.WxUserOpLog),
- new(company_todo.CompanyTodo),
- new(company.SellerCompanyPermission),
- new(company.CompanyServiceRecord),
- new(company.CompanyAscribe),
- new(company.CompanyNoRenewedNote),
- new(company.CompanyNoRenewedAscribe),
- new(company.CompanyNoRenewedAscribeLog),
- new(company.CompanyContractNoRenewedAscribe),
- new(company.CompanyContractNoRenewedAscribeLog),
- new(company.CrmConfig),
- new(company.CompanyRenewalRecord),
- new(company.CompanyHistoryRemark),
- new(company.WxUserMoveLog),
- )
- }
- func initWxUser() {
- orm.RegisterModel(
- new(WxUser),
- new(UserSellerRelation),
- new(UserRecord),
- new(UserTrialApply),
- new(company_user.ChartClassifyPermission),
- new(company_user.CompanyUserChartPermissionOperationRecord),
- )
- }
- func initReport() {
- orm.RegisterModel(
- new(Report),
- new(ReportViewRecord),
- new(advisory.AdvisoryArticle),
- new(advisory.AdvisoryArticleLog),
-
- new(ChartPermissionSearchKeyWordMapping),
- new(ReportChapter),
-
-
- new(company_report_permission_log.CompanyReportPermissionLog),
- new(ReportSendThsDetail),
- new(GroupSendMsg),
- new(UserTemplateRecord),
- new(ChartPermission),
- new(YbPcSuncode),
- new(YbSuncodePars),
-
- new(ClassifyMenu),
- new(ClassifyMenuRelation),
- new(ReportSendThsConfig),
-
- new(ReportChapterType),
- new(UserReportViewRecord),
- )
- }
- func initContract() {
- orm.RegisterModel(
- new(contract.ContractServiceTemplate),
- new(contract.ContractTemplate),
- new(contract.Contract),
- new(contract.ContractService),
- new(contract.ContractServiceDetail),
- new(contract.ContractApproval),
- new(contract.ContractApprovalRecord),
- new(contract.ContractOperationRecord),
- new(contract.PayChannel),
- )
- }
- func initSeal() {
- orm.RegisterModel(
- new(seal.Seal),
- new(seal.SealOperationRecord),
- new(seal.Attachment),
- )
- }
- func initYb() {
- orm.RegisterModel(
- new(yb.Activity),
- new(yb.ActivityType),
- new(yb.ActivityVoice),
- new(yb.ActivityRegister),
- new(yb.Speaker),
- new(yb.ActivityPoster),
- new(yb.ApplyRecord),
- new(yb.ActivityPermission),
- new(yb.Comment),
- new(yb.Message),
- new(yb.QsEvent),
- new(yb.QsEventUser),
- new(yb.CommunityQuestion),
- new(yb.CommunityQuestionAudio),
- new(yb.CommunityVideo),
- new(yb.CommunityVideoCover),
- new(yb.PriceDriven),
- new(yb.PriceDrivenSaveLog),
- new(yb.ComeinEvent),
- new(yb.ComeinEventUser),
- new(yb.PriceDrivenTag),
- new(yb.VoiceSection),
- new(yb.YbCommunityQuestionLikeTease),
- new(yb.YbCommunityQuestionComment),
- new(yb.RoadVideo),
- new(day_new.WeworkMsg),
- new(day_new.WeworkMsgLog),
- new(day_new.WeworkUser),
- new(day_new.DayNewDefault),
- new(yb.BulletChat),
- new(yb.CommunityQuestionProcess),
- new(yb.Pdf),
- )
- }
- func initRoadShow() {
-
- orm.RegisterModel(
- new(roadshow.RsCalendar),
- new(roadshow.RsCalendarResearcher),
- new(roadshow.RsMatters),
- new(roadshow.RsCalendarRelation),
- new(roadshow.RsReportRecord),
- new(roadshow.RsCalendarMeetingUser),
- new(roadshow.RsCalendarMeetingLabelGroup),
- new(roadshow.RsCalendarApiLog),
- new(roadshow.RsReportRecordPermission),
- )
- }
- func initCygx() {
- orm.RegisterModel(
- new(cygx.CygxIndustryMap),
- new(cygx.CygxIndustrialManagement),
- new(cygx.CygxIndustrialAnalyst),
- new(cygx.CygxIndustrialSubject),
- new(cygx.CygxArticle),
- new(cygx.CygxActivity),
- new(cygx.CygxActivityVivoPointsSet),
- new(cygx.CygxActivitySignup),
- new(cygx.CygxActivityRestrictSignup),
- new(cygx.CygxActivityAttendanceDetail),
- new(cygx.CygxActivityOfflineMeetingDetail),
- new(cygx.CygxActivityUserTemplateRecord),
- new(cygx.CygxSummaryFastsearchKeywords),
- new(cygx.CygxMySchedule),
- new(cygx.CygxIndustrialArticleGroupManagement),
- new(cygx.CygxIndustrialArticleGroupSubject),
- new(cygx.CygxArticleDepartment),
- new(cygx.CygxInterfaceLog),
- new(cygx.CygxResearchSummary),
- new(cygx.CygxResearchSummaryLog),
- new(cygx.CygxMinutesSummary),
- new(cygx.CygxMinutesSummaryLog),
- new(cygx.CygxReportSelection),
- new(cygx.CygxReportSelectionLog),
- new(cygx.CygxActivityMeetDetailLog),
- new(cygx.CygxIndustrialActivityGroupManagement),
- new(cygx.CygxIndustrialActivityGroupSubject),
- new(cygx.CygxActivitySpecial),
- new(cygx.UserRemarks),
- new(cygx.CygxActivityUserRemarks),
- new(cygx.CygxActivityMeetingHistory),
- new(cygx.CygxActivityAppointment),
- new(cygx.CygxActivityMeetingReminder),
- new(cygx.CygxUserRemind),
- new(cygx.CygxArticleType),
- new(cygx.CygxIndustryFllow),
- new(cygx.CygxActivityVoice),
- new(cygx.CygxThreeApiLog),
- new(cygx.CygxMicroRoadshowVideo),
- new(cygx.CygxMicroRoadshowVideoHistory),
- new(cygx.CygxActivityVideo),
- new(cygx.CygxActivitySpecialDay),
- new(cygx.CygxActivitySpecialTrip),
- new(cygx.CygxActivitySpecialMeetingDetail),
- new(cygx.CygxMorningMeetingReviewChapter),
- new(cygx.CygxMorningMeetingReviews),
- new(cygx.CygxResourceData),
- new(cygx.CygxReportSelectionChartLog),
- new(cygx.CygxActivitySpecialTripBill),
- new(cygx.CygxCompanyUserType),
- new(cygx.CygxTacticsTimeLine),
- new(cygx.CygxProductInterior),
- new(cygx.CygxReportMappingCygx),
- new(cygx.CygxReportMappingCelue),
- new(cygx.CygxReportMappingGroup),
- new(cygx.CygxProductInteriorIndustrialGroupManagement),
- new(cygx.CygxProductInteriorIndustrialGroupSubject),
- new(cygx.CygxActivityPoster),
- new(cygx.CygxActivitySignupBreak),
- new(cygx.CygxBanner),
- new(cygx.CygxUserLabel),
- new(cygx.CygxUserLabelActivity),
- new(cygx.CygxUserLabelActivitySpecial),
- new(cygx.CygxActivitySignupDetail),
- new(cygx.CygxActivityPointsSet),
- new(cygx.CygxActivityPointsBill),
- new(cygx.CygxActivityPointsCompany),
- new(cygx.CygxTag),
- new(cygx.AliyunOcrLog),
- new(cygx.CygxReportMappingCategoryGroup),
- new(cygx.CygxResourceDataIndustrialGroupManagement),
- new(cygx.CygxResourceDataIndustrialGroupSubject),
- new(cygx.CygxYanxuanSpecialAuthor),
- new(cygx.CygxYanxuanSpecialApprovalLog),
- new(cygx.CygxAllocationCompanyContract),
- new(cygx.CygxAllocationCompanyContractLog),
- new(cygx.CygxAllocationCompanyContractPermission),
- new(cygx.CygxAllocationCompanyContractPermissionLog),
- new(cygx.CygxQuestionnaire),
- new(cygx.CygxQuestionnaireTheme),
- new(cygx.CygxAskserieVideo),
- new(cygx.CygxIndustrialAskserieVideoGroupManagement),
- new(cygx.CygxActivitySpecialPermissionPoints),
- new(cygx.CygxUserYanxuanPermission),
- new(cygx.CygxUserYanxuanPermissionLog),
- new(cygx.CygxEnterScore),
- new(cygx.CygxEnterScoreGroup),
- new(cygx.CygxEnterScorePermission),
- new(cygx.CygxEnterScoreResearcher),
- new(cygx.CygxOrderRefund),
- new(cygx.CygxOrder),
- new(cygx.CygxOrderAction),
- new(cygx.CygxUserFeedback),
- new(cygx.CygxReportSelectionThirdName),
- new(cygx.CygxGushouTimeLine),
- new(cygx.WxUserRaiLabel),
- new(cygx.WxUserRaiLabelLog),
- )
- }
- func initShEdbData() {
- orm.RegisterModel(
-
-
-
-
-
- new(data_manage.ExcelStyle),
- new(data_manage.ExcelEdbdataMapping),
- )
- }
- func initEdbData() {
- orm.RegisterModel(
- new(data_manage.EdbClassify),
- new(data_manage.EdbInfo),
- new(data_manage.EdbDataThs),
- new(data_manage.EdbDataWind),
- new(data_manage.EdbDataPb),
-
- new(data_manage.EdbdataClassify),
-
- new(data_manage.EdbInfoCalculate),
- new(data_manage.EdbDataCalculate),
- new(data_manage.EdbInfoCalculateLjzzy),
- new(data_manage.EdbInfoCalculateTbz),
- new(data_manage.EdbInfoCalculateTcz),
- new(data_manage.EdbInfoCalculateNszydpjjs),
- new(data_manage.SearchKeyword),
- new(data_manage.EdbInfoCalculateHbz),
- new(data_manage.EdbInfoCalculateHcz),
- new(data_manage.EdbInfoCalculateBp),
- new(data_manage.BaseFromSmm),
- new(data_manage.BaseFromSmmIndex),
- new(data_manage.BaseFromSmmData),
- new(data_manage.BaseFromSmmClassify),
- new(data_manage.EdbInfoLog),
- new(data_manage.EdbInfoCalculateMapping),
- new(data_manage.EdbDataCalculateZjpj),
- new(data_manage.EdbDataCalculateLjztbpj),
- new(data_manage.ExcelClassify),
- new(data_manage.ExcelInfo),
- new(data_manage.ExcelDraft),
- new(data_manage.PredictEdbConf),
- new(data_manage.BaseFromMysteelChemicalClassify),
- new(data_manage.BaseFromMysteelChemicalIndex),
- new(data_manage.BaseFromEiaSteoClassify),
- new(data_manage.BaseFromEiaSteoIndex),
- new(data_manage.PredictEdbRuleData),
- new(data_manage.ComTradeCountry),
- new(data_manage.ComTradeData),
- new(data_manage.BaseFromSci),
- new(data_manage.BaseFromSciIndex),
- new(data_manage.BaseFromSciData),
- new(data_manage.BaseFromSciClassify),
- new(data_manage.TradePositionDalianTop),
- new(data_manage.TradePositionZhengzhouTop),
- new(data_manage.TradePositionCffexTop),
- new(data_manage.TradePositionShanghaiTop),
- new(data_manage.TradePositionIneTop),
- new(data_manage.BaseFromBaiinfo),
- new(data_manage.BaseFromBaiinfoIndex),
- new(data_manage.BaseFromBaiinfoData),
- new(data_manage.BaseFromBaiinfoClassify),
- new(data_manage.EdbDataInsertConfig),
- new(data_manage.EdbInfoNoPermissionAdmin),
- )
- }
- 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),
- )
- }
- func initEnglishReport() {
- orm.RegisterModel(
- new(EnglishReport),
-
- new(EnglishReportEmail),
- new(EnglishReportEmailPV),
- new(EnglishReportEmailLog),
- new(EnglishClassify),
- new(EnglishCompany),
- new(EnglishCompanyLog),
- new(EnglishReportEmailOpLog),
- new(EnglishCompanyTodo),
- new(EnglishCompanyTodoPublic),
- new(EnglishVideoCover),
- new(EnglishVideo),
- new(EnPermission),
- new(EnCompanyPermission),
- new(EnClassifyPermission),
- )
- }
- func initFutureGood() {
-
- orm.RegisterModel(
- new(future_good2.FutureGoodEdbInfo),
- new(future_good2.FutureGoodEdbData),
-
- new(future_good2.ChartInfoFutureGoodProfit),
- )
- }
- func initETATrial() {
- orm.RegisterModel(
- new(eta_trial.EtaTrial),
- new(eta_trial.EtaTrialApproval),
- new(eta_trial.EtaTrialQuestionnaire),
- )
- }
- func initBusinessTrip() {
- orm.RegisterModel(
- new(business_trip.BusinessApply),
- new(business_trip.BusinessApplyPeer),
- )
- }
- func initMaycur() {
- orm.RegisterModel(
- new(MaycurCompanyProfile),
- new(MaycurPublicOfferingCompany),
- new(MaycurPublicOfferingSale),
- )
- }
- 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 initAiChat() {
-
- orm.RegisterModel(
- new(aimod.AiChatTopic),
- new(aimod.AiChat),
- )
- }
- func initEtaBusiness() {
- orm.RegisterModel(
- new(eta_business.EtaBusiness),
- new(eta_business.EtaBusinessContract),
- new(eta_business.EtaBusinessOperationRecord),
- new(eta_business.EtaBusinessMenu),
- new(eta_business.EtaBusinessMenuRelate),
- new(eta_business.EtaBusinessConfigRelate),
- new(eta_business.EtaBusinessMenuIcon),
- )
- }
- func initEtaVersionUpdateLog() {
- orm.RegisterModel(
- new(EtaVersionUpdateLog),
- )
- }
- func initHelpDoc() {
-
- orm.RegisterModel(
- new(help_doc.HelpDocClassify),
- new(help_doc.HelpDoc),
- )
- }
- func initEtaTrainingVideo() {
- orm.RegisterModel(
- new(eta_training_video.EtaTrainingVideo),
- new(eta_training_video.EtaTrainingVideoOpLog),
-
- new(eta_training_video.EtaTrainingVideoTag),
- new(eta_training_video.EtaTrainingVideoTagRelate),
- new(eta_training_video.EtaTrainingVideoClassify),
- new(eta_training_video.EtaTrainingVideoClassifyRelate),
- )
- }
- func initOverseasCustom() {
- orm.RegisterModel(
- new(overseas_custom.OverseasCustomerSale),
- )
- }
|