liujiandao
2023-11-16 d20acf38c36c11ee4428c3e74a17f5870dc61b51
initialize/gorm.go
@@ -4,12 +4,9 @@
   "os"
   "srm/model/purchase"
   "srm/global"
   "srm/model/example"
   "srm/model/system"
   "go.uber.org/zap"
   "gorm.io/gorm"
   "srm/global"
   "srm/model/test"
)
@@ -33,33 +30,13 @@
func RegisterTables() {
   db := global.GVA_DB
   err := db.AutoMigrate(
      system.SysApi{},
      system.SysUser{},
      system.SysBaseMenu{},
      system.JwtBlacklist{},
      system.SysAuthority{},
      system.SysDictionary{},
      system.SysOperationRecord{},
      system.SysAutoCodeHistory{},
      system.SysDictionaryDetail{},
      system.SysBaseMenuParameter{},
      system.SysBaseMenuBtn{},
      system.SysAuthorityBtn{},
      system.SysAutoCode{},
      system.SysChatGptOption{},
      example.ExaFile{},
      example.ExaCustomer{},
      example.ExaFileChunk{},
      example.ExaFileUploadAndDownload{},
      test.Industry{},
      test.SupplierType{},
      test.Supplier{},
      test.Contract{},
      test.Product{},
      test.Member{},
      purchase.Purchase{}, purchase.PurchaseProducts{},
      test.SupplierMaterial{},
      purchase.Purchase{},
      purchase.PurchaseProducts{},
   )
   if err != nil {
      global.GVA_LOG.Error("register table failed", zap.Error(err))