代码拉取完成,页面将自动刷新
/*
Navicat Premium Data Transfer
Source Server : 阿里云
Source Server Type : MySQL
Source Server Version : 50727
Source Host : 39.98.129.125:3306
Source Schema : easybuy
Target Server Type : MySQL
Target Server Version : 50727
File Encoding : 65001
Date: 06/06/2020 23:36:27
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for address
-- ----------------------------
DROP TABLE IF EXISTS `address`;
CREATE TABLE `address` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`uid` bigint(20) NOT NULL COMMENT '用户id',
`phone` char(11) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT '联系电话',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '收货人名字',
`province` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '省',
`city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '市',
`county` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '县',
`town` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '镇',
`detail` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '详细地址',
`deleted` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '表示该地址是否已删除,0不是正常,1表示已删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `uid`(`uid`) USING BTREE,
CONSTRAINT `address_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cardinfob
-- ----------------------------
DROP TABLE IF EXISTS `cardinfob`;
CREATE TABLE `cardinfob` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`uid` bigint(20) NOT NULL COMMENT '用户id',
`authority` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '发证机关',
`start_date` date NOT NULL COMMENT '开始时间',
`end_date` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '过期时间',
`img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '图片',
`deleted` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '删除标记,0表示正常,1表示已删除',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uid`(`uid`) USING BTREE,
INDEX `deleted`(`deleted`) USING BTREE,
CONSTRAINT `cardinfob_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '身份证国徽面信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cardinfof
-- ----------------------------
DROP TABLE IF EXISTS `cardinfof`;
CREATE TABLE `cardinfof` (
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id',
`uid` bigint(20) NOT NULL COMMENT '用户主键id',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '姓名',
`birthdate` date NOT NULL COMMENT '出生日期',
`gender` enum('-1','0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '性别,-1表示未知、1表示男,0表示女',
`address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '家庭住址',
`nation` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '民族',
`card_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '身份证号',
`img` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '身份证照片',
`deleted` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '删除标记,0表示正常,1表示已删除',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uid`(`uid`) USING BTREE,
INDEX `deleted`(`deleted`) USING BTREE,
CONSTRAINT `cardinfof_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '身份证人脸面信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for faces
-- ----------------------------
DROP TABLE IF EXISTS `faces`;
CREATE TABLE `faces` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`uid` bigint(20) NOT NULL COMMENT '用户id',
`url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '人脸url',
`deleted` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '删除标记,0表示正常,1表示已删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `deleted`(`deleted`) USING BTREE,
INDEX `uid`(`uid`) USING BTREE,
CONSTRAINT `faces_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `faces_ibfk_2` FOREIGN KEY (`deleted`) REFERENCES `user` (`deleted`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '人脸表,用于人脸登录' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for friend
-- ----------------------------
DROP TABLE IF EXISTS `friend`;
CREATE TABLE `friend` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`uid` bigint(20) NOT NULL COMMENT '我的用户id',
`fid` bigint(20) NOT NULL COMMENT '朋友的用户id',
`gid` bigint(20) NOT NULL COMMENT '该朋友所在组',
`remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`add_date` datetime(0) NOT NULL COMMENT '添加朋友时间',
`deleted` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '删除标记,0表示正常,1表示已删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `mid`(`uid`) USING BTREE,
INDEX `fid`(`fid`) USING BTREE,
INDEX `gid`(`gid`) USING BTREE,
CONSTRAINT `friend_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `friend_ibfk_2` FOREIGN KEY (`fid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `friend_ibfk_3` FOREIGN KEY (`gid`) REFERENCES `friend_group` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for friend_group
-- ----------------------------
DROP TABLE IF EXISTS `friend_group`;
CREATE TABLE `friend_group` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '组名',
`uid` bigint(20) NOT NULL COMMENT '该组所有者',
`deleted` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '删除标记,0表示正常,1表示已删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `uid`(`uid`) USING BTREE,
CONSTRAINT `friend_group_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for jurisdiction
-- ----------------------------
DROP TABLE IF EXISTS `jurisdiction`;
CREATE TABLE `jurisdiction` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '权限主键',
`field` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '权限字段名',
`text` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '权限字段中文名',
`deleted` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '删除标记,0表示正常,1表示已删除',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `field`(`field`) USING BTREE,
UNIQUE INDEX `text`(`text`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for privacy
-- ----------------------------
DROP TABLE IF EXISTS `privacy`;
CREATE TABLE `privacy` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`uid` bigint(20) NOT NULL COMMENT '权限拥有者',
`jid` bigint(20) NOT NULL COMMENT '权限id',
`status` enum('true','false') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'true' COMMENT '是否启用此权限',
`deleted` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '删除标记,0表示正常,1表示已删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `uid`(`uid`) USING BTREE,
INDEX `jid`(`jid`) USING BTREE,
CONSTRAINT `privacy_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `privacy_ibfk_2` FOREIGN KEY (`jid`) REFERENCES `jurisdiction` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 59 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for test
-- ----------------------------
DROP TABLE IF EXISTS `test`;
CREATE TABLE `test` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(6) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户主键id',
`wxid` varchar(266) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信小程序的openid',
`nickname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户昵称',
`header_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户头像',
`phone` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户手机号,登录凭据',
`password` varchar(2889) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码',
`email` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户电子邮箱',
`gender` enum('-1','0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1' COMMENT '用户性别,-1表示为无知、0表示女,1表示男',
`create_date` datetime(0) NOT NULL COMMENT '账号创建日期',
`deleted` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '删除标记,0表示正常,1表示已删除',
PRIMARY KEY (`id`, `phone`) USING BTREE,
UNIQUE INDEX `user_phone_uindex`(`phone`) USING BTREE,
INDEX `deleted`(`deleted`) USING BTREE,
INDEX `gender`(`gender`) USING BTREE,
INDEX `id`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 51 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。