-- hh
-- 聊天日志

DROP TABLE IF EXISTS `log_chat`;
CREATE TABLE `log_chat` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '角色id',
  `name` varchar(20) NOT NULL DEFAULT '' COMMENT '角色名',
  `level` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '角色等级',
  `vip_level` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'VIP等级',
  `address` varchar(39) NOT NULL DEFAULT '' COMMENT 'IP地址',
  `type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '聊天频道',
  `scene_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '场景id',
  `guild_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '帮派id',
  `guild_name` varchar(50) NOT NULL DEFAULT '' COMMENT '帮派名',
  `chat_to_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '私聊对象角色id',
  `chat_to_name` varchar(20) NOT NULL DEFAULT '' COMMENT '私聊对象角色名',
  `content` varchar(1000) NOT NULL DEFAULT '' COMMENT '发言内容',
  `ctime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '聊天时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='聊天日志';

