db.sql 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. CREATE TABLE `figure_user_[00-99]` (
  2. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户信用分模型',
  3. `mid` int(11) NOT NULL COMMENT '用户mid',
  4. `score` smallint(6) NOT NULL DEFAULT '0' COMMENT '信用分值',
  5. `lawful_score` smallint(6) NOT NULL DEFAULT '0' COMMENT '守序',
  6. `wide_score` smallint(6) NOT NULL DEFAULT '0' COMMENT '博览',
  7. `friendly_score` smallint(6) NOT NULL DEFAULT '0' COMMENT '友爱',
  8. `bounty_score` smallint(6) NOT NULL DEFAULT '0' COMMENT '慷慨',
  9. `creativity_score` smallint(6) NOT NULL DEFAULT '0' COMMENT '创造',
  10. `ver` int(11) NOT NULL DEFAULT '0' COMMENT '版本',
  11. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创造世界',
  12. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  13. PRIMARY KEY (`id`),
  14. UNIQUE KEY `uk_mid` (`mid`),
  15. KEY `ix_mtime` (`mtime`)
  16. ) ENGINE=InnoDB AUTO_INCREMENT=697525 DEFAULT CHARSET=utf8 COMMENT='信用用户表';
  17. CREATE TABLE `figure_rank` (
  18. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  19. `score_from` smallint(6) NOT NULL DEFAULT '0' COMMENT '起始分段分值,包含',
  20. `score_to` smallint(6) NOT NULL DEFAULT '0' COMMENT '结束分段分值,包含',
  21. `percentage` smallint(6) NOT NULL DEFAULT '0' COMMENT '排名百分比',
  22. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  23. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  24. PRIMARY KEY (`id`),
  25. UNIQUE KEY `uk_percentage` (`percentage`),
  26. KEY `ix_mtime` (`mtime`)
  27. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='当前信用分排名表'
  28. CREATE TABLE `figure_rank_history` (
  29. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  30. `score_from` smallint(6) NOT NULL DEFAULT '0' COMMENT '起始分段分值,包含',
  31. `score_to` smallint(6) NOT NULL DEFAULT '0' COMMENT '结束分段分值,包含',
  32. `percentage` smallint(6) NOT NULL DEFAULT '0' COMMENT '排名百分比',
  33. `ver` int(11) NOT NULL DEFAULT '0' COMMENT '版本',
  34. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  35. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  36. PRIMARY KEY (`id`),
  37. KEY `ix_mtime` (`mtime`)
  38. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='信用分历史排名表';