SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for user_info
-- ----------------------------
DROP TABLE IF EXISTS `user_info`;
CREATE TABLE `user_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `user_id` bigint(20) NOT NULL COMMENT '用户ID',
  `user_name` varchar(10) NOT NULL COMMENT '用户名称',
  `id_card` char(18) NOT NULL DEFAULT '' COMMENT '身份证号',
  `gender` tinyint(4) NOT NULL DEFAULT '0' COMMENT '性别 0:未知 1:男 2:女',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_user_id` (`user_id`),
  KEY `idx_user_name` (`user_name`),
  KEY `idx_id_card` (`id_card`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='用户测试表';

-- ----------------------------
-- Records of user_info
-- ----------------------------
BEGIN;
INSERT INTO `user_info` VALUES (1, 1, 'tom', '14051119980526572X', 1, '2021-05-22 03:10:11', '2021-05-22 03:10:11');
INSERT INTO `user_info` VALUES (2, 2, 'tony', '140511199907236411', 2, '2021-05-22 03:10:35', '2021-05-22 03:10:37');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
