Skip to content

Commit

Permalink
修改 user-service-app 导入的数据库脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
YunaiV committed Aug 1, 2020
1 parent d0ce609 commit da826a2
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
Navicat Premium Data Transfer
Source Server : onemall-huawei
Source Server Type : MySQL
Source Server Version : 50730
Source Host : 400-infra.server.iocoder.cn:3306
Source Schema : mall_system
Target Server Type : MySQL
Target Server Version : 50730
File Encoding : 65001
Date: 15/07/2020 20:59:37
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- ----------------------------
-- Table structure for users
-- ----------------------------
INSERT INTO `mall_user`.`users`(`id`, `nickname`, `avatar`, `status`, `mobile`, `password`, `password_salt`, `create_ip`, `create_time`, `update_time`) VALUES (243, '芋艿X', 'http://www.iocoder.cn/images/common/zsxq/02.png', 2, '15601691340', '$2a$10$oBHjsjw57u3/g.g47kUAV.Q3i/TrMm62fobwFjGEjNGKUcqfgs2em', '$2a$10$oBHjsjw57u3/g.g47kUAV.', '127.0.0.1', '2020-07-03 20:41:57', '2020-07-26 00:51:38');

-- ----------------------------
-- Table structure for user_sms_code
-- ----------------------------



-- ----------------------------
-- Table structure for user_sms_code
-- ----------------------------

Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for users
-- ----------------------------
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户编号',
`nickname` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '昵称',
`avatar` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '头像',
`status` tinyint(4) NOT NULL COMMENT '状态',
`mobile` varchar(11) COLLATE utf8mb4_bin NOT NULL COMMENT '手机号',
`password` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '加密后的密码',
`password_salt` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '密码的盐',
`create_ip` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '注册 IP',
`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_mobile` (`mobile`) USING BTREE COMMENT '手机号'
) ENGINE=InnoDB AUTO_INCREMENT=245 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='用户';

-- ----------------------------
-- Table structure for user_sms_code
-- ----------------------------
CREATE TABLE `user_sms_code` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`mobile` varchar(11) NOT NULL COMMENT '手机号',
`code` varchar(6) NOT NULL COMMENT '验证码',
`create_ip` varchar(15) NOT NULL COMMENT '创建 IP',
`scene` tinyint(4) NOT NULL COMMENT '发送场景',
`today_index` tinyint(4) NOT NULL COMMENT '今日发送的第几条',
`used` tinyint(4) NOT NULL COMMENT '是否使用',
`used_time` datetime DEFAULT NULL COMMENT '使用时间',
`used_ip` varchar(255) DEFAULT NULL COMMENT '使用 IP',
`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,
KEY `idx_mobile` (`mobile`) USING BTREE COMMENT '手机号'
) ENGINE=InnoDB AUTO_INCREMENT=445 DEFAULT CHARSET=utf8mb4 COMMENT='手机验证码';

-- ----------------------------
-- Table structure for user_sms_code
-- ----------------------------
CREATE TABLE `user_address` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '收件地址编号',
`user_id` int(11) NOT NULL COMMENT '用户编号',
`name` varchar(10) COLLATE utf8mb4_bin NOT NULL COMMENT '收件人名称',
`mobile` varchar(20) COLLATE utf8mb4_bin NOT NULL COMMENT '手机号',
`area_code` int(11) NOT NULL COMMENT '地区编码',
`detail_address` varchar(250) COLLATE utf8mb4_bin NOT NULL COMMENT '收件详细地址',
`type` tinyint(4) NOT NULL COMMENT '地址类型',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '删除状态',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_userId` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='用户收件地址';

0 comments on commit da826a2

Please sign in to comment.