-- --------------------------------------------------------
-- 主机:                           192.168.10.4
-- 服务器版本:                        5.7.41 - MySQL Community Server (GPL)
-- 服务器操作系统:                      Linux
-- HeidiSQL 版本:                  12.5.0.6677
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


-- 导出 finclip 的数据库结构
CREATE DATABASE IF NOT EXISTS `finclip` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `finclip`;

-- 导出  表 finclip.szja_app_info 结构
CREATE TABLE IF NOT EXISTS `szja_app_info` (
  `code` varchar(32) NOT NULL COMMENT '地方政企APP编号',
  `finclip_id` varchar(64) NOT NULL COMMENT '关联finclip应用Id',
  `secret_key` varchar(32) NOT NULL COMMENT '加密密钥',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`code`) USING BTREE,
  UNIQUE KEY `unq_szja_app_info` (`finclip_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_app_info 的数据：~3 rows (大约)
INSERT INTO `szja_app_info` (`code`, `finclip_id`, `secret_key`, `create_time`, `update_time`) VALUES
	('42', '84', 'anim exercitation commodo', NULL, NULL),
	('6433be833832fb000180193e', 'akaudgau19171f001', 'yuha719aa9a0akah', '2023-04-10 16:10:48', NULL),
	('yuha719aa9a0aka', 'akaudgau19171f022', 'yuha719aa9a0akah', '2023-04-10 16:10:48', NULL);

-- 导出  表 finclip.szja_area_info 结构
CREATE TABLE IF NOT EXISTS `szja_area_info` (
  `area_code` char(6) NOT NULL COMMENT '地区编码',
  `area_name` varchar(32) NOT NULL COMMENT '地区名称',
  `mqtt_url` varchar(128) DEFAULT NULL COMMENT 'mqtt地址',
  `secret_key` varchar(32) DEFAULT NULL COMMENT '加密密钥',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_area_info 的数据：~1 rows (大约)
INSERT INTO `szja_area_info` (`area_code`, `area_name`, `mqtt_url`, `secret_key`, `create_time`, `update_time`) VALUES
	('320722', '江苏省连云港市东海县', 'tcp://103.222.189.9:60039/mqtt', 'XSauNQKZ6NGR5lJm', '2023-04-11 15:28:39', '2023-04-11 15:28:39');

-- 导出  表 finclip.szja_client_info 结构
CREATE TABLE IF NOT EXISTS `szja_client_info` (
  `client_id` varchar(32) NOT NULL,
  `client_secret` varchar(64) NOT NULL COMMENT '第三方密钥',
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型',
  `encoding_key` varchar(32) DEFAULT NULL COMMENT '反向请求密钥',
  `apply_time` datetime NOT NULL COMMENT '绑定时间',
  `delete_time` datetime DEFAULT NULL COMMENT '删除时间',
  `reference_id` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_client_info 的数据：~6 rows (大约)
INSERT INTO `szja_client_info` (`client_id`, `client_secret`, `type`, `encoding_key`, `apply_time`, `delete_time`, `reference_id`) VALUES
	('031f61379ba34eeeb2c8f716ad6c540e', '4d8c3cd9d96840549f34c7e9aefe05ce', 3, '1', '2023-08-02 18:03:07', NULL, NULL),
	('1', 'abe123f5e3d648a1a9212c4f3f781d44', 0, NULL, '2023-08-02 18:29:34', NULL, '1'),
	('13b073fb9e0341dbaad7408bad02ea8c', '149777c503de4bbba70a8d1a65e94365', 1, '1iAKGrCQvNluZWtY', '2023-08-03 16:47:46', NULL, '6'),
	('3e18cdba803b45709ad9693a4471aad6', '388f0e908ec64efba1099c338cd5eb96', 1, '2GI9FMe2BNVYsVEv', '2023-08-03 16:00:17', NULL, '1515'),
	('68c676435403412dad208602e9e617ad', '13939d43b3f74a85bd27df9c444727ba', 1, 'ANsocM9RFImXUSyP', '2023-08-03 15:59:35', NULL, '0'),
	('717f631eb3dc4a7e89e2372b8533c3d8', '2e5e10ab5e69439e8ea5996cf6434c95', 1, 'rj6Pd1EjYaDvBdjt', '2023-08-03 15:41:43', NULL, '2');

-- 导出  表 finclip.szja_client_token 结构
CREATE TABLE IF NOT EXISTS `szja_client_token` (
  `client_id` varchar(32) NOT NULL COMMENT '第三方Id',
  `token` varchar(32) NOT NULL COMMENT '访问令牌',
  `expires_time` datetime DEFAULT NULL COMMENT '过期时间',
  `apply_time` datetime NOT NULL COMMENT '绑定时间',
  `delete_time` datetime NOT NULL COMMENT '删除时间',
  PRIMARY KEY (`client_id`) USING BTREE,
  KEY `szja_client_token_token_IDX` (`token`) USING BTREE,
  KEY `szja_client_token_expires_time_IDX` (`expires_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_client_token 的数据：~2 rows (大约)
INSERT INTO `szja_client_token` (`client_id`, `token`, `expires_time`, `apply_time`, `delete_time`) VALUES
	('031f61379ba34eeeb2c8f716ad6c540e', '40198d76c03f4becab021ce1ee59d217', '2023-08-08 14:59:13', '2023-05-11 09:53:41', '2023-08-08 14:59:13'),
	('1', 'af464cc7c62d44ab983627d1508197d7', '2023-08-04 15:44:56', '2023-08-03 12:34:13', '2023-08-04 15:44:56');

-- 导出  表 finclip.szja_community_info 结构
CREATE TABLE IF NOT EXISTS `szja_community_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL COMMENT '社区名称',
  `street_id` int(11) DEFAULT NULL COMMENT '所属街道',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- 正在导出表  finclip.szja_community_info 的数据：~2 rows (大约)
INSERT INTO `szja_community_info` (`id`, `name`, `street_id`, `create_time`, `update_time`) VALUES
	(1, '中港社区居委会', 1, NULL, NULL),
	(2, 'xxx', 2, NULL, NULL);

-- 导出  表 finclip.szja_device_alarm_info 结构
CREATE TABLE IF NOT EXISTS `szja_device_alarm_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(64) DEFAULT '0' COMMENT '用户名称',
  `sex` tinyint(4) DEFAULT NULL COMMENT '性别',
  `height` int(11) DEFAULT '0' COMMENT '身高',
  `birthday` varchar(10) DEFAULT NULL COMMENT '出生年月',
  `dev_id` varchar(32) NOT NULL DEFAULT '0' COMMENT '设备ID',
  `dev_name` varchar(64) NOT NULL DEFAULT '0' COMMENT '设备名称',
  `room` varchar(32) DEFAULT NULL COMMENT '房间名',
  `alarm_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '告警类型',
  `status` int(11) NOT NULL DEFAULT '0' COMMENT '告警状态',
  `reason` varchar(32) DEFAULT NULL COMMENT '处理结果',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='设备报警信息表';

-- 正在导出表  finclip.szja_device_alarm_info 的数据：~12 rows (大约)
INSERT INTO `szja_device_alarm_info` (`id`, `name`, `sex`, `height`, `birthday`, `dev_id`, `dev_name`, `room`, `alarm_type`, `status`, `reason`, `create_time`, `update_time`) VALUES
	(90, '谢先生', 0, 170, '2016-07-02', '1585', '烟雾检测状态', '房间34', 0, 0, NULL, '2023-07-12 14:53:00', '2023-07-12 14:53:00'),
	(91, NULL, NULL, NULL, NULL, '2', '温度', 'res', 0, 0, NULL, '2023-08-03 19:05:09', '2023-08-03 19:05:09'),
	(92, NULL, NULL, NULL, NULL, '2', '温度', 'res', 0, 0, NULL, '2023-08-03 19:25:45', '2023-08-03 19:25:45'),
	(93, NULL, NULL, NULL, NULL, '2', '温度', 'res', 0, 0, NULL, '2023-08-03 19:25:50', '2023-08-03 19:25:50'),
	(94, NULL, NULL, NULL, NULL, '2', '温度', 'res', 0, 0, NULL, '2023-08-03 19:27:25', '2023-08-03 19:27:25'),
	(95, NULL, NULL, NULL, NULL, '2', '温度', 'res', 0, 0, NULL, '2023-08-03 19:27:31', '2023-08-03 19:27:31'),
	(96, NULL, NULL, NULL, NULL, '2', '温度', 'res', 0, 0, NULL, '2023-08-03 19:27:50', '2023-08-03 19:27:50'),
	(97, NULL, NULL, NULL, NULL, '2', '温度', 'res', 0, 0, NULL, '2023-08-03 19:27:55', '2023-08-03 19:27:55'),
	(98, NULL, NULL, NULL, NULL, '2', '温度', 'res', 0, 0, NULL, '2023-08-03 19:28:06', '2023-08-03 19:28:06'),
	(99, NULL, NULL, NULL, NULL, '2', '温度', 'res', 0, 0, NULL, '2023-08-03 19:28:12', '2023-08-03 19:28:12'),
	(100, NULL, NULL, NULL, NULL, '2', '温度', 'res', 0, 0, NULL, '2023-08-03 19:31:55', '2023-08-03 19:31:55'),
	(101, NULL, NULL, NULL, NULL, '2', '温度', 'res', 0, 0, NULL, '2023-08-03 19:31:51', '2023-08-03 19:31:51');

-- 导出  表 finclip.szja_device_data 结构
CREATE TABLE IF NOT EXISTS `szja_device_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `dev_id` varchar(32) NOT NULL DEFAULT '0' COMMENT '设备id',
  `dev_name` varchar(64) NOT NULL DEFAULT '0' COMMENT '设备名称',
  `room` varchar(32) DEFAULT '0' COMMENT '房间名',
  `hcc_id` varchar(64) NOT NULL DEFAULT '0' COMMENT '信息箱ID',
  `archive_id` int(11) NOT NULL COMMENT '档案ID',
  `data_type` varchar(8) NOT NULL COMMENT '数据类型',
  `data_type_sub` varchar(8) NOT NULL COMMENT '数据子类',
  `unit` varchar(16) DEFAULT NULL COMMENT '单位',
  `value` varchar(32) NOT NULL COMMENT '值',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_device_data 的数据：~4 rows (大约)
INSERT INTO `szja_device_data` (`id`, `dev_id`, `dev_name`, `room`, `hcc_id`, `archive_id`, `data_type`, `data_type_sub`, `unit`, `value`, `create_time`, `update_time`) VALUES
	(1, '1585', '0', '0', 'e6ca693e-a803-4ef4-91d6-e16131536937', 1, '04', '1', '1', '1', '2023-08-01 17:44:11', NULL),
	(2, '1585', '0', '0', 'e6ca693e-a803-4ef4-91d6-e16131536937', 2, '04', '1', '1', '1', '2023-08-01 17:44:11', NULL),
	(3, '22', '设备1', '房间1', 'wT14o13wFAF3GPL8gO', 1, '01', '010100', '2', '1', '2023-08-07 10:25:05', NULL),
	(4, '22', '设备1', '房间1', 'wT14o13wFAF3GPL8gO', 1, '01', '010100', '2', '1', NULL, NULL);

-- 导出  表 finclip.szja_hcc_data_type 结构
CREATE TABLE IF NOT EXISTS `szja_hcc_data_type` (
  `id` varchar(8) NOT NULL,
  `name` varchar(100) NOT NULL COMMENT '类别名称',
  `parent_id` varchar(100) DEFAULT NULL COMMENT '父类id',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_hcc_data_type 的数据：~27 rows (大约)
INSERT INTO `szja_hcc_data_type` (`id`, `name`, `parent_id`, `create_time`, `update_time`) VALUES
	('01', '家庭环境数据', NULL, '2023-08-08 07:36:36', '2023-08-08 07:37:07'),
	('010001', '温度', '01', '2023-08-08 07:36:36', '2023-08-08 07:37:07'),
	('010002', '湿度', '01', '2023-08-08 07:36:36', '2023-08-08 07:37:09'),
	('010004', 'PM2.5', '01', '2023-08-08 07:36:36', NULL),
	('010005', 'CO2', '01', '2023-08-08 07:36:36', NULL),
	('010006', 'VOC', '01', '2023-08-08 07:36:36', NULL),
	('02', '健康医疗数据', NULL, '2023-08-08 07:36:36', '2023-08-08 07:37:09'),
	('020001', '体重', '02', '2023-08-08 07:36:36', '2023-08-08 07:37:10'),
	('020002', '心率', '02', '2023-08-08 07:36:36', '2023-08-08 07:37:11'),
	('020003', '血氧', '02', '2023-08-08 07:36:36', NULL),
	('020004', '呼吸率', '02', '2023-08-08 07:36:36', NULL),
	('03', '家庭安防数据', NULL, '2023-08-08 07:36:36', '2023-08-08 07:37:12'),
	('030001', '烟雾检测', '03', '2023-08-08 07:36:36', '2023-08-08 07:37:12'),
	('030002', 'CO检测', '03', '2023-08-08 07:36:36', NULL),
	('030003', '燃气检测', '03', '2023-08-08 07:36:36', NULL),
	('030004', '水侵检测', '03', '2023-08-08 07:36:36', NULL),
	('030005', '门锁告警', '03', '2023-08-08 07:36:36', NULL),
	('04', '告警', '', '2023-08-08 07:36:36', NULL),
	('040001', '烟雾告警', '04', '2023-08-08 07:36:36', NULL),
	('040002', 'CO告警', '04', '2023-08-08 07:36:36', NULL),
	('040003', '燃气告警', '04', '2023-08-08 07:36:36', NULL),
	('040004', '水侵告警', '04', '2023-08-08 07:36:36', NULL),
	('040005', '门锁告警', '04', '2023-08-08 07:36:36', NULL),
	('040006', 'SOS告警', '04', '2023-08-08 07:36:36', NULL),
	('040007', '心率告警', '04', '2023-08-08 07:36:36', NULL),
	('040008', '血氧告警', '04', '2023-08-08 07:36:36', NULL),
	('040009', '呼吸率告警', '04', '2023-08-08 07:36:36', NULL);

-- 导出  表 finclip.szja_hcc_info 结构
CREATE TABLE IF NOT EXISTS `szja_hcc_info` (
  `id` varchar(64) NOT NULL,
  `mqtt_client_id` varchar(64) NOT NULL COMMENT 'mqtt账号',
  `mqtt_passwd` varchar(64) NOT NULL COMMENT 'mqtt密码',
  `online_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '在线状态，0：离线 ，1：在线',
  `address_code` varchar(12) DEFAULT NULL COMMENT '家庭地址编码',
  `address_detail` varchar(128) DEFAULT NULL COMMENT '详细地址',
  `se_id` varchar(256) DEFAULT NULL,
  `auth_time` datetime NOT NULL COMMENT '最近一次认证成功时间',
  `secret_key` varchar(32) NOT NULL COMMENT '加密密钥',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_hcc_info 的数据：~10 rows (大约)
INSERT INTO `szja_hcc_info` (`id`, `mqtt_client_id`, `mqtt_passwd`, `online_status`, `address_code`, `address_detail`, `se_id`, `auth_time`, `secret_key`, `create_time`, `update_time`) VALUES
	('02a28479-9b22-4559-8664-9f03ab5c28e1', 'HCC_xL6IAJUdpVkiTD2w', 'PL8MBuIe5P5KEVpG', 0, NULL, NULL, '00010100002500011123062900000004', '2023-08-08 16:22:40', 'b845a0698aaa5d53174cd722a07e7899', '2023-08-08 16:22:40', NULL),
	('e6ca693e-a803-4ef4-91d6-e16131536930', '3', '3', 0, '440303001000', '桂园街道', NULL, '2023-08-04 10:35:37', 'sasaasasa', NULL, NULL),
	('e6ca693e-a803-4ef4-91d6-e16131536933', '5', '5', 0, '440304', '福田区', NULL, '2023-08-04 10:42:03', 'saas', NULL, NULL),
	('e6ca693e-a803-4ef4-91d6-e16131536934', '6', '6', 0, '440304', '福田区', NULL, '2023-08-04 10:42:32', 'wqqwq', NULL, NULL),
	('e6ca693e-a803-4ef4-91d6-e16131536935', '7', '7', 0, '320500', '江苏市', NULL, '2023-08-04 13:58:36', 'adadada', NULL, NULL),
	('e6ca693e-a803-4ef4-91d6-e16131536936', 'HCC_ELQbLUKLrRMZeI91', 'ELQbLUKLrRMZeI91', 0, '440303002000', '黄贝街道', NULL, '2023-08-04 10:37:05', 'saasasaasa', NULL, NULL),
	('e6ca693e-a803-4ef4-91d6-e16131536937', 'HCC_ELQbLUKLrRMZeI9d', 'UBHKeh7p5keWffYq', 1, NULL, '张家港市政府', '00010100002500011123062900000004', '2023-07-31 16:40:36', '7a6a568aac670c78bf1ad62be3b0e48e', '2023-07-31 16:40:36', NULL),
	('e6ca693e-a803-4ef4-91d6-e16131536938', '1', '1', 0, '440303', '罗湖区', NULL, '2023-08-04 10:33:17', '21313213132123', NULL, NULL),
	('e6ca693e-a803-4ef4-91d6-e16131536939', '2', '2', 0, '440303', '罗湖区', NULL, '2023-08-04 10:33:54', 'asdasdads', NULL, NULL),
	('ef8fae93-99e5-46bd-a68c-8f32ba4bae92', 'HCC_DyI15P0RJgCzDskf', 'AMfPT5qHtbxmFq0C', 0, '320581', 'ssss', NULL, '2023-05-24 15:33:11', '1GaLod0lPeyrQpc8', '2023-05-24 15:33:11', NULL),
	('wT14o13wFAF3GPL8gO', 'HCC_gFAHd5Gw9F07ci9k', '9gGB3zVcPdFEqrNy', 0, '320581', '张家港幼儿园', NULL, '2023-04-11 15:22:35', '1db94f833e5b4cf024c8f8d61d70d48c', '2023-04-10 15:17:52', '2023-04-10 15:17:52');

-- 导出  表 finclip.szja_live_stat_day 结构
CREATE TABLE IF NOT EXISTS `szja_live_stat_day` (
  `stat_time` char(8) NOT NULL COMMENT '时间:yyyyMMdd',
  `user_id` int(11) NOT NULL COMMENT '设备Id',
  `stat_type` int(11) NOT NULL COMMENT '统计类型1：活跃',
  `value` int(11) NOT NULL COMMENT '值',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`stat_time`,`user_id`) USING BTREE,
  KEY `stat_time` (`stat_time`,`stat_type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_live_stat_day 的数据：~2 rows (大约)
INSERT INTO `szja_live_stat_day` (`stat_time`, `user_id`, `stat_type`, `value`, `create_time`, `update_time`) VALUES
	('20230728', 2, 1, 1, '2023-07-28 18:07:23', NULL),
	('20230802', 2, 1, 3, '2023-08-03 12:58:11', NULL);

-- 导出  表 finclip.szja_live_stat_hour 结构
CREATE TABLE IF NOT EXISTS `szja_live_stat_hour` (
  `stat_time` char(10) NOT NULL COMMENT '时间:yyyyMMddHH',
  `user_id` int(11) NOT NULL COMMENT '设备Id',
  `stat_type` tinyint(4) NOT NULL COMMENT '统计类型1：活跃',
  `value` int(11) NOT NULL COMMENT '值累计',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`stat_time`,`user_id`) USING BTREE,
  KEY `idx_ssh_time_type` (`stat_time`,`stat_type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_live_stat_hour 的数据：~7 rows (大约)
INSERT INTO `szja_live_stat_hour` (`stat_time`, `user_id`, `stat_type`, `value`, `create_time`, `update_time`) VALUES
	('2023072803', 1, 1, 1, NULL, NULL),
	('2023073101', 1, 1, 1, '2023-07-31 01:07:01', NULL),
	('2023080102', 2, 2, 3, '2023-08-01 02:25:55', NULL),
	('2023080110', 1, 1, 2, '2023-08-01 01:46:00', NULL),
	('2023080212', 1, 1, 2, '2023-08-03 12:42:59', NULL),
	('2023080212', 2, 1, 3, '2023-08-03 12:42:59', NULL),
	('2023080213', 1, 1, 1, '2023-08-03 16:38:31', NULL);

-- 导出  表 finclip.szja_live_stat_month 结构
CREATE TABLE IF NOT EXISTS `szja_live_stat_month` (
  `stat_time` char(6) NOT NULL COMMENT '时间yyyyMM',
  `user_id` int(11) NOT NULL COMMENT '设备Id',
  `stat_type` tinyint(4) NOT NULL COMMENT '统计类型1：活跃',
  `value` int(11) NOT NULL COMMENT '值',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`stat_time`,`user_id`) USING BTREE,
  KEY `idx_ssh_time_type` (`stat_time`,`stat_type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_live_stat_month 的数据：~3 rows (大约)
INSERT INTO `szja_live_stat_month` (`stat_time`, `user_id`, `stat_type`, `value`, `create_time`, `update_time`) VALUES
	('202209', 1, 1, 1, NULL, NULL),
	('202306', 1, 1, 1, NULL, NULL),
	('202306', 2, 2, 2, '2023-06-30 18:23:23', NULL),
	('202307', 1, 1, 1, '2023-07-31 18:06:24', NULL);

-- 导出  表 finclip.szja_mp_auth_data_type 结构
CREATE TABLE IF NOT EXISTS `szja_mp_auth_data_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mp_id` varchar(64) NOT NULL COMMENT '应用服务编码',
  `data_type_id` varchar(8) NOT NULL COMMENT '类别名称',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `szja_mp_auth_data_type_UN` (`mp_id`,`data_type_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1144 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_mp_auth_data_type 的数据：~25 rows (大约)
INSERT INTO `szja_mp_auth_data_type` (`id`, `mp_id`, `data_type_id`, `create_time`, `update_time`) VALUES
	(3, '6433be833832fb000180193e', '020001', '2023-08-02 11:31:57', NULL),
	(4, '6433be833832fb000180193e', '030001', '2023-08-02 11:31:58', NULL),
	(5, '31ihafduy8hdq8d', '020002', '2023-05-15 17:35:12', NULL),
	(982, '6433be833832fb000180193e', '010001', '2023-05-17 09:36:51', '2023-05-17 16:42:35'),
	(1003, 'aa11nf1hfa9hhayq9djahaaf', '020001', '2023-08-03 14:34:08', NULL),
	(1004, 'aa11nf1hfa9hhayq9djahaaf', '030001', '2023-08-03 14:34:08', NULL),
	(1005, 'aa11nf1hfa9hhayq9djahaaf', '01', '2023-08-03 19:05:09', '2023-08-03 19:31:51'),
	(1112, '63feb4d13832fb0001801912', '020001', '2023-08-04 17:36:30', NULL),
	(1113, '63feb4d13832fb0001801912', '020002', '2023-08-04 17:36:30', NULL),
	(1114, '63feb4d13832fb0001801912', '030001', '2023-08-04 17:36:30', NULL),
	(1118, '64881c593832fb0001801972', '010001', '2023-08-04 17:36:41', NULL),
	(1119, '64881c593832fb0001801972', '010002', '2023-08-04 17:36:41', NULL),
	(1120, '64881c593832fb0001801972', '030001', '2023-08-04 17:36:41', NULL),
	(1132, '63f9b7c33832fb0001102087', '020001', '2023-08-07 06:12:12', NULL),
	(1133, '63f9b7c33832fb0001102087', '020002', '2023-08-07 06:12:12', NULL),
	(1134, '63fea0773832fb0001801904', '020001', '2023-08-07 06:12:18', NULL),
	(1135, '63fea0773832fb0001801904', '020002', '2023-08-07 06:12:18', NULL),
	(1136, '63880f7e3832fb000161108e', '010001', '2023-08-08 03:24:36', NULL),
	(1137, '63880f7e3832fb000161108e', '010002', '2023-08-08 03:24:36', NULL),
	(1138, '63880f7e3832fb000161108e', '020002', '2023-08-08 03:24:36', NULL),
	(1139, '63881efd3832fb0001611093', '010001', '2023-08-08 03:24:49', NULL),
	(1140, '63881efd3832fb0001611093', '010002', '2023-08-08 03:24:49', NULL),
	(1141, '63881efd3832fb0001611093', '020002', '2023-08-08 03:24:49', NULL),
	(1142, '63881efd3832fb0001611093', '020001', '2023-08-08 03:24:49', NULL),
	(1143, '63881efd3832fb0001611093', '030001', '2023-08-08 03:24:49', NULL);

-- 导出  表 finclip.szja_encrypt_operate_log 结构
CREATE TABLE IF NOT EXISTS `szja_encrypt_operate_log` (
  `id` varchar(64) NOT NULL,
  `type` tinyint(4) DEFAULT NULL COMMENT '类型：0：加密，1：解密',
  `status` tinyint(4) DEFAULT NULL COMMENT '状态：0：失败，1：成功',
  `fail_reason` blob,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
  `plaintext` text COMMENT '明文',
  `ciphertext` text COMMENT '密文',
  `req_id` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 导出  表 finclip.szja_mp_info 结构
CREATE TABLE IF NOT EXISTS `szja_mp_info` (
  `mp_id` varchar(64) NOT NULL COMMENT '应用服务Id',
  `limit_flag` varchar(16) NOT NULL COMMENT '用户权限标识',
  `sso_app_key` varchar(64) DEFAULT NULL COMMENT '地方政企ssoAppKey',
  `sso_app_secret` varchar(64) DEFAULT NULL COMMENT '地方政企ssoAppSecret',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `server_url` varchar(128) DEFAULT NULL COMMENT '应用服务后台地址',
  PRIMARY KEY (`mp_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_mp_info 的数据：~10 rows (大约)
INSERT INTO `szja_mp_info` (`mp_id`, `limit_flag`, `sso_app_key`, `sso_app_secret`, `create_time`, `update_time`, `server_url`) VALUES
	('63880f7e3832fb000161108e', '1', '1114441', '0222', NULL, NULL, NULL),
	('63881efd3832fb0001611093', '0000', '1111', '0222', NULL, NULL, NULL),
	('638820f83832fb0001611095', '0000', '000', '0000', NULL, NULL, NULL),
	('63f7020b3832fb0001102085', '0000', '000', '0000', NULL, NULL, NULL),
	('63f9b7c33832fb0001102087', '0000', '1111', '0222', NULL, NULL, NULL),
	('63fea0773832fb0001801904', '0000', '1112', '1112', NULL, NULL, NULL),
	('63fea67b3832fb0001801908', '0000', '111111', '11111', NULL, NULL, NULL),
	('63fea7283832fb000180190', '0000', '', '', NULL, NULL, NULL),
	('63fea7283832fb000180190a', '0000', '111111', '11111', NULL, NULL, ''),
	('63febdf03832fb0001801918', '0000', '1', '2', NULL, NULL, NULL),
	('984984', '0000', '', '', NULL, NULL, NULL),
	('aa11nf1hfa9hhayq9djahaaf', '0000', 'auq91hff1f1', '9fhqfa118fykqf', NULL, NULL, 'http://');

-- 导出  表 finclip.szja_person_archive_flag 结构
CREATE TABLE IF NOT EXISTS `szja_person_archive_flag` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `archive_id` int(11) NOT NULL COMMENT '档案ID',
  `hcc_id` varchar(64) NOT NULL COMMENT '家庭ID',
  `flag_id` int(11) NOT NULL COMMENT '标签ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `archive_id` (`archive_id`,`hcc_id`,`flag_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_person_archive_flag 的数据：~9 rows (大约)
INSERT INTO `szja_person_archive_flag` (`id`, `archive_id`, `hcc_id`, `flag_id`, `create_time`, `update_time`) VALUES
	(1, 2, 'xx', 1, '2023-08-07 02:13:56', NULL),
	(2, 2, 'xx', 2, '2023-08-07 02:14:26', NULL),
	(3, 1, 'wT14o13wFAF3GPL8gO', 1, '2023-08-04 17:06:04', NULL),
	(7, 1, 'wT14o13wFAF3GPL8gO', 2, '2023-08-04 17:11:19', NULL),
	(12, 1, 'wT14o13wFAF3GPL8gO', 3, '2023-08-04 17:12:35', NULL),
	(13, 8, 'e6ca693e-a803-4ef4-91d6-e16131536937', 1, '2023-08-08 05:46:52', NULL),
	(14, 8, 'e6ca693e-a803-4ef4-91d6-e16131536937', 2, '2023-08-08 05:46:52', NULL),
	(15, 9, 'e6ca693e-a803-4ef4-91d6-e16131536937', 1, '2023-08-08 05:48:08', NULL),
	(16, 9, 'e6ca693e-a803-4ef4-91d6-e16131536937', 2, '2023-08-08 05:48:08', NULL);

-- 导出  表 finclip.szja_person_archive_info 结构
CREATE TABLE IF NOT EXISTS `szja_person_archive_info` (
  `archive_id` int(11) unsigned NOT NULL COMMENT '档案ID',
  `name` varchar(64) NOT NULL DEFAULT '' COMMENT '名称',
  `sex` tinyint(4) DEFAULT NULL COMMENT '性别"0：男\n1：女"',
  `birthday` datetime DEFAULT NULL COMMENT '出生年月',
  `height` int(11) DEFAULT NULL COMMENT '身高',
  `user` varchar(64) DEFAULT NULL COMMENT '用户',
  `app_code` varchar(64) DEFAULT NULL COMMENT 'app编码',
  `hcc_id` varchar(64) NOT NULL DEFAULT '' COMMENT '所属家庭',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`archive_id`) USING BTREE,
  KEY `name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_person_archive_info 的数据：~18 rows (大约)
INSERT INTO `szja_person_archive_info` (`archive_id`, `name`, `sex`, `birthday`, `height`, `user`, `app_code`, `hcc_id`, `update_time`, `create_time`) VALUES
	(1, '010100', 1, '2020-11-09 12:30:11', 180, 'xxx', 'x', 'wT14o13wFAF3GPL8gO', '2023-08-04 17:08:53', '2021-01-01 00:00:00'),
	(2, '李四', 0, '2019-07-28 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:30:49', '2019-07-28 00:00:00'),
	(3, '李四1', 0, '2010-02-01 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:30:55', '2010-02-01 00:00:00'),
	(4, '李4', 0, '1970-02-01 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:31:01', '1970-02-01 00:00:00'),
	(5, '李5', 0, '1980-02-01 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:31:06', '1980-02-01 00:00:00'),
	(6, '李6', 0, '1999-02-01 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:31:18', '1999-02-01 00:00:00'),
	(7, '李7', 0, '1960-02-01 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:31:23', '1960-02-01 00:00:00'),
	(8, '明约2', 1, '2011-07-01 00:00:00', 210, 'xxxx', 'xx', 'e6ca693e-a803-4ef4-91d6-e16131536937', '2023-08-08 05:46:52', '1970-02-01 00:00:00'),
	(9, '明约2', 1, '2011-07-01 00:00:00', 210, 'xxxx', 'xx', 'e6ca693e-a803-4ef4-91d6-e16131536937', '2023-08-08 05:48:08', '1960-02-01 00:00:00'),
	(10, '李10', 0, '1970-02-01 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:31:43', '1970-02-01 00:00:00'),
	(11, '李11', 0, '1970-02-01 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:31:43', '1970-02-01 00:00:00'),
	(12, '李12', 0, '1970-02-01 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:31:43', '1970-02-01 00:00:00'),
	(13, '李13', 0, '1960-02-01 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:31:43', '1960-02-01 00:00:00'),
	(14, '李14', 0, '1970-02-01 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:31:43', '1970-02-01 00:00:00'),
	(15, '李15', 0, '1970-02-01 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:31:43', '1970-02-01 00:00:00'),
	(16, '李16', 0, '1970-02-01 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:31:43', '1970-02-01 00:00:00'),
	(17, '李17', 0, '1970-02-01 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:31:43', '1970-02-01 00:00:00'),
	(18, '李18', 0, '1970-02-01 00:00:00', 150, 'xxxx', 'xx', 'xx', '2023-08-01 09:31:43', '1970-02-01 00:00:00');

-- 导出  表 finclip.szja_person_flag_info 结构
CREATE TABLE IF NOT EXISTS `szja_person_flag_info` (
  `id` int(11) NOT NULL COMMENT 'id',
  `name` varchar(64) NOT NULL DEFAULT '' COMMENT '名称',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_person_flag_info 的数据：~3 rows (大约)
INSERT INTO `szja_person_flag_info` (`id`, `name`, `update_time`, `create_time`) VALUES
	(1, 'test', '2023-08-08 05:46:52', NULL),
	(2, 'flage', '2023-08-08 05:46:52', NULL),
	(3, 'bbb', '2023-08-07 01:31:05', '2023-08-04 17:12:35');

-- 导出  表 finclip.szja_user_home 结构
CREATE TABLE IF NOT EXISTS `szja_user_home` (
  `user_id` varchar(32) NOT NULL COMMENT '用户Id',
  `hcc_id` varchar(64) NOT NULL COMMENT '信息箱ID',
  `home_name` varchar(16) DEFAULT NULL COMMENT '家庭名称',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`user_id`) USING BTREE,
  KEY `szja_user_home_hcc_id_IDX` (`hcc_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_user_home 的数据：~4 rows (大约)
INSERT INTO `szja_user_home` (`user_id`, `hcc_id`, `home_name`, `create_time`, `update_time`) VALUES
	('1', 'e6ca693e-a803-4ef4-91d6-e16131536937', NULL, NULL, NULL),
	('18876165262', '1234567890', '40家庭', '2023-06-29 15:39:15', NULL),
	('2', 'ef8fae93-99e5-46bd-a68c-8f32ba4bae92', '样板间', NULL, NULL),
	('352fdebacc64450cacb83ae570726c7f', 'e6ca693e-a803-4ef4-91d6-e16131536937', NULL, NULL, NULL);

-- 导出  表 finclip.szja_user_info 结构
CREATE TABLE IF NOT EXISTS `szja_user_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `app_user_id` varchar(64) NOT NULL COMMENT '地方政企APP用户唯一标识',
  `app_code` varchar(32) NOT NULL COMMENT '地方政企APP编号',
  `mobile` varchar(16) DEFAULT NULL COMMENT '手机号码',
  `name` varchar(16) DEFAULT NULL COMMENT '证件姓名',
  `cert_type` tinyint(4) DEFAULT NULL COMMENT '证件类型',
  `cert_code` varchar(64) DEFAULT NULL COMMENT '证件号码',
  `identification_flag` varchar(100) DEFAULT NULL COMMENT '身份识别标识',
  `nick_name` varchar(16) DEFAULT NULL COMMENT '昵称',
  `avatar` varchar(128) DEFAULT NULL COMMENT '头像Url',
  `sex` tinyint(4) DEFAULT NULL COMMENT '性别',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `un_szja_user_info` (`app_user_id`) USING BTREE,
  KEY `szja_user_info_mobile_IDX` (`mobile`) USING BTREE,
  KEY `szja_user_info_cert_code_IDX` (`cert_code`,`cert_type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- 正在导出表  finclip.szja_user_info 的数据：~4 rows (大约)
INSERT INTO `szja_user_info` (`id`, `app_user_id`, `app_code`, `mobile`, `name`, `cert_type`, `cert_code`, `identification_flag`, `nick_name`, `avatar`, `sex`, `create_time`, `update_time`) VALUES
	(1, '352fdebacc64450cacb83ae570726c7f', '6433be833832fb000180193e', '188761652625', '王中', 1, '32897171018181919191', NULL, '小王', '/api/v1/mop/netdisk/download/63fec109e28a5200011aeadf', 1, NULL, '2023-08-08 02:27:31'),
	(2, '6da37540-78aa-4f9f-baf6-1c7d51a59f29', '6433be833832fb000180193e', '188761652624', '测试', 1, '32897171018181919192', NULL, '测试', '/api/v1/mop/netdisk/download/63fec109e28a5200011aeadf', 1, NULL, '2023-08-08 02:27:32'),
	(6, 'test1', '3666', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-08-04 11:05:05', NULL),
	(7, 'test2', '36626', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-08-04 11:05:05', NULL);

/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
