用户数据库模块设计
一、用户表
数据库
movie_bibi_you_ucenter
表
bibi_ucenter_member
CREATE TABLE `bibi_ucenter_member` ( `user_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '会员id', `wx_openid` varchar(128) DEFAULT NULL COMMENT '微信openid', `token` varchar(128) DEFAULT NULL COMMENT '用户签名', `account` varchar(128) DEFAULT NULL COMMENT '账号', `mobile` varchar(11) DEFAULT '' COMMENT '手机号', `password` varchar(255) DEFAULT 'e10adc3949ba59abbe56e057f20f883e' COMMENT '密码', `nickname` varchar(50) DEFAULT '小花' COMMENT '昵称', `alipay_account` varchar(50) DEFAULT NULL COMMENT '支付宝账号', `avatar` varchar(255) DEFAULT 'https://c-ssl.duitang.com/uploads/blog/202106/02/20210602085900_f58fb.thumb.1000_0.jpg' COMMENT '用户头像', `sex` tinyint(2) unsigned DEFAULT '1' COMMENT '性别 1 男,2 女', `birthday` tinyint(3) unsigned DEFAULT NULL COMMENT '生日', `user_type` tinyint(2) unsigned DEFAULT '0' COMMENT '用户类型 【买家 0 ,商家 1】', `is_disabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否禁用 1(true)已禁用, 0(false)未禁用', `create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间/注册时间', `modify_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', PRIMARY KEY (`user_id`) ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COMMENT='用户表'
创建假数据
INSERT INTO bibi_ucenter_member(wx_openid,token, account,mobile) VALUE('wx_openid_text03','token_text03','account_text03','11112341236'); INSERT INTO bibi_ucenter_member(wx_openid,token, account,mobile) VALUE('wx_openid_text04','token_text04','account_text04','11112341237'); INSERT INTO bibi_ucenter_member(wx_openid,token, account,mobile) VALUE('wx_openid_text05','token_text05','account_text05','11112341238'); INSERT INTO bibi_ucenter_member(wx_openid,token, account,mobile) VALUE('wx_openid_text06','token_text06','account_text06','11112341239'); INSERT INTO bibi_ucenter_member(wx_openid,token, account,mobile) VALUE('wx_openid_text07','token_text07','account_text07','11112341240'); INSERT INTO bibi_ucenter_member(wx_openid,token, account,mobile) VALUE('wx_openid_text08','token_text08','account_text08','11112341241'); INSERT INTO bibi_ucenter_member(wx_openid,token, account,mobile) VALUE('wx_openid_text09','token_text09','account_text09','11112341242'); INSERT INTO bibi_ucenter_member(wx_openid,token, account,mobile) VALUE('wx_openid_text010','token_text010','account_text010','11112341243'); INSERT INTO bibi_ucenter_member(wx_openid,token, account,mobile) VALUE('wx_openid_text011','token_text011','account_text011','11112341244'); INSERT INTO bibi_ucenter_member(wx_openid,token, account,mobile) VALUE('wx_openid_text012','token_text012','account_text012','11112341245'); INSERT INTO bibi_ucenter_member(wx_openid,token, account,mobile,user_type) VALUE('wx_openid_text013','token_text013','account_text013','11112341246',1);