use `qc`;


/**
sys_dictionary_info 字段表配置消息通知下拉框搜索内容
 */
INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '46', '全部', '', '2', '0', '通知类型');
INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '46', '质控任务', '1', '2', '1', '通知类型');
INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '47', '全部', '', '2', '0', '阅读状态');
INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '47', '未读', '0', '2', '1', '阅读状态');
INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '47', '已读', '1', '2', '2', '阅读状态');


/**
sys_menu 新增消息通知菜单
 */
INSERT INTO `sys_menu` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES ('120', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '消息通知', '-1', 'YH-XXTZ', '1', '1', '16', '用户-消息通知');
INSERT INTO `sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('210', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '查看', 'FUNC000210', '/medNewsNotice/getNewsNoticeInfoById', 'ALL', '查看', '用户-消息通知-查看');
INSERT INTO `sys_menu_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '120', '210', NULL, '用户-消息通知-查看');

/**
sys_role_menu 全院、科室、个人、核查人员（院级、科室、质控科）六个角色添加消息通知菜单
 */
INSERT INTO `sys_role_menu` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ('N', '2022-05-05 10:36:44', '2022-05-05 10:36:44', '0', '0', '1', '120', NULL);
INSERT INTO `sys_role_menu` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ('N', '2022-05-05 10:36:44', '2022-05-05 10:36:44', '0', '0', '2', '120', NULL);
INSERT INTO `sys_role_menu` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ('N', '2022-05-05 10:36:44', '2022-05-05 10:36:44', '0', '0', '3', '120', NULL);
INSERT INTO `sys_role_menu` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ('N', '2022-05-05 10:36:44', '2022-05-05 10:36:44', '0', '0', '7', '120', NULL);
INSERT INTO `sys_role_menu` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ('N', '2022-05-05 10:36:44', '2022-05-05 10:36:44', '0', '0', '8', '120', NULL);
INSERT INTO `sys_role_menu` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ('N', '2022-05-05 10:36:44', '2022-05-05 10:36:44', '0', '0', '9', '120', NULL);


/**
med_news_notice 消息通知表
 */
DROP TABLE IF EXISTS `med_news_notice`;
CREATE TABLE `med_news_notice` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `hospital_id` bigint(11) DEFAULT NULL COMMENT '医院ID',
  `title` varchar(512) NOT NULL COMMENT '标题',
  `type` char(3) DEFAULT '0' COMMENT '通知类型,1:质控任务 0:其他',
  `news` longtext COMMENT '消息',
  `status` char(3) DEFAULT '0' COMMENT '阅读状态,0:未读 1:已读',
  `sender` varchar(20) DEFAULT '0' COMMENT '发送者',
  `receiver` varchar(20) DEFAULT '0' COMMENT '接收者',
  `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除，Y:删除',
  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
  `creator` varchar(60) DEFAULT '0' COMMENT '创建人，0表示无创建人值',
  `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='消息通知表';


