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.

75 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. {"8881", 1},
  38. {"8881", 2},
  39. {"8881", 8},
  40. {"8881", 17},
  41. {"8881", 18},
  42. {"8881", 19},
  43. {"8881", 20},
  44. {"9528", 1},
  45. {"9528", 2},
  46. {"9528", 3},
  47. {"9528", 4},
  48. {"9528", 5},
  49. {"9528", 6},
  50. {"9528", 7},
  51. {"9528", 8},
  52. {"9528", 9},
  53. {"9528", 10},
  54. {"9528", 11},
  55. {"9528", 12},
  56. {"9528", 13},
  57. {"9528", 14},
  58. {"9528", 15},
  59. {"9528", 17},
  60. {"9528", 18},
  61. {"9528", 19},
  62. {"9528", 20},
  63. }
  64. func InitSysAuthorityMenus(db *gorm.DB) (err error) {
  65. return db.Table("sys_authority_menus").Transaction(func(tx *gorm.DB) error {
  66. if tx.Create(&AuthorityMenus).Error != nil { // 遇到错误时回滚事务
  67. return err
  68. }
  69. return nil
  70. })
  71. }