drop table if exists player_recharge;
CREATE TABLE `player_recharge_rfmt` (
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '角色Id',
  `last_pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最近充值时间',
  `total_money` decimal(12,2) DEFAULT '0.00' COMMENT '总充值金额',
  `total_gold` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '总充值元宝',
  `recency` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '评级：充值间隔',
  `frequency` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '评级：充值频率',
  `monetary` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '评级：历史总充值',
  `top` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '评级：最高额充值',
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='玩家充值统计数据，合服保留';


-- tyl 功能预告
CREATE TABLE IF NOT EXISTS `role_module_advance` (
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '角色Id',
  `func_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预告功能配置Id',
  `reward_state` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '领奖状态',
  PRIMARY KEY (`role_id`,`func_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 宠物副本
CREATE TABLE IF NOT EXISTS `role_pet_dun_reward` (
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '角色Id',
  `dun_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '副本Id',
  `status` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '里程碑奖励领取状态',
  PRIMARY KEY (`role_id`,`dun_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='宠物副本-里程碑奖励领取状态';

CREATE TABLE IF NOT EXISTS `dun_pet_rank` (
  `rank` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排名',
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '角色Id',
  `score` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '积分',
  `reach_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '达成时间',
  PRIMARY KEY (`rank`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
