/*
 Navicat Premium Data Transfer

 Source Server         : 万载三中数据库217
 Source Server Type    : MySQL
 Source Server Version : 80022
 Source Host           : 111.231.169.217:3306
 Source Schema         : smart_middle

 Target Server Type    : MySQL
 Target Server Version : 80022
 File Encoding         : 65001

 Date: 04/01/2024 09:25:27
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for day_meter_detail
-- ----------------------------
DROP TABLE IF EXISTS `day_meter_detail`;
CREATE TABLE `day_meter_detail`  (
  `id` int(0) NOT NULL AUTO_INCREMENT,
  `name` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `type` int(0) NULL DEFAULT NULL,
  `date` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `num` double(10, 0) NOT NULL DEFAULT 0 COMMENT '和上一次记录比较消耗的量',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 89 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for month_meter_detail
-- ----------------------------
DROP TABLE IF EXISTS `month_meter_detail`;
CREATE TABLE `month_meter_detail`  (
  `id` int(0) NOT NULL AUTO_INCREMENT,
  `name` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `type` int(0) NULL DEFAULT NULL,
  `date` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `num` double(10, 0) NOT NULL DEFAULT 0 COMMENT '和上一次记录比较消耗的量',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 49 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_apply
-- ----------------------------
DROP TABLE IF EXISTS `smart_apply`;
CREATE TABLE `smart_apply`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '应用名称',
  `logo` varchar(800) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'logo图标',
  `category` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类别',
  `url_link` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '应用链接',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '应用管理' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_attendance
-- ----------------------------
DROP TABLE IF EXISTS `smart_attendance`;
CREATE TABLE `smart_attendance`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `user_id` int(0) NOT NULL COMMENT '用户ID',
  `class_id` int(0) NOT NULL COMMENT '班级ID',
  `attend_time` datetime(0) NOT NULL COMMENT '签到时间',
  `status` int(0) NOT NULL COMMENT '考勤状态\r\n准时：0\r\n迟到：1\r\n缺卡：3\r\n请假：6\r\n超时打卡：7',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '楼栋表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_author_group
-- ----------------------------
DROP TABLE IF EXISTS `smart_author_group`;
CREATE TABLE `smart_author_group`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `parent_id` int(0) NOT NULL COMMENT '父级ID 为0表示是超级管理员',
  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '权限名称',
  `user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '管理员ID 多个用户用逗号隔开',
  `apply_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '应用权限ID 多个应用用逗号隔开',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1887769493 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '权限组' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_authority
-- ----------------------------
DROP TABLE IF EXISTS `smart_authority`;
CREATE TABLE `smart_authority`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `user_id` int(0) NOT NULL COMMENT '用户ID',
  `group_id` int(0) NOT NULL COMMENT '权限组ID',
  `department_view` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '查看部门权限ID\r\n 多个部门用逗号隔开',
  `department_manage` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '管理部门权限ID 多个部门用逗号隔开',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 104 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '权限管理' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_build
-- ----------------------------
DROP TABLE IF EXISTS `smart_build`;
CREATE TABLE `smart_build`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '楼栋名称',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '楼栋表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_build_meter
-- ----------------------------
DROP TABLE IF EXISTS `smart_build_meter`;
CREATE TABLE `smart_build_meter`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `build_id` int(0) NOT NULL COMMENT '楼栋ID',
  `meter_id` int(0) NOT NULL COMMENT '水/电表ID',
  `meter_type` int(0) NOT NULL COMMENT '水电表类型 水表：0  电表：1',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '楼栋水电表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_class
-- ----------------------------
DROP TABLE IF EXISTS `smart_class`;
CREATE TABLE `smart_class`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `grade_id` int(0) NOT NULL COMMENT '年级ID',
  `class_uid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '班级uid',
  `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '班级名称',
  `class_no` int(0) NOT NULL COMMENT '班级序号',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '楼栋表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_data_class
-- ----------------------------
DROP TABLE IF EXISTS `smart_data_class`;
CREATE TABLE `smart_data_class`  (
  `ds_cls_id` int unsigned NOT NULL COMMENT '主键id',
  `ds_cls_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '数据源类别名称',
  `ds_cls_driver` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '数据源驱动',
  `ds_cls_create_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `ds_cls_update_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
  PRIMARY KEY (`ds_cls_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 28 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '数据源类别' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_data_source
-- ----------------------------
DROP TABLE IF EXISTS `smart_data_source`;
CREATE TABLE `smart_data_source`  (
  `ds_id` int unsigned NOT NULL COMMENT '主键id',
  `ds_cls_id` int unsigned NOT NULL COMMENT '数据源类型id',
  `ds_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '数据源名称',
  `ds_url` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '数据源连接地址',
  `ds_user` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '数据源账号',
  `ds_password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '数据源密码',
  `ds_status` tinyint(1) NULL DEFAULT 0 COMMENT '数据源状态：0异常，1正常',
  `ds_descrition` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '数据源描述',
  `ds_source` int(0) NULL DEFAULT 0 COMMENT '来源数据库使用次数',
  `ds_target` int(0) NULL DEFAULT 0 COMMENT '目的数据库使用次数',
  `ds_create_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `ds_update_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
  PRIMARY KEY (`ds_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 28 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '数据源配置' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_data_source_log
-- ----------------------------
DROP TABLE IF EXISTS `smart_data_source_log`;
CREATE TABLE `smart_data_source_log`  (
  `log_id` int unsigned NOT NULL COMMENT '主键id',
  `log_action_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作名称',
  `log_action_host` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作主机ip',
  `log_action_people` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作人',
  `log_action_module` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作模块',
  `log_action_business` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '业务名称',
  `log_action_remote` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作人ip',
  `log_action_class` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作类型：select login update delete create等',
  `log_action_status` tinyint(1) NULL DEFAULT NULL COMMENT '操作状态：1成功，0失败',
  `log_action_create_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作日志创建时间',
  PRIMARY KEY (`log_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 237 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '数据源操作日志' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_data_task
-- ----------------------------
DROP TABLE IF EXISTS `smart_data_task`;
CREATE TABLE `smart_data_task`  (
  `tk_id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `tk_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '任务名称（唯一）',
  `tk_dt_id` int(0) NULL DEFAULT NULL COMMENT '部门id',
  `tk_ds_id_source` int unsigned NULL COMMENT '来源数据源id',
  `tk_sync_policy` tinyint(1) NULL DEFAULT NULL COMMENT '同步策略：0插入更新，1更新标记，2清空插入',
  `tk_exchange_type` tinyint(1) NULL DEFAULT NULL COMMENT '交换方式：0自定义SQL语句，1数据视图，2数据表',
  `tk_sql` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '数据来源SQL语句',
  `tk_ds_id_destination` int unsigned NULL COMMENT '目标数据源id',
  `tk_dest_table` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '目标数据表',
  `tk_exchange_server` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '交换服务器',
  `tk_exchange_server_id` int(0) NULL DEFAULT NULL COMMENT '指定服务器id',
  `tk_opt_cfg_auto_manual` tinyint(1) NULL DEFAULT 0 COMMENT '运行参数配置：0自动，1手动',
  `tk_opt_cfg_rs_num` int(0) NULL DEFAULT 10 COMMENT '运行参数配置：记录数',
  `tk_opt_cfg_threads_num` int(0) NULL DEFAULT 1 COMMENT '运行参数配置：线程数',
  `tk_rs_incorrect_data` tinyint(1) NULL DEFAULT NULL COMMENT '是否记录错误数据：0是，1否',
  `tk_ds_source_charset` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'UTF8' COMMENT '来源数据源字符集：UTF8 或 GBK',
  `tk_ds_destination_charset` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'UTF8' COMMENT '目的数据源字符集：UTF8 或 GBK',
  `tk_col_relationship` json NULL COMMENT '字段对应关系',
  `tk_cron` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '任务定时表达式',
  `tk_manual_or_auto` tinyint(1) NULL DEFAULT NULL COMMENT '手动或者定时执行：0定时执行，1手动执行',
  `tk_exe_type` tinyint(1) NULL DEFAULT NULL COMMENT '执行方式：0间隔执行，1定点执行，2每天，3每周，4每月',
  `tk_repet_time` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '重复时间',
  `tk_activation` tinyint(1) NULL DEFAULT 0 COMMENT '是否激活（）',
  `tk_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除标记：0未删除，1删除',
  `tk_next_exe_time` timestamp(0) NULL DEFAULT NULL COMMENT '下次执行时间',
  `tk_create_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `tk_update_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
  PRIMARY KEY (`tk_id`) USING BTREE,
  UNIQUE INDEX `idx_tk_name`(`tk_name`) USING BTREE COMMENT '任务名唯一'
) ENGINE = InnoDB AUTO_INCREMENT = 52 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '数据源数据交换任务' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_department
-- ----------------------------
DROP TABLE IF EXISTS `smart_department`;
CREATE TABLE `smart_department`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `parent_id` int(0) NOT NULL COMMENT '父级ID\r\n 为0表示一级',
  `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT ' 部门名称',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_evaluate_tdetail
-- ----------------------------
DROP TABLE IF EXISTS `smart_evaluate_tdetail`;
CREATE TABLE `smart_evaluate_tdetail`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `card_no` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号（学号）',
  `score_item` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '评分项',
  `parent_id` int(0) NOT NULL COMMENT '父级ID 为0表示是主项',
  `score_num` double(10, 0) NOT NULL COMMENT '评分值',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '评分表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_evaluate_teacher
-- ----------------------------
DROP TABLE IF EXISTS `smart_evaluate_teacher`;
CREATE TABLE `smart_evaluate_teacher`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `card_no` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号（学号）',
  `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '姓名',
  `term` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '学期',
  `subject` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '学科',
  `class_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '班级',
  `evaluate_detail` json NULL COMMENT '评分详情',
  `total_score` double(10, 0) NULL DEFAULT NULL COMMENT '总分',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_freeze_record
-- ----------------------------
DROP TABLE IF EXISTS `smart_freeze_record`;
CREATE TABLE `smart_freeze_record`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `user_id` int(0) NOT NULL COMMENT '用户ID',
  `type` int(0) NOT NULL COMMENT '冻结方式\r\n 永久冻结：0\r\n 指定时间：1',
  `deadline` datetime(0) NOT NULL COMMENT '截止时间',
  `reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '冻结原因',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '冻结记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_grade
-- ----------------------------
DROP TABLE IF EXISTS `smart_grade`;
CREATE TABLE `smart_grade`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '年级名称',
  `grade_no` int(0) NOT NULL COMMENT '年级序号',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '楼栋表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_identity
-- ----------------------------
DROP TABLE IF EXISTS `smart_identity`;
CREATE TABLE `smart_identity`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '身份名称',
  `apply_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '应用管理 多个应用用逗号隔开',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '身份表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_meter
-- ----------------------------
DROP TABLE IF EXISTS `smart_meter`;
CREATE TABLE `smart_meter`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '水电表名称',
  `meter_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '水电表号',
  `meter_type` int(0) NOT NULL COMMENT '水电表类型 水表：0  电表：1',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '水电表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_meter_detail
-- ----------------------------
DROP TABLE IF EXISTS `smart_meter_detail`;
CREATE TABLE `smart_meter_detail`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `meter_id` int(0) NOT NULL COMMENT '水电表ID',
  `meter_type` int(0) NOT NULL COMMENT '水电表类型  水表：0  电表：1',
  `meter_power` double(10, 0) NOT NULL COMMENT '和上一次记录比较消耗的量',
  `meter_power_record` double(10, 0) NOT NULL COMMENT '水电表能耗表当前记录数',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '水电表能耗明细表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_school
-- ----------------------------
DROP TABLE IF EXISTS `smart_school`;
CREATE TABLE `smart_school`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `school_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '学校编号',
  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '学校名称',
  `school_badge` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '校徽',
  `logo_image` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '管理平台logo',
  `official_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '公众号名称',
  `appid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'APPID',
  `original_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原始ID',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '学校基本信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_score
-- ----------------------------
DROP TABLE IF EXISTS `smart_score`;
CREATE TABLE `smart_score`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `semester` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '学期',
  `grade` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '年级',
  `school_class` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '班级',
  `card_no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '卡号',
  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '名称',
  `user_id` int(0) NOT NULL COMMENT '学生',
  `subject_id` int(0) NOT NULL COMMENT '学科',
  `exam_type` int(0) NOT NULL COMMENT '考试类型',
  `score` double NOT NULL COMMENT '成绩',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '楼栋表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_score_manage
-- ----------------------------
DROP TABLE IF EXISTS `smart_score_manage`;
CREATE TABLE `smart_score_manage`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `score_item` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '评分项',
  `parent_id` int(0) NOT NULL COMMENT '父级ID 为0表示是主项',
  `score_num` double(10, 0) NOT NULL COMMENT '评分值',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '平分项管理' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_screenshot
-- ----------------------------
DROP TABLE IF EXISTS `smart_screenshot`;
CREATE TABLE `smart_screenshot`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `screenshot_num` int(0) NOT NULL COMMENT '近一年截屏次数',
  `triggers` int(0) NOT NULL COMMENT '触发惩罚 \r\n身份码提醒：0 \r\n冻结1小时：1\r\n冻结2小时：2\r\n冻结4小时：3\r\n冻结8小时：4\r\n冻结1天：5',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '截屏风控' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_screenshot_record
-- ----------------------------
DROP TABLE IF EXISTS `smart_screenshot_record`;
CREATE TABLE `smart_screenshot_record`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `user_id` int(0) NOT NULL COMMENT '用户ID',
  `is_freeze` int(0) NOT NULL COMMENT '是否冻结 未冻结：0； 冻结：1',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '截屏记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_user
-- ----------------------------
DROP TABLE IF EXISTS `smart_user`;
CREATE TABLE `smart_user`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `card_no` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号（学号）',
  `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '姓名',
  `identity_id` int(0) NOT NULL COMMENT '身份ID',
  `id_card` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '身份证号',
  `sex_id` int(0) NOT NULL COMMENT '性别  女：0   男：1',
  `department_id` int(0) NULL DEFAULT NULL COMMENT '部门ID',
  `head_image` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '人脸照片',
  `grade` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '年级',
  `college` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '学院',
  `speciality` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '专业',
  `school_class` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '班级',
  `campus` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '校区',
  `dormitory_number` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '宿舍号',
  `phone` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '手机号',
  `affiliate` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '关联人 被关联用户的身份证号 多个用户用逗号隔开',
  `title` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '职称',
  `address` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '家庭住址',
  `nation` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '民族',
  `of_student` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生源地',
  `graduate` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '毕业学校',
  `duties` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '职务',
  `is_cancel` int(0) NOT NULL COMMENT '是否注销  未注销：0  注销：1',
  `open_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '微信openId',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_visitor
-- ----------------------------
DROP TABLE IF EXISTS `smart_visitor`;
CREATE TABLE `smart_visitor`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `user_id` int(0) NOT NULL COMMENT '用户ID',
  `user_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '访客姓名',
  `user_phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '访客手机号',
  `user_number` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '访客证件号',
  `peer_num` int(0) NOT NULL COMMENT '同行人数',
  `car_num` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '车牌号（家长不让填车牌号）',
  `visit_reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '访问事由',
  `statu` int(0) NOT NULL COMMENT '状态 待审核：1  已拒绝：2  已推送：3',
  `visitor_time` datetime(0) NOT NULL COMMENT '来访时间',
  `visitor_deadline` datetime(0) NOT NULL COMMENT '来访截止时间\r\n家长预约间隔：来访时间+4小时\r\n访客预约：',
  `respondent` int(0) NULL DEFAULT NULL COMMENT '受访者ID',
  `responcode` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '受访者编号',
  `department_id` int(0) NULL DEFAULT NULL COMMENT '部门ID 选择第一个受访者自动把部门ID带过来',
  `respondent_phone` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '受访者电话 学生没有 外部访问者有',
  `respondent_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '受访者姓名',
  `visitor_type` int(0) NOT NULL COMMENT '访客类型 家长：1 其他：2',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '访客预约' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for smart_warning
-- ----------------------------
DROP TABLE IF EXISTS `smart_warning`;
CREATE TABLE `smart_warning`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `user_id` int(0) NOT NULL COMMENT '用户ID',
  `type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '类型',
  `location` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '地点',
  `image` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '图片',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '备注',
  `statu` int(0) NOT NULL COMMENT '状态 未处理：0 已处理：1 已推送：2',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人员',
  `update_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新人员',
  `deleted` int(0) NOT NULL COMMENT '逻辑删除 未删除：0；删除：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '预警信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- View structure for my_view
-- ----------------------------
DROP VIEW IF EXISTS `my_view`;
CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`%` SQL SECURITY DEFINER VIEW `my_view` AS select `smart_data_source`.`ds_cls_id` AS `ds_cls_id`,`smart_data_source`.`ds_name` AS `ds_name` from `smart_data_source` where (`smart_data_source`.`ds_status` = '1');

SET FOREIGN_KEY_CHECKS = 1;
