/*
 Navicat Premium Dump SQL

 Source Server         : 非现场执法开发环境
 Source Server Type    : MySQL
 Source Server Version : 50722 (5.7.22-log)
 Source Host           : 146.56.223.227:3306
 Source Schema         : zfjd2.0-nos

 Target Server Type    : MySQL
 Target Server Version : 50722 (5.7.22-log)
 File Encoding         : 65001

 Date: 12/06/2026 10:40:29
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for nos_law_enforcement_comment_msg
-- ----------------------------
DROP TABLE IF EXISTS `nos_law_enforcement_comment_msg`;
CREATE TABLE `nos_law_enforcement_comment_msg`  (
  `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `task_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务id',
  `task_type` int(11) NOT NULL COMMENT '任务类别（1-行政检查、2-材料备案、3-材料验证、4-待核实案件）',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题',
  `enterprise_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '企业id',
  `enterprise_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '企业名称',
  `law_enforcement_agency_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执法单位id',
  `law_enforcement_agency` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执法单位名称',
  `law_enforcer` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执法人员',
  `comment_status` int(11) NOT NULL COMMENT '评价状态（0-未评价，1-已评价）',
  `comment_time` datetime NOT NULL COMMENT '评价时间',
  `check_time` datetime NOT NULL COMMENT '办结时间',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人id',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `is_delete` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '逻辑删除：0-否，1-是',
  `create_dept` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建部门id',
  `bureau_dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法单位id',
  `dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id',
  `organ_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织单位id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_enterprise_id`(`enterprise_id`) USING BTREE,
  INDEX `idx_law_enforcement_agency_id`(`law_enforcement_agency_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '非现场执法任务评价消息表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for nos_law_enforcement_filing
-- ----------------------------
DROP TABLE IF EXISTS `nos_law_enforcement_filing`;
CREATE TABLE `nos_law_enforcement_filing`  (
  `id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `law_enforcement_agency_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执法单位id',
  `law_enforcement_agency` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执法单位名称',
  `legal_materials` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '法治材料',
  `technical_materials` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '技术材料',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人id',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `is_delete` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '逻辑删除：0-否，1-是',
  `create_dept` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建部门id',
  `bureau_dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法单位id',
  `dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id',
  `organ_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织单位id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_law_enforcement_agency_id`(`law_enforcement_agency_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '非现场执法备案表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for nos_law_enforcement_task
-- ----------------------------
DROP TABLE IF EXISTS `nos_law_enforcement_task`;
CREATE TABLE `nos_law_enforcement_task`  (
  `id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `task_type_id` int(11) NOT NULL COMMENT '类别id（1-行政检查、2-材料备案、3-材料验证、4-待核实案件）',
  `proclamation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '公告',
  `task_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务编号',
  `task_source_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务来源id',
  `task_source_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务来源名称',
  `enterprise_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '企业id',
  `enterprise_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '企业名称',
  `usci_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '统一社会信用代码',
  `law_enforcement_agency_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法单位id',
  `law_enforcement_agency` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执法单位名称',
  `task_original_type_id` int(11) NULL DEFAULT NULL COMMENT '待核实处置案件原类别id',
  `law_enforcement_matters` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '执法事项',
  `legal_basis` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执法依据',
  `deadline` datetime NOT NULL COMMENT '截止日期',
  `enterprise_handle_time` datetime NULL DEFAULT NULL COMMENT '企业处理时间',
  `check_result` int(11) NULL DEFAULT NULL COMMENT '检查结果（0-已完成，1-转为待核实处置案件，2-退回企业补正材料）',
  `check_time` datetime NULL DEFAULT NULL COMMENT '检查时间',
  `task_status` int(11) NULL DEFAULT NULL COMMENT '任务状态',
  `expiration_notice` int(11) NULL DEFAULT 0 COMMENT '过期通知（0-未发送，1-已发送）',
  `is_evaluation` int(11) NULL DEFAULT 0 COMMENT '是否评价（0-未评价，1-已评价）',
  `comment_time` datetime NULL DEFAULT NULL COMMENT '评价时间',
  `digital_voice_logging_status` int(11) NULL DEFAULT 0 COMMENT '云笔录状态（0-未发起，1-待企业提交，2-待执法人员确认，3-已完成）',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人id',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `is_delete` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '逻辑删除：0-否，1-是',
  `create_dept` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建部门id',
  `bureau_dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法单位id',
  `dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id',
  `organ_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织单位id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_task_no`(`task_no`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '非现场执法任务表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for nos_law_enforcement_task_comment
-- ----------------------------
DROP TABLE IF EXISTS `nos_law_enforcement_task_comment`;
CREATE TABLE `nos_law_enforcement_task_comment`  (
  `id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键id',
  `task_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务id',
  `satisfaction` int(11) NOT NULL COMMENT '满意度（0-满意，1-一般，2-不满意）',
  `reason` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '原因',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人id',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `is_delete` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '逻辑删除：0-否，1-是',
  `create_dept` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建部门id',
  `bureau_dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法单位id',
  `dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id',
  `organ_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织单位id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_task_id`(`task_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '非现场执法任务评论表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for nos_law_enforcement_task_digital_voice_logging_relation
-- ----------------------------
DROP TABLE IF EXISTS `nos_law_enforcement_task_digital_voice_logging_relation`;
CREATE TABLE `nos_law_enforcement_task_digital_voice_logging_relation`  (
  `id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'id',
  `task_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务id',
  `cloud_video` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '云视频',
  `cloud_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '云文字',
  `suggestion` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '意见',
  `confirm_time` datetime NULL DEFAULT NULL COMMENT '执法人员确认时间',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人id',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `is_delete` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '逻辑删除：0-否，1-是',
  `create_dept` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建部门id',
  `bureau_dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法单位id',
  `dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id',
  `organ_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织单位id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_task_id`(`task_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '非现场执法任务和云笔录关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for nos_law_enforcement_task_item
-- ----------------------------
DROP TABLE IF EXISTS `nos_law_enforcement_task_item`;
CREATE TABLE `nos_law_enforcement_task_item`  (
  `id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `task_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '非现场执法任务id',
  `item_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '检查项名称',
  `item_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '检查项内容',
  `pass` int(11) NULL DEFAULT NULL COMMENT '是否通过（0-有异议，1-通过）',
  `reason` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '异议原因',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人id',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `is_delete` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '逻辑删除：0-否，1-是',
  `create_dept` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建部门id',
  `bureau_dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法单位id',
  `dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id',
  `organ_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织单位id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_task_id`(`task_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '非现场执法任务项' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for nos_law_enforcement_task_law_enforcer_relation
-- ----------------------------
DROP TABLE IF EXISTS `nos_law_enforcement_task_law_enforcer_relation`;
CREATE TABLE `nos_law_enforcement_task_law_enforcer_relation`  (
  `id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `task_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '非现场执法任务id',
  `law_enforcer_id` bigint(20) NOT NULL COMMENT '执法人员id',
  `law_enforcer_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法人员名称',
  `law_enforcer_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法人员手机号',
  `law_enforcer_id_card` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法人员证件号',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人id',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `is_delete` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '逻辑删除：0-否，1-是',
  `create_dept` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建部门id',
  `bureau_dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法单位id',
  `dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id',
  `organ_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织单位id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_task_id`(`task_id`) USING BTREE,
  INDEX `idx_law_enforcer_id`(`law_enforcer_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '非现场执法任务关联执法人员表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for nos_law_enforcement_task_msg
-- ----------------------------
DROP TABLE IF EXISTS `nos_law_enforcement_task_msg`;
CREATE TABLE `nos_law_enforcement_task_msg`  (
  `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `task_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务id',
  `task_type` int(11) NOT NULL COMMENT '任务类别（1-行政检查、2-材料备案、3-材料验证、4-待核实案件）',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '消息标题',
  `enterprise_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '企业id',
  `enterprise_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '企业名称',
  `law_enforcement_agency_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法单位id',
  `law_enforcement_agency` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法单位名称',
  `deadline` datetime NULL DEFAULT NULL COMMENT '截止日期',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人id',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `is_delete` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '逻辑删除：0-否，1-是',
  `create_dept` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建部门id',
  `bureau_dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法单位id',
  `dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id',
  `organ_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织单位id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_enterprise_id`(`enterprise_id`) USING BTREE,
  INDEX `idx_law_enforcement_agency_id`(`law_enforcement_agency_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '非现场执法任务消息表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for nos_law_enforcement_task_source
-- ----------------------------
DROP TABLE IF EXISTS `nos_law_enforcement_task_source`;
CREATE TABLE `nos_law_enforcement_task_source`  (
  `id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `source_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务来源名称',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人id',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `is_delete` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '逻辑删除：0-否，1-是',
  `create_dept` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建部门id',
  `bureau_dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法单位id',
  `dept_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id',
  `organ_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织单位id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '非现场执法任务来源' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for sys_message_view_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_message_view_log`;
CREATE TABLE `sys_message_view_log`  (
  `id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键ID',
  `source_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '来源表ID',
  `platform_type` int(11) NOT NULL COMMENT '平台类型 1-监督端 2-执法端 3-企业端',
  `source_type` tinyint(4) NOT NULL COMMENT '来源表类型：1-普法消息',
  `company_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业ID',
  `credit_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '企业统一社会信用代码',
  `bureau_dept_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执法单位ID',
  `organ_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构ID',
  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '创建者',
  `create_by_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者名称',
  `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_dept` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门ID',
  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '更新者',
  `update_by_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新者名称',
  `update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `is_delete` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否删除 0=否 1=是',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_source_id`(`source_id`) USING BTREE,
  INDEX `idx_platform_type`(`platform_type`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统消息浏览表' ROW_FORMAT = Dynamic;




INSERT INTO `zfjd2.0-nos`.`nos_law_enforcement_task_source` (`id`, `source_name`, `create_by`, `create_time`, `update_by`, `update_time`, `is_delete`, `create_dept`, `bureau_dept_id`, `dept_id`, `organ_id`) VALUES ('1', '日常检查', NULL, '2026-05-22 11:14:09', NULL, '2026-05-22 11:14:09', '0', NULL, NULL, NULL, NULL);
INSERT INTO `zfjd2.0-nos`.`nos_law_enforcement_task_source` (`id`, `source_name`, `create_by`, `create_time`, `update_by`, `update_time`, `is_delete`, `create_dept`, `bureau_dept_id`, `dept_id`, `organ_id`) VALUES ('2', '投诉举报', NULL, '2026-05-22 11:14:09', NULL, '2026-05-22 11:14:09', '0', NULL, NULL, NULL, NULL);
INSERT INTO `zfjd2.0-nos`.`nos_law_enforcement_task_source` (`id`, `source_name`, `create_by`, `create_time`, `update_by`, `update_time`, `is_delete`, `create_dept`, `bureau_dept_id`, `dept_id`, `organ_id`) VALUES ('3', '上级交办', NULL, '2026-05-22 11:14:09', NULL, '2026-05-22 11:14:09', '0', NULL, NULL, NULL, NULL);
INSERT INTO `zfjd2.0-nos`.`nos_law_enforcement_task_source` (`id`, `source_name`, `create_by`, `create_time`, `update_by`, `update_time`, `is_delete`, `create_dept`, `bureau_dept_id`, `dept_id`, `organ_id`) VALUES ('4', '部门移送', NULL, '2026-05-22 11:14:09', NULL, '2026-05-22 11:14:09', '0', NULL, NULL, NULL, NULL);
INSERT INTO `zfjd2.0-nos`.`nos_law_enforcement_task_source` (`id`, `source_name`, `create_by`, `create_time`, `update_by`, `update_time`, `is_delete`, `create_dept`, `bureau_dept_id`, `dept_id`, `organ_id`) VALUES ('5', '重点领域治理部署', NULL, '2026-05-22 11:14:09', NULL, '2026-05-22 11:14:09', '0', NULL, NULL, NULL, NULL);
INSERT INTO `zfjd2.0-nos`.`nos_law_enforcement_task_source` (`id`, `source_name`, `create_by`, `create_time`, `update_by`, `update_time`, `is_delete`, `create_dept`, `bureau_dept_id`, `dept_id`, `organ_id`) VALUES ('6', '专项行动', NULL, '2026-05-22 11:14:09', NULL, '2026-05-22 11:14:09', '0', NULL, NULL, NULL, NULL);
INSERT INTO `zfjd2.0-nos`.`nos_law_enforcement_task_source` (`id`, `source_name`, `create_by`, `create_time`, `update_by`, `update_time`, `is_delete`, `create_dept`, `bureau_dept_id`, `dept_id`, `organ_id`) VALUES ('7', '其它', NULL, '2026-05-22 11:14:09', NULL, '2026-05-22 11:14:09', '0', NULL, NULL, NULL, NULL);






SET FOREIGN_KEY_CHECKS = 1;
