1234567891011121314151617181920212223242526272829303132 |
- ---- ↓↓↓↓↓↓↓↓↓↓↓↓↓↓此位置加入最新修改的脚本↓↓↓↓↓↓↓↓↓↓↓↓↓↓
- -- chensenlai 2016-12-01 DB:weixin_sales
- -- 用户表
- CREATE TABLE `t_user` (
- `uid` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户编号',
- `phone` varchar(16) NOT NULL COMMENT '用户手机号',
- `password` varchar(32) DEFAULT NULL COMMENT '密码',
- `real_name` varchar(16) DEFAULT NULL COMMENT '真实姓名',
- `id_card` varchar(20) DEFAULT NULL COMMENT '身份证',
- `total_fee` decimal(10,2) unsigned NOT NULL DEFAULT 0 COMMENT '累计收入金额',
- `apply_fee` decimal(10,2) unsigned NOT NULL DEFAULT 0 COMMENT '正在提现金额',
- `finish_fee` decimal(10,2) unsigned NOT NULL DEFAULT 0 COMMENT '已提现金额',
- `bind` tinyint NOT NULL DEFAULT 1 COMMENT '绑定状态 1-未绑定 2-手机号绑定 3-完成绑定',
- `open_id` varchar(32) DEFAULT NULL COMMENT '微信OpenId',
- PRIMARY KEY (`uid`),
- UNIQUE KEY `user_phone_idx` (`phone`),
- UNIQUE KEY `user_openid_idx` (`open_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- -- 用户提现表
- CREATE TABLE `t_user_withdraw` (
- `wid` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '提现编号',
- `uid` int(11) unsigned NOT NULL COMMENT '用户编号',
- `apply_fee` decimal(10,2) unsigned NOT NULL DEFAULT 0 COMMENT '提现金额',
- `status` tinyint NOT NULL DEFAULT 1 COMMENT '提现状态 1-未处理 2-已处理 3-处理失败',
- `apply_time` datetime NOT NULL COMMENT '申请提现时间',
- `finish_time` datetime DEFAULT NULL COMMENT '处理时间',
- PRIMARY KEY (`wid`),
- KEY `withdraw_uid_idx` (`uid`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|