Pārlūkot izejas kodu

通知规则sql提交

xujie 1 gadu atpakaļ
vecāks
revīzija
ea79daa59b
1 mainītis faili ar 49 papildinājumiem un 0 dzēšanām
  1. 49 0
      project_data/sql/0.1.1/soc/soc.sql

+ 49 - 0
project_data/sql/0.1.1/soc/soc.sql

@@ -1181,3 +1181,52 @@ INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (120, 1839945558511747
 
 DELETE FROM `sys_menu` WHERE `id`=01840267252212912129;
 INSERT INTO `soc`.`sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01840267252212912129, '多层字典', 1, 0, 'multilayerdict', 'system/multilayerdict/index', NULL, 1, 0, 'C', '0', '0', '', '1', 'dict', NULL, '超级管理员', '2024-09-29 13:50:03', '超级管理员', '2024-09-29 13:50:46', '');
+
+drop table if exists core_notice_rule;
+CREATE TABLE `core_notice_rule` (
+                                    `id` bigint NOT NULL,
+                                    `name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '规则名称',
+                                    `enable` int DEFAULT '1' COMMENT '是否启用:0.否 1.是',
+                                    `org_id` bigint DEFAULT NULL,
+                                    `is_deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除:0.否 1.是',
+                                    `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+                                    `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+                                    `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '规则描述',
+                                    PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='通知规则表';
+
+drop table if exists core_notice_rule_item;
+CREATE TABLE `core_notice_rule_item` (
+                                         `id` bigint NOT NULL,
+                                         `rule_id` bigint NOT NULL COMMENT '通知规则id',
+                                         `org_id` bigint NOT NULL COMMENT '接收消息的组织机构id',
+                                         `role_id` bigint DEFAULT NULL COMMENT '角色id',
+                                         `user_ids` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
+                                         `send_sms` int DEFAULT NULL COMMENT '是否发送短信:0.否 1.是',
+                                         `all_role_user` int NOT NULL DEFAULT '0' COMMENT '是否选择角色下所有用户:0.否 1.是',
+                                         `product_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '传感器产品名称',
+                                         `is_deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除:0.否 1.是',
+                                         PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+
+drop table if exists core_notice_rule_item_user;
+CREATE TABLE `core_notice_rule_item_user` (
+                                              `id` bigint NOT NULL AUTO_INCREMENT,
+                                              `user_id` bigint DEFAULT NULL,
+                                              `rule_item_id` bigint DEFAULT NULL,
+                                              `rule_id` bigint DEFAULT NULL,
+                                              PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=96 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+
+drop table if exists websocket_notice_log;
+CREATE TABLE `websocket_notice_log` (
+                                        `id` bigint NOT NULL,
+                                        `iot_alarm_id` bigint DEFAULT NULL,
+                                        `org_id` bigint DEFAULT NULL,
+                                        `user_ids` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
+                                        `is_do` int DEFAULT NULL COMMENT '是否处理:0.否 1.是',
+                                        `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+                                        `deal_time` datetime DEFAULT NULL COMMENT '处理时间',
+                                        `deal_user_id` bigint DEFAULT NULL COMMENT '处理人',
+                                        PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;