forked from YunaiV/yudao-cloud
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
YunaiV
committed
Aug 1, 2020
1 parent
d0ce609
commit da826a2
Showing
3 changed files
with
72 additions
and
16 deletions.
There are no files selected for viewing
16 changes: 0 additions & 16 deletions
16
system-service-project/system-service-app/src/main/resources/sql/mall_system_schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
user-service-project/user-service-app/src/main/resources/sql/mall_user_data.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
-- ---------------------------- | ||
|
57 changes: 57 additions & 0 deletions
57
user-service-project/user-service-app/src/main/resources/sql/mall_user_schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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='用户收件地址'; |