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.

77 lines
1.2 KiB

  1. package datas
  2. import (
  3. "gorm.io/gorm"
  4. )
  5. type SysAuthorityMenus struct {
  6. SysAuthorityAuthorityId string
  7. SysBaseMenuId uint
  8. }
  9. var AuthorityMenus = []SysAuthorityMenus{
  10. {"888", 1},
  11. {"888", 2},
  12. {"888", 3},
  13. {"888", 4},
  14. {"888", 5},
  15. {"888", 6},
  16. {"888", 7},
  17. {"888", 8},
  18. {"888", 9},
  19. {"888", 10},
  20. {"888", 11},
  21. {"888", 12},
  22. {"888", 13},
  23. {"888", 14},
  24. {"888", 15},
  25. {"888", 16},
  26. {"888", 17},
  27. {"888", 18},
  28. {"888", 19},
  29. {"888", 20},
  30. {"888", 21},
  31. {"888", 22},
  32. {"888", 23},
  33. {"888", 24},
  34. {"888", 25},
  35. {"888", 26},
  36. {"888", 27},
  37. {"888", 28},
  38. {"888", 29},
  39. {"8881", 1},
  40. {"8881", 2},
  41. {"8881", 8},
  42. {"8881", 17},
  43. {"8881", 18},
  44. {"8881", 19},
  45. {"8881", 20},
  46. {"9528", 1},
  47. {"9528", 2},
  48. {"9528", 3},
  49. {"9528", 4},
  50. {"9528", 5},
  51. {"9528", 6},
  52. {"9528", 7},
  53. {"9528", 8},
  54. {"9528", 9},
  55. {"9528", 10},
  56. {"9528", 11},
  57. {"9528", 12},
  58. {"9528", 13},
  59. {"9528", 14},
  60. {"9528", 15},
  61. {"9528", 17},
  62. {"9528", 18},
  63. {"9528", 19},
  64. {"9528", 20},
  65. }
  66. func InitSysAuthorityMenus(db *gorm.DB) (err error) {
  67. return db.Table("sys_authority_menus").Transaction(func(tx *gorm.DB) error {
  68. if tx.Create(&AuthorityMenus).Error != nil { // 遇到错误时回滚事务
  69. return err
  70. }
  71. return nil
  72. })
  73. }