You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
2.0 KiB
MySQL
40 lines
2.0 KiB
MySQL
5 years ago
|
CREATE TABLE `sys_shift_task` (
|
||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||
|
`form_promote_id` int(11) NOT NULL DEFAULT 0 COMMENT '渠道ID',
|
||
|
`to_promote_id` int(11) NOT NULL DEFAULT 0 COMMENT '渠道ID',
|
||
|
`order_time` int(11) DEFAULT NULL COMMENT '订单日期',
|
||
|
`balance_coin_mode` tinyint(1) NOT NULL DEFAULT 0 COMMENT '平台币处理 1 迁移至最高帐户 2 清零',
|
||
|
`status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态 0 未处理 1 已处理',
|
||
|
`create_promote_id` int(11) NOT NULL DEFAULT 0 COMMENT '创建渠道ID',
|
||
|
`handle_time` int(11) NOT NULL DEFAULT 0,
|
||
|
`create_time` int(11) NOT NULL DEFAULT 0,
|
||
|
PRIMARY KEY (`id`)
|
||
|
) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
||
|
|
||
|
CREATE TABLE `tab_promote_coin_record` (
|
||
|
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
|
||
|
`sn` varchar(30) NOT NULL DEFAULT '' COMMENT '流水号',
|
||
|
`type` tinyint(3) NOT NULL COMMENT '类型',
|
||
|
`sub_type` tinyint(3) NOT NULL COMMENT '子类型',
|
||
|
`ref_id` int(11) NOT NULL DEFAULT '0' COMMENT '对应记录ID',
|
||
|
`target_id` int(11) NOT NULL DEFAULT '0' COMMENT '对象ID',
|
||
|
`target_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '对象类型',
|
||
|
`coin` double(10,2) NOT NULL COMMENT '充值金额',
|
||
|
`balance_coin` double(10,2) NOT NULL COMMENT '平台币余额',
|
||
|
`description` varchar(100) NOT NULL DEFAULT '' COMMENT '说明',
|
||
|
`remark` varchar(100) NOT NULL DEFAULT '' COMMENT '备注',
|
||
|
`create_time` int(11) DEFAULT NULL COMMENT '时间',
|
||
|
PRIMARY KEY (`id`),
|
||
|
KEY `promote_id` (`target_id`),
|
||
|
KEY `create_time` (`create_time`)
|
||
|
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='平台币记录';
|
||
|
|
||
|
CREATE TABLE `tab_promote_balance_coin` (
|
||
|
`promote_id` int(11) DEFAULT '0' COMMENT '渠道id',
|
||
|
`game_id` int(11) NOT NULL DEFAULT '0' COMMENT '游戏ID',
|
||
|
`num` int(11) DEFAULT '0' COMMENT '数量',
|
||
|
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态',
|
||
|
PRIMARY KEY (`promote_id`, `game_id`)
|
||
|
) ENGINE=Innodb DEFAULT CHARSET=utf8 COMMENT='推广员平台币';
|
||
|
|
||
|
-- promote_coin game_id
|