20180131104311.sql 1.27 KB
/*
    true
    @author: qiuj <jun.qiu@yoho.cn>
    @date: 2018-01-30 10:31:47
    @is_get: 是否中奖 0:未中 1:中奖
*/

#注意:GO;分割执行块
#中奖用户信息表
CREATE TABLE IF NOT EXISTS act_prize_user_log (
    `id` int(8) NOT NULL PRIMARY KEY AUTO_INCREMENT,
    `act_id` int(8) NOT NULL DEFAULT 0,
    `user_id` int(8) NOT NULL DEFAULT 0,
    `is_get` TINYINT NOT NULL DEFAULT 0,
    `user_name` varchar(50) DEFAULT '',
    `user_phone` varchar(50) DEFAULT '',
    `user_address` varchar(50) DEFAULT '',
    `user_shoes_size` float DEFAULT 0,
    `user_info` varchar(200) DEFAULT '',
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) DEFAULT CHARSET=utf8;
GO;

#用户信息收集表
CREATE TABLE IF NOT EXISTS act_user_detail_info (
    `id` int(8) NOT NULL PRIMARY KEY AUTO_INCREMENT,
    `act_id` int(8) NOT NULL DEFAULT 0,
    `user_name` varchar(50) DEFAULT '',
    `user_birthday` timestamp DEFAULT CURRENT_TIMESTAMP,
    `user_gender` TINYINT NOT NULL DEFAULT 0,
    `user_phone` varchar(20) DEFAULT '',
    `user_email` varchar(50) DEFAULT '',
    `user_province` varchar(50) DEFAULT '',
    `user_city` varchar(50) DEFAULT '',
    `user_desc` varchar(200) DEFAULT '',
    `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) DEFAULT CHARSET=utf8;
GO;