One problem:
1, binding mailbox realization of ideas and related code
2, need to add a mailbox mailbox binding verification code table do ? Fields are : token, userid, deadTime, createTime
Second problem:
1, bound phone realization of ideas and related code
2, bound phone need to add a phone verification code table do ? Fields such as : token, userid, deadTime, createTime
seeking large crowd of God pointing
------ Solution -------------------------------- ------------
question 1
1. javamail technology to bind with the mailbox to send a message ( code is not written )
2. need to add the table , because there returned information to determine the user , the ciphertext , the expiration time
Question 2
1. calls telecommunication aspects of the interface to bind the cell phone to send a text message
2. Ibid.
This is my way of thinking ,
------ Solution - -------------------------------------------
email validation and expiration time , directly on the user table can not ? Or add tables and high efficiency point ?
For example : the following table can be designed without
CREATE TABLE `user_base` (
`userId` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`userType` INT(11) NOT NULL COMMENT '用户帐号类别:0表示匿名用户,1表示用邮箱验证的用户;2表示用手机验证的用户;9表示其它',
`userName` VARCHAR(32) NOT NULL COMMENT '登录名称:匿名用户登录名称默认为userId',
`password` VARCHAR(64) DEFAULT NULL COMMENT '登录密码的MD5值'
`userStatus` INT(11) NOT NULL COMMENT '用户状态:1为正常,2为锁定,-1为注销',
`userPhone` VARCHAR(20) DEFAULT NULL COMMENT '绑定的手机号码',
`userPhoneStatus` INT(11) NOT NULL DEFAULT '1' COMMENT '账号手机1未验证 2已验证',
`userEmail` VARCHAR(45) DEFAULT NULL COMMENT '绑定的邮箱',
`userEmailStatus` INT(11) NOT NULL DEFAULT '1' COMMENT '账号邮箱1未验证 2已验证',
`createTime` DATETIME NOT NULL COMMENT '注册时间',
`emailActiveCode` VARCHAR(32) NULL COMMENT 'email激活码',
`emailActiveUrlDeadTime` VARCHAR(32) NULL COMMENT 'email激活链接过期时间',
PRIMARY KEY (`userId`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='用户账号信息表'
can be placed in the user table ah
------ For reference only ---------------------------- -----------
email validation and expiration time , directly on the user table can not ? Or add tables and high efficiency point ?
For example : the following table can be designed without
CREATE TABLE `user_base` (
`userId` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`userType` INT(11) NOT NULL COMMENT '用户帐号类别:0表示匿名用户,1表示用邮箱验证的用户;2表示用手机验证的用户;9表示其它',
`userName` VARCHAR(32) NOT NULL COMMENT '登录名称:匿名用户登录名称默认为userId',
`password` VARCHAR(64) DEFAULT NULL COMMENT '登录密码的MD5值'
`userStatus` INT(11) NOT NULL COMMENT '用户状态:1为正常,2为锁定,-1为注销',
`userPhone` VARCHAR(20) DEFAULT NULL COMMENT '绑定的手机号码',
`userPhoneStatus` INT(11) NOT NULL DEFAULT '1' COMMENT '账号手机1未验证 2已验证',
`userEmail` VARCHAR(45) DEFAULT NULL COMMENT '绑定的邮箱',
`userEmailStatus` INT(11) NOT NULL DEFAULT '1' COMMENT '账号邮箱1未验证 2已验证',
`createTime` DATETIME NOT NULL COMMENT '注册时间',
`emailActiveCode` VARCHAR(32) NULL COMMENT 'email激活码',
`emailActiveUrlDeadTime` VARCHAR(32) NULL COMMENT 'email激活链接过期时间',
PRIMARY KEY (`userId`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='用户账号信息表'
------ For reference only ---------------------------------- -----
not understand ah ah ah, ah no items
没有评论:
发表评论