CREATE TABLE `sp_user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `reg_type` int(11) DEFAULT '0', `LOGIN_NAME` varchar(100) NOT NULL DEFAULT '', `BIND_MOBILE` varchar(50) NOT NULL DEFAULT '', `nick_name` varchar(50) NOT NULL DEFAULT '', `REAL_NAME` varchar(100) DEFAULT NULL, `USER_PHOTO_URL` varchar(128) DEFAULT NULL, `STATUS` int(2) NOT NULL, `PASSWORD` varchar(80) NOT NULL DEFAULT '', `pay_password` varchar(100) DEFAULT NULL, `SECURITY_SALT` varchar(20) DEFAULT NULL, `REGISTER_TIME` datetime NOT NULL, `SAFE_QUESTION` varchar(200) DEFAULT NULL, `SAFE_ANSWER` varchar(200) DEFAULT NULL, `BIND_EMAIL` varchar(100) DEFAULT NULL, `LAST_LOGIN_TIME` datetime DEFAULT NULL, `LAST_LOGIN_IP` varchar(20) DEFAULT NULL, `CURRENT_LOGIN_TIME` datetime DEFAULT NULL, `CURRENT_LOGIN_IP` varchar(20) DEFAULT NULL, `REG_IP` varchar(20) DEFAULT NULL, `idCard_code` varchar(100) DEFAULT NULL, `open_DynamicPwd` int(2) DEFAULT NULL, `weixin_id` varchar(50) DEFAULT NULL, `CREATED_BY` varchar(32) NOT NULL, `CREATED_ON` datetime NOT NULL, `UPDATED_BY` varchar(32) DEFAULT NULL, `UPDATED_ON` datetime DEFAULT NULL, `VERSION_OPTIMIZED_LOCK` int(11) NOT NULL, `REFER` varchar(300) DEFAULT NULL, `recommender_id` int(11) DEFAULT NULL, `user_type` int(2) DEFAULT '0', `channel_no` varchar(16) DEFAULT NULL, `sell_begin_time` datetime DEFAULT NULL, `sell_img` varchar(128) DEFAULT NULL, `role_no` varchar(16) DEFAULT NULL, `sell_mask` varchar(200) DEFAULT NULL, `sell_intention` varchar(16) DEFAULT NULL, `sell_invest` int(5) DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `login_name唯一` (`LOGIN_NAME`) USING BTREE, UNIQUE KEY `mobile唯一` (`BIND_MOBILE`), UNIQUE KEY `nick_name唯一` (`nick_name`), UNIQUE KEY `weixin_code唯一` (`weixin_id`), KEY `index_recommender_id` (`recommender_id`) ) ENGINE=InnoDB AUTO_INCREMENT=100111995 DEFAULT CHARSET=utf8; -------------------------------- CREATE TABLE `sp_user_account` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `AVAILABLE_AMOUNT` decimal(12,2) NOT NULL DEFAULT '0.00', `STATUS` int(2) NOT NULL, `USER_ID` int(11) NOT NULL, `VERSION_OPTIMIZED_LOCK` int(11) NOT NULL, `CREATED_BY` varchar(32) DEFAULT NULL, `CREATED_ON` datetime NOT NULL, `UPDATED_BY` varchar(32) DEFAULT NULL, `UPDATED_ON` datetime DEFAULT NULL, `FREEZE_AMOUNT` decimal(12,2) NOT NULL DEFAULT '0.00', `AVAILABLE_WITHDRAW_AMT` decimal(12,2) NOT NULL DEFAULT '0.00', `MIDDLE_AMT` decimal(12,2) DEFAULT NULL, `audit_status` int(2) DEFAULT NULL, `tty_amount` decimal(12,2) DEFAULT NULL, `tty_income` decimal(10,2) DEFAULT NULL, PRIMARY KEY (`id`), KEY `FK_ACCOUNT_USERID` (`USER_ID`), CONSTRAINT `FK_ACCOUNT_USERID` FOREIGN KEY (`USER_ID`) REFERENCES `sp_user` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=112369 DEFAULT CHARSET=utf8;