-- liushl
CREATE TABLE `log_equipment_task` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '序号',
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '玩家ID',
  `name` varchar(50) NOT NULL DEFAULT '[]' COMMENT '玩家名称',
  `lv` smallint(8) unsigned NOT NULL DEFAULT '0' COMMENT '等级',
  `rfmt` varchar(500) NOT NULL DEFAULT '[]' COMMENT 'rfmt',
  `task_id` smallint(11) unsigned NOT NULL DEFAULT '0' COMMENT '任务ID',
  `progress` smallint(11) unsigned NOT NULL DEFAULT '0' COMMENT '进度',
  `desc` varchar(50) NOT NULL DEFAULT '[]' COMMENT '任务内容',
  `time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '时间',
  PRIMARY KEY (`id`),
  KEY role_id(`role_id`),
  KEY name(`name`),
  KEY time(`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='日志-装备考核任务';

CREATE TABLE `log_equipment_star` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '序号',
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '玩家ID',
  `name` varchar(50) NOT NULL DEFAULT '[]' COMMENT '玩家名称',
  `lv` smallint(8) unsigned NOT NULL DEFAULT '0' COMMENT '等级',
  `stars` smallint(11) unsigned NOT NULL DEFAULT '0' COMMENT '玩家星级',
  `stars_need` smallint(11) unsigned NOT NULL DEFAULT '0' COMMENT '所需星级',
  `branch` tinyint(8) unsigned NOT NULL DEFAULT '0' COMMENT '选择分支',
  `time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '时间',
  PRIMARY KEY (`id`),
  KEY role_id(`role_id`),
  KEY name(`name`),
  KEY time(`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='日志-装备考核星级';

CREATE TABLE `log_equipment_task_reward` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '序号',
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '玩家ID',
  `name` varchar(50) NOT NULL DEFAULT '[]' COMMENT '玩家名称',
  `lv` smallint(8) unsigned NOT NULL DEFAULT '0' COMMENT '等级',
  `rfmt` varchar(500) NOT NULL DEFAULT '[]' COMMENT 'rfmt',
  `opday` smallint(11) unsigned NOT NULL DEFAULT '0' COMMENT '开服天数',
  `task_id` smallint(11) unsigned NOT NULL DEFAULT '0' COMMENT '任务id',
  `reward` varchar(500) NOT NULL DEFAULT '[]' COMMENT '奖励列表',
  `time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '时间',
  PRIMARY KEY (`id`),
  KEY role_id(`role_id`),
  KEY name(`name`),
  KEY time(`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='日志-装备考核任务领奖';

CREATE TABLE `log_equipment_collect_reward` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '序号',
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '玩家ID',
  `name` varchar(50) NOT NULL DEFAULT '[]' COMMENT '玩家名称',
  `lv` smallint(8) unsigned NOT NULL DEFAULT '0' COMMENT '等级',
  `series` smallint(11) unsigned NOT NULL DEFAULT '0' COMMENT '代数',
  `color` smallint(11) unsigned NOT NULL DEFAULT '0' COMMENT '品质',
  `reward` varchar(500) NOT NULL DEFAULT '[]' COMMENT '奖励列表',
  `time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '时间',
  PRIMARY KEY (`id`),
  KEY role_id(`role_id`),
  KEY name(`name`),
  KEY time(`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='日志-装备收集领奖';

ALTER TABLE log_market_operation
ADD COLUMN `name` varchar(50) NOT NULL DEFAULT '[]' COMMENT '卖方名称' AFTER `role_id`,
ADD COLUMN `vip` tinyint(8) unsigned NOT NULL DEFAULT '0' COMMENT '卖方VIP' AFTER `name`,
ADD COLUMN `get_name` varchar(50) NOT NULL DEFAULT '[]' COMMENT '买方名称' AFTER `get_role_id`,
ADD COLUMN `get_vip` tinyint(8) unsigned NOT NULL DEFAULT '0' COMMENT '买方VIP' AFTER `get_name`,
ADD COLUMN `tax` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '交易税' AFTER `price`;

CREATE TABLE `log_market_race` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '序号',
  `market_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '交易ID',
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '竞拍玩家ID',
  `name` varchar(50) NOT NULL DEFAULT '[]' COMMENT '竞拍玩家名称',
  `vip` tinyint(8) unsigned NOT NULL DEFAULT '0' COMMENT '竞拍玩家VIP',
  `price` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '竞拍玩家出价',
  `last_role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '上个竞拍者ID',
  `last_name` varchar(50) NOT NULL DEFAULT '[]' COMMENT '上个竞拍者名称',
  `last_vip` tinyint(8) unsigned NOT NULL DEFAULT '0' COMMENT '上个竞拍者VIP',
  `last_price` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '上个竞拍者出价',
  `origin_price` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '上架价格',
  `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '物品类型id',
  `left_time` int(11) NOT NULL DEFAULT '0' COMMENT '剩余时间(秒)',
  `time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '时间',
  PRIMARY KEY (`id`),
  KEY market_id(`market_id`),
  KEY role_id(`role_id`),
  KEY time(`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='日志-拍卖竞价';


-- hh
-- 幻魔日志

CREATE TABLE `log_boss_change`(
    `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
    `role_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '角色ID',
    `role_name` varchar(255) NOT NULL DEFAULT "" COMMENT '角色名称',
    `boss_type` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '幻魔类型(3次元幻魔|6个人幻魔|9混乱星域幻魔10混乱星域精英怪)',
    `num_aft` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '变化后次数',
    `num_bef` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '变化前次数',
    `change_type` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '变化原因(1击杀消耗|2自然回复|3购买回复|4首杀|5联合Buff次数消耗)',
    `boss_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '幻魔ID(只有击杀消耗时候才记录)',
    `time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '时间',
    PRIMARY KEY(`id`),
    KEY role_id(`role_id`),
    KEY role_name(`role_name`),
    KEY boss_type(`boss_type`)
) ENGINE=InnoDB CHARSET=utf8 COMMENT="幻魔次数变化日志";

CREATE TABLE `log_boss_belong`(
    `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
    `role_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '击杀角色ID',
    `role_name` varchar(255) NOT NULL DEFAULT "" COMMENT '角色名称',
    `is_cluster` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '跨服模式0本服|1跨服',
    `svr_num` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '服务器编号',
    `role_lv` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '击杀角色LV',
    `boss_type` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '幻魔类型(3次元幻魔|6个人幻魔|9混乱星域幻魔|10混乱星域精英怪)',
    `boss_lv` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '幻魔LV',
    `boss_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '幻魔ID',
    `belong_role_ids` varchar(500) NOT NULL DEFAULT '[]' COMMENT '归属者IDS',
    `first_kill` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否首次击杀(1首次击杀|0非首次击杀)',
    `time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '时间',
    PRIMARY KEY(`id`),
    KEY role_id(`role_id`),
    KEY role_name(`role_name`),
    KEY boss_type(`boss_type`)
) ENGINE=InnoDB CHARSET=utf8 COMMENT="幻魔击杀归属日志";

CREATE TABLE `log_boss_drop`(
    `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
    `boss_type` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '幻魔类型(3次元幻魔|9混乱星域幻魔|10混乱星域精英怪)',
    `boss_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '幻魔ID',
    `belong_role_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '归属者ID',
    `belong_team_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '归属队伍ID',
    `goods_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '物品类型ID',
    `goods_num` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '物品数量',
    `is_bind` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否绑定(1绑定|0非绑)',
    `expired_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '过期时间(道具消失时间戳)',
    `damage_list` varchar(500) NOT NULL DEFAULT 0 COMMENT '伤害列表[{role_id,damage,team_id},{role_id,damage,team_id}]',
    `time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '时间',
    PRIMARY KEY(`id`),
    KEY boss_type(`boss_type`)
) ENGINE=InnoDB CHARSET=utf8 COMMENT="幻魔击杀掉落日志";