From cddf1d93735052590755460f4b3c8264e0d57399 Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期一, 07 八月 2023 09:39:20 +0800 Subject: [PATCH] fix --- model/index.go | 166 +++++++++++++++++++++++++++--------------------------- 1 files changed, 83 insertions(+), 83 deletions(-) diff --git a/model/index.go b/model/index.go index 7a0f17c..8c7b0f7 100644 --- a/model/index.go +++ b/model/index.go @@ -1,84 +1,84 @@ -package model - -import ( - "aps_crm/conf" - "aps_crm/pkg/logx" - "aps_crm/pkg/mysqlx" -) - -func Init() error { - if err := mysqlx.Init(&conf.Conf.Mysql, logx.GetLogger()); err != nil { - return err - } - - if err := RegisterTables(); err != nil { - return err - } - - return nil -} - -func RegisterTables() error { - db := mysqlx.GetDB() - err := db.AutoMigrate( - User{}, - Menu{}, - JwtBlacklist{}, - Country{}, - Province{}, - City{}, - Client{}, - ClientLevel{}, - ClientOrigin{}, - ClientStatus{}, - ClientType{}, - Contact{}, - EnterpriseNature{}, - EnterpriseScale{}, - FollowRecord{}, - Industry{}, - RegisteredCapital{}, - SaleChance{}, - SalesLeads{}, - SalesSources{}, - SaleStage{}, - SaleType{}, - RegularCustomers{}, - Possibility{}, - Status{}, - Quotation{}, - MasterOrder{}, - SubOrder{}, - Product{}, - SalesDetails{}, - SalesReturn{}, - SalesRefund{}, - Contract{}, - Plan{}, - ServiceContract{}, - OrderManage{}, - ServiceFollowup{}, - CustomerServiceSheet{}, - ServiceFeeManage{}, - Authority{}, - Api{}, - Department{}, - Satisfaction{}, - TimelyRate{}, - SolveRate{}, - IsVisit{}, - IsVisit{}, - ReportSource{}, - OrderType{}, - ServiceContractStatus{}, - ServiceContractType{}, - RefundMethod{}, - IsInvoice{}, - AccountId{}, - SalesReturnStatus{}, - Repository{}, - QuotationStatus{}, - Currency{}, - ) - return err +package model + +import ( + "aps_crm/conf" + "aps_crm/pkg/logx" + "aps_crm/pkg/mysqlx" +) + +func Init() error { + if err := mysqlx.Init(&conf.Conf.Mysql, logx.GetLogger()); err != nil { + return err + } + + if err := RegisterTables(); err != nil { + return err + } + + return nil +} + +func RegisterTables() error { + db := mysqlx.GetDB() + err := db.AutoMigrate( + User{}, + Menu{}, + JwtBlacklist{}, + Country{}, + Province{}, + City{}, + Client{}, + ClientLevel{}, + ClientOrigin{}, + ClientStatus{}, + ClientType{}, + Contact{}, + EnterpriseNature{}, + EnterpriseScale{}, + FollowRecord{}, + Industry{}, + RegisteredCapital{}, + SaleChance{}, + SalesLeads{}, + SalesSources{}, + SaleStage{}, + SaleType{}, + RegularCustomers{}, + Possibility{}, + Status{}, + Quotation{}, + MasterOrder{}, + SubOrder{}, + Product{}, + SalesDetails{}, + SalesReturn{}, + SalesRefund{}, + Contract{}, + Plan{}, + ServiceContract{}, + OrderManage{}, + ServiceFollowup{}, + CustomerServiceSheet{}, + ServiceFeeManage{}, + Authority{}, + Api{}, + Department{}, + Satisfaction{}, + TimelyRate{}, + SolveRate{}, + IsVisit{}, + IsVisit{}, + ReportSource{}, + OrderType{}, + ServiceContractStatus{}, + ServiceContractType{}, + RefundMethod{}, + IsInvoice{}, + AccountId{}, + SalesReturnStatus{}, + Repository{}, + QuotationStatus{}, + Currency{}, + ) + return err } \ No newline at end of file -- Gitblit v1.8.0