🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
```[sql] -- ---------------------------- -- Table structure for ns_promotion_games -- ---------------------------- DROP TABLE IF EXISTS `ns_promotion_games`; CREATE TABLE `ns_promotion_games` ( `game_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '游戏id', `site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id', `game_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '游戏活动名称', `game_type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1' COMMENT '游戏类型(插件名称)', `game_type_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '游戏类型名称', `level_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '参与的会员等级0表示全部参与', `level_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '参与活动会员名称', `points` int(11) NOT NULL DEFAULT 0 COMMENT '参与一次扣除积分', `start_time` int(11) NOT NULL DEFAULT 0 COMMENT '活动开始时间', `end_time` int(11) NOT NULL DEFAULT 0 COMMENT '活动结束时间', `status` int(11) NOT NULL DEFAULT 0 COMMENT '活动状态 0未开始 1已开始 2已结束 3已关闭', `remark` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '活动说明', `winning_rate` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '中奖率', `no_winning_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', `no_winning_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '未中奖说明', `is_show_winner` int(11) NOT NULL DEFAULT 0 COMMENT '中奖名单是否显示 0不显示 1显示', `join_type` int(11) NOT NULL DEFAULT 0 COMMENT '参加类型 0活动全过程 1每天', `join_frequency` int(11) NOT NULL DEFAULT 1 COMMENT '根据类型计算参加次数', `join_num` int(11) NOT NULL DEFAULT 0 COMMENT '抽奖人数', `winning_num` int(11) NOT NULL DEFAULT 0 COMMENT '中奖人数', `create_time` int(11) NOT NULL DEFAULT 0, `update_time` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`game_id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 4 AVG_ROW_LENGTH = 16384 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '营销游戏(概率游戏)' ROW_FORMAT = Compact; -- ---------------------------- -- Table structure for ns_promotion_games_award -- ---------------------------- DROP TABLE IF EXISTS `ns_promotion_games_award`; CREATE TABLE `ns_promotion_games_award` ( `award_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id', `game_id` int(11) NOT NULL DEFAULT 0 COMMENT '游戏id', `award_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '奖品名称', `award_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '图片', `award_type` tinyint(3) NOT NULL DEFAULT 0 COMMENT '奖品类型(1积分 2余额(不可提现) 3优惠券 4赠品)', `relate_id` int(11) NOT NULL DEFAULT 0 COMMENT '关联id(根据奖品类型)', `relate_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '关联商品名称(优惠券或者赠品名称)', `point` int(11) NOT NULL DEFAULT 0 COMMENT '积分数', `balance` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '余额', `award_num` int(11) NOT NULL DEFAULT 0 COMMENT '奖品数量', `award_winning_rate` int(11) NOT NULL DEFAULT 0 COMMENT '奖品中奖概率', `remaining_num` int(11) NOT NULL DEFAULT 0 COMMENT '剩余数量', `receive_num` int(11) NOT NULL DEFAULT 0 COMMENT '已领取数量', `no_winning_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '未中奖图片', PRIMARY KEY (`award_id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 9 AVG_ROW_LENGTH = 264 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '游戏奖品' ROW_FORMAT = Compact; -- ---------------------------- -- Table structure for ns_promotion_games_draw_record -- ---------------------------- DROP TABLE IF EXISTS `ns_promotion_games_draw_record`; CREATE TABLE `ns_promotion_games_draw_record` ( `record_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id', `game_id` int(11) NOT NULL DEFAULT 0 COMMENT '游戏id', `game_type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '游戏类型(插件名称)', `member_id` int(11) NOT NULL DEFAULT 0 COMMENT '会员id', `member_nick_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '会员昵称', `points` int(11) NOT NULL DEFAULT 0 COMMENT '参与消耗积分', `is_winning` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否中奖(0未中 1中奖)', `award_id` int(11) NOT NULL DEFAULT 0 COMMENT '奖品id', `award_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '奖品名称', `award_type` tinyint(3) NOT NULL DEFAULT 0 COMMENT '奖品类型(1积分 2余额(不可提现) 3优惠券 4赠品)', `relate_id` int(11) NOT NULL DEFAULT 0 COMMENT '关联id(根据奖品类型)', `relate_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '关联商品名称(优惠券或者赠品名称)', `is_receive` tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否领取(0未领取 1领取)奖品为优惠券 赠品是使用', `point` int(11) NOT NULL DEFAULT 0 COMMENT '奖励积分数', `balance` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '奖励余额', `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '说明', `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '参与时间', PRIMARY KEY (`record_id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 14 AVG_ROW_LENGTH = 146 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '抽奖记录' ROW_FORMAT = Compact;