Ureport.sql 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. -- 菜单 SQL
  2. INSERT INTO system_menu(
  3. name, permission, type, sort, parent_id,
  4. path, icon, component, status, component_name
  5. )
  6. VALUES (
  7. 'Ureport2报表管理', '', 2, 0, 1281,
  8. 'ureport-file', '', 'report/ureport/index', 0, 'UreportFile'
  9. );
  10. -- 按钮父菜单ID
  11. -- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
  12. SELECT @parentId := LAST_INSERT_ID();
  13. -- 按钮 SQL
  14. INSERT INTO system_menu(
  15. name, permission, type, sort, parent_id,
  16. path, icon, component, status
  17. )
  18. VALUES (
  19. 'Ureport2报表查询', 'report:ureport-file:query', 3, 1, @parentId,
  20. '', '', '', 0
  21. );
  22. INSERT INTO system_menu(
  23. name, permission, type, sort, parent_id,
  24. path, icon, component, status
  25. )
  26. VALUES (
  27. 'Ureport2报表创建', 'report:ureport-file:create', 3, 2, @parentId,
  28. '', '', '', 0
  29. );
  30. INSERT INTO system_menu(
  31. name, permission, type, sort, parent_id,
  32. path, icon, component, status
  33. )
  34. VALUES (
  35. 'Ureport2报表更新', 'report:ureport-file:update', 3, 3, @parentId,
  36. '', '', '', 0
  37. );
  38. INSERT INTO system_menu(
  39. name, permission, type, sort, parent_id,
  40. path, icon, component, status
  41. )
  42. VALUES (
  43. 'Ureport2报表删除', 'report:ureport-file:delete', 3, 4, @parentId,
  44. '', '', '', 0
  45. );
  46. INSERT INTO system_menu(
  47. name, permission, type, sort, parent_id,
  48. path, icon, component, status
  49. )
  50. VALUES (
  51. 'Ureport2报表导出', 'report:ureport-file:export', 3, 5, @parentId,
  52. '', '', '', 0
  53. );
  54. DROP TABLE IF EXISTS `ureport_file`;
  55. CREATE TABLE `ureport_file` (
  56. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  57. `file_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '文件名称',
  58. `status` tinyint(4) NOT NULL COMMENT '状态',
  59. `file_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '文件内容',
  60. `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注',
  61. `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
  62. `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  63. `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
  64. `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  65. `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
  66. `tenant_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '租户编号',
  67. PRIMARY KEY (`id`) USING BTREE
  68. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'Ureport2报表' ROW_FORMAT = Dynamic;