You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
726 B

  1. package initialize
  2. import (
  3. "gin-vue-admin/global"
  4. "gin-vue-admin/model"
  5. "os"
  6. )
  7. // 注册数据库表专用
  8. func DBTables() {
  9. db := global.GVA_DB
  10. err := db.AutoMigrate(
  11. model.SysUser{},
  12. model.SysAuthority{},
  13. model.SysApi{},
  14. model.SysBaseMenu{},
  15. model.SysBaseMenuParameter{},
  16. model.JwtBlacklist{},
  17. model.SysWorkflow{},
  18. model.SysWorkflowStepInfo{},
  19. model.SysDictionary{},
  20. model.SysDictionaryDetail{},
  21. model.ExaFileUploadAndDownload{},
  22. model.ExaFile{},
  23. model.ExaFileChunk{},
  24. model.ExaSimpleUploader{},
  25. model.ExaCustomer{},
  26. model.SysOperationRecord{},
  27. )
  28. if err != nil {
  29. global.GVA_LOG.Error("register table failed", err)
  30. os.Exit(0)
  31. }
  32. global.GVA_LOG.Debug("register table success")
  33. }