源战役
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 line
1.3 KiB

  1. -- liushl
  2. -- 整理物品功能
  3. drop table if exists goods;
  4. drop table if exists goods_low;
  5. drop table if exists goods_high;
  6. drop table if exists player_transfer;
  7. CREATE TABLE `goods` (
  8. `id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '物品ID',
  9. `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '玩家ID',
  10. `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '物品类型ID',
  11. `type` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '物品类型',
  12. `subtype` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '物品子类型',
  13. `location` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '物品所在位置',
  14. `cell` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '物品所在格子位置',
  15. `num` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '物品数量',
  16. `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '物品创建时间',
  17. `expire_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效期,0为无',
  18. `bind` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '绑定状态,0不绑定,1绑定',
  19. `extra_data` varchar(5000) NOT NULL DEFAULT '[]' COMMENT '额外数据[{key,value}|_]',
  20. PRIMARY KEY (`id`, `role_id`),
  21. KEY `pid` (`role_id`,`location`)
  22. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='物品信息表'
  23. PARTITION BY LINEAR HASH(role_id) PARTITIONS 10;