用户基础信息表
用户表userinfo:用户ID、用户名、密码、性别、手机号、邮箱、年龄、注册时间、终端类型
其中usertype中0代表pc端,1代表移动端,2代表小程序端
CREATE TABLE `userinfo` (
`userid` int(20) DEFAULT NULL,
`username` varchar(50) DEFAULT NULL,
`password` varchar(50) DEFAULT NULL,
`sex` int(1) DEFAULT NULL,
`telphone` varchar(50) DEFAULT NULL,
`email` varchar(50) DEFAULT NULL,
`age` int(20) DEFAULT NULL,
`idCard` varchar(50) DEFAULT NULL,
`registerTime` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`usertype` int(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
用户详情补充表
用户详情补充表:用户id,学历、职业、婚姻、是否有小孩、是否有车有房、使用手机品牌、
CREATE TABLE `userdetail` (
`userdetailid` int(20) NOT NULL,
`userid` int(20) DEFAULT NULL,
`education` int(1) DEFAULT NULL,
`profession` varchar(20) DEFAULT NULL,
`marriage` int(1) DEFAULT NULL COMMENT '1:未婚,2:已婚,3:离异,4:未知',
`haschild` int(1) DEFAULT NULL COMMENT '1:有小孩,2:无小孩,3:未知',
`hascar` int(1) DEFAULT NULL COMMENT '1:有车,2:无车,3:未知',
`hashourse` int(1) DEFAULT NULL COMMENT '1:有房,2:无房,3:未知',
`telphonebrand` varchar(50) DEFAULT NULL,
PRIMARY KEY (`userdetailid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;