~~~[sql]
/*
Navicat Premium Data Transfer
Source Server : dfc
Source Server Type : MySQL
Source Server Version : 50717
Source Host : localhost:3306
Source Schema : ikecin_v3
Target Server Type : MySQL
Target Server Version : 50717
File Encoding : 65001
Date: 18/01/2019 11:05:12
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for admin_named_user
-- ----------------------------
DROP TABLE IF EXISTS `admin_named_user`;
CREATE TABLE `admin_named_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名',
`password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码',
`user_id` int(11) NOT NULL COMMENT '所属用户id',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `user_id`(`user_id`) USING BTREE,
UNIQUE INDEX `username`(`username`) USING BTREE,
CONSTRAINT `admin_named_user_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `admin_user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '命名用户登录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for admin_oauth_user
-- ----------------------------
DROP TABLE IF EXISTS `admin_oauth_user`;
CREATE TABLE `admin_oauth_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`open_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'open_id',
`type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '第三方登录类型,qq、wechat等',
`user_id` int(11) NOT NULL COMMENT '所属用户id',
`ext` json NULL COMMENT '额外信息',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `type`(`type`, `open_id`) USING BTREE,
INDEX `user_id`(`user_id`) USING BTREE,
CONSTRAINT `admin_oauth_user_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `admin_user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '第三方登录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for admin_phone_user
-- ----------------------------
DROP TABLE IF EXISTS `admin_phone_user`;
CREATE TABLE `admin_phone_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '手机号',
`password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码',
`user_id` int(11) NOT NULL COMMENT '所属用户id',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `user_id`(`user_id`) USING BTREE,
UNIQUE INDEX `phone`(`phone`) USING BTREE,
CONSTRAINT `admin_phone_user_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `admin_user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '手机号登录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for admin_user_config
-- ----------------------------
DROP TABLE IF EXISTS `admin_user_config`;
CREATE TABLE `admin_user_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`configs` json NULL COMMENT '配置项',
`user_id` int(11) NOT NULL COMMENT '所属用户',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `user_id`(`user_id`) USING BTREE,
CONSTRAINT `admin_user_config_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `admin_user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户配置信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for admin_user_info
-- ----------------------------
DROP TABLE IF EXISTS `admin_user_info`;
CREATE TABLE `admin_user_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户昵称',
`recent_login_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后登录',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for auth_power
-- ----------------------------
DROP TABLE IF EXISTS `auth_power`;
CREATE TABLE `auth_power` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT '用户id',
`role_id` int(11) NOT NULL COMMENT '角色id',
`device_power` json NOT NULL COMMENT '控制设备的权限为空数组就表示支持所有的权限',
PRIMARY KEY (`id`) USING BTREE,
INDEX `user_id`(`user_id`) USING BTREE,
INDEX `role_id`(`role_id`) USING BTREE,
CONSTRAINT `auth_power_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `auth_power_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `auth_role` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户权限表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for auth_role
-- ----------------------------
DROP TABLE IF EXISTS `auth_role`;
CREATE TABLE `auth_role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名称',
`role_power` json NOT NULL COMMENT '角色对应权限 id',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '权限角色表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for device
-- ----------------------------
DROP TABLE IF EXISTS `device`;
CREATE TABLE `device` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '设备默认名',
`sn` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '设备编号',
`type` tinyint(4) NOT NULL COMMENT '设备类型',
`subtype` tinyint(4) NOT NULL COMMENT '设备子类型',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '设备表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for device_apply
-- ----------------------------
DROP TABLE IF EXISTS `device_apply`;
CREATE TABLE `device_apply` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sn` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '设备序号',
`num` int(11) NOT NULL COMMENT '数量',
`user_id` int(11) NOT NULL COMMENT '用户 id',
`status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '审核状态 0 未审核 1成功 2 失败',
`download_num` tinyint(4) NOT NULL DEFAULT 0 COMMENT '下载次数',
`delete_time` timestamp(0) NULL DEFAULT NULL,
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `user_id`(`user_id`) USING BTREE,
CONSTRAINT `device_apply_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '设备 sn 申请表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for device_empower
-- ----------------------------
DROP TABLE IF EXISTS `device_empower`;
CREATE TABLE `device_empower` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sn` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '设备编号',
`user_id` int(11) NOT NULL COMMENT '用户id',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `idx_empower_sn`(`sn`, `user_id`) USING BTREE,
INDEX `user_id`(`user_id`) USING BTREE,
CONSTRAINT `device_empower_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理授权代理设备表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for device_group
-- ----------------------------
DROP TABLE IF EXISTS `device_group`;
CREATE TABLE `device_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT '用户id',
`name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分组名',
`description` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '分组描述',
`parent_id` int(11) NULL DEFAULT NULL COMMENT '父分组id',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `user_id`(`user_id`, `name`) USING BTREE,
INDEX `create_time`(`create_time`) USING BTREE,
CONSTRAINT `device_group_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户设备表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for device_statistics
-- ----------------------------
DROP TABLE IF EXISTS `device_statistics`;
CREATE TABLE `device_statistics` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sn` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '设备序号',
`value` json NOT NULL COMMENT '设备相关的数据',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `sn`(`sn`) USING BTREE,
INDEX `create_time`(`create_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '设备信息收集表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for migrations
-- ----------------------------
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE `migrations` (
`version` bigint(20) NOT NULL,
`migration_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`start_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
`end_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
`breakpoint` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`version`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for rbac_permissions
-- ----------------------------
DROP TABLE IF EXISTS `rbac_permissions`;
CREATE TABLE `rbac_permissions` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Lft` int(11) NOT NULL,
`Rght` int(11) NOT NULL,
`Title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`Description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `Lft`(`Lft`) USING BTREE,
INDEX `Rght`(`Rght`) USING BTREE,
INDEX `Title`(`Title`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for rbac_rolepermissions
-- ----------------------------
DROP TABLE IF EXISTS `rbac_rolepermissions`;
CREATE TABLE `rbac_rolepermissions` (
`RoleID` int(11) NOT NULL,
`PermissionID` int(11) NOT NULL,
`AssignmentDate` int(11) NOT NULL,
PRIMARY KEY (`RoleID`, `PermissionID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for rbac_roles
-- ----------------------------
DROP TABLE IF EXISTS `rbac_roles`;
CREATE TABLE `rbac_roles` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Lft` int(11) NOT NULL,
`Rght` int(11) NOT NULL,
`Title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`Description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `Lft`(`Lft`) USING BTREE,
INDEX `Rght`(`Rght`) USING BTREE,
INDEX `Title`(`Title`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for rbac_userroles
-- ----------------------------
DROP TABLE IF EXISTS `rbac_userroles`;
CREATE TABLE `rbac_userroles` (
`UserID` int(11) NOT NULL,
`RoleID` int(11) NOT NULL,
`AssignmentDate` int(11) NOT NULL,
PRIMARY KEY (`UserID`, `RoleID`) USING BTREE,
CONSTRAINT `rbac_userroles_ibfk_1` FOREIGN KEY (`UserID`) REFERENCES `admin_user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for user_device
-- ----------------------------
DROP TABLE IF EXISTS `user_device`;
CREATE TABLE `user_device` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户定义设备名',
`device_id` int(11) NOT NULL COMMENT '用户设备',
`user_id` int(11) NOT NULL COMMENT '用户id',
`group_id` int(11) NULL DEFAULT NULL COMMENT '设备所在分组',
`password` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '设备密码',
`position` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '设备所在位置',
`remark` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '设备备注信息',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `device_id`(`device_id`, `user_id`) USING BTREE,
INDEX `create_time`(`create_time`) USING BTREE,
INDEX `user_id`(`user_id`) USING BTREE,
INDEX `group_id`(`group_id`) USING BTREE,
CONSTRAINT `user_device_ibfk_1` FOREIGN KEY (`device_id`) REFERENCES `device` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `user_device_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `user_device_ibfk_3` FOREIGN KEY (`group_id`) REFERENCES `device_group` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 32 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户设备表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for user_info
-- ----------------------------
DROP TABLE IF EXISTS `user_info`;
CREATE TABLE `user_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nickname` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户昵称',
`name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '姓名',
`avatar` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '头像地址',
`gender` enum('male','female','secret') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'secret' COMMENT '性别 male 男 female 女 secret 保密',
`address` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '所在地址',
`login_num` smallint(6) NOT NULL DEFAULT 0 COMMENT '登录次数',
`last_login_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后登录',
`company_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '公司名称',
`expire_date` datetime(0) NOT NULL DEFAULT '2099-12-31 23:59:59' COMMENT '账户到期时间',
`status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态 0 未认证 1 正常 2 锁定',
`remarks` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注信息',
`position` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '所在位置',
`parent_id` int(11) NOT NULL DEFAULT 1 COMMENT '上级管理 id',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `create_time`(`create_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for user_log
-- ----------------------------
DROP TABLE IF EXISTS `user_log`;
CREATE TABLE `user_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT '用户id',
`content` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作内容',
`category` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作类别 分配设备之类',
`result` enum('success','fail') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'success' COMMENT '操作结果',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `user_id`(`user_id`) USING BTREE,
CONSTRAINT `user_log_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户操作记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for user_login
-- ----------------------------
DROP TABLE IF EXISTS `user_login`;
CREATE TABLE `user_login` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT '用户资料',
`phone` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '手机号',
`username` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '登录用户名',
`email` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '邮箱号',
`qq` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'qq登录的标志',
`wechat` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '微信登录的标志',
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '登录密码',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `phone`(`phone`, `user_id`) USING BTREE,
UNIQUE INDEX `username`(`username`, `user_id`) USING BTREE,
UNIQUE INDEX `email`(`email`, `user_id`) USING BTREE,
UNIQUE INDEX `qq`(`qq`, `user_id`) USING BTREE,
UNIQUE INDEX `wechat`(`wechat`, `user_id`) USING BTREE,
INDEX `user_id`(`user_id`) USING BTREE,
CONSTRAINT `user_login_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户登录表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
~~~
>[info] 其中一下数据表暂时没有使用到
> admin_named_user 、admin_oauth_user 、 admin_phone_user 、 admin_user_config 、admin_user_info 、 device_apply 、 migrations 、 rbac_permissions 、 rbac_rolepermissions 、 rbac_roles 、 rbac_userroles 、
- 文档说明
- 更新日志
- Web App 更新日志
- 自用云平台
- 鑫源云平台
- 生产管理
- 数据展示平台
- 云平台 - v3
- 设备文档
- KP0C0 - 0 - 0
- KP3C2 - 6 - 1
- K5C2 - 13 - 0
- KP1C2 - 18 - 0
- KP2C4 - 21 - 0
- K5C6 - 25 - 0
- KP5C1 - 27 - 0
- KD5P1 - 29 - 0
- KD5P5 - 46 - 0
- KP1C3 - 47 - 0
- KP1C4 - 48 - 0
- KP1C5 - 49 - 0
- KD4P6 - 53 - 0
- KP3C2 - 65 - 0
- KD5P8 - 72 - 0
- KP2C7 - 75 - 0
- KD5P601 - 76 - 0
- KD5P11 - 79 - 0
- KP01C1510 - 87 - 0
- KP03C0100 - 88 - 0
- KP01C1520 - 90 - 0
- 上报字段
- 数据库
- 登录注册
- 手机注册
- 邮箱注册
- 用户名注册
- 个人资料
- 管理功能
- 代理相关
- 代理设备
- 授权设备
- 代理功能
- 用户相关
- 用户设备
- 用户分组
- 权限相关
- 设备功能
- 设备分组
- 设备接口
- 数据统计
- 数据统计V2
- 数据统计V3
- 彩云8000 - 数据统计
- 号段申请
- 数据库
- 登录注销
- 申请用户
- 申请记录
- 用户申请
- 文件上传
- 生产管理
- 登录注册
- 提供接口