xuanxuan11.6.sql 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. CREATE TABLE IF NOT EXISTS `zt_im_chat` (
  2. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3. `gid` char(40) NOT NULL DEFAULT '',
  4. `name` varchar(60) NOT NULL DEFAULT '',
  5. `type` varchar(20) NOT NULL DEFAULT 'group',
  6. `admins` varchar(255) NOT NULL DEFAULT '',
  7. `committers` varchar(255) NOT NULL DEFAULT '',
  8. `subject` mediumint(8) unsigned NOT NULL DEFAULT 0,
  9. `public` enum('0', '1') NOT NULL DEFAULT '0',
  10. `createdBy` varchar(30) NOT NULL DEFAULT '',
  11. `createdDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  12. `editedBy` varchar(30) NOT NULL DEFAULT '',
  13. `editedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  14. `lastActiveTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  15. `dismissDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  16. PRIMARY KEY (`id`),
  17. KEY `gid` (`gid`),
  18. KEY `name` (`name`),
  19. KEY `type` (`type`),
  20. KEY `public` (`public`),
  21. KEY `createdBy` (`createdBy`),
  22. KEY `editedBy` (`editedBy`)
  23. ) ENGINE=MyISAM;
  24. CREATE TABLE IF NOT EXISTS `zt_im_chatuser` (
  25. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  26. `cgid` char(40) NOT NULL DEFAULT '',
  27. `user` mediumint(8) NOT NULL DEFAULT 0,
  28. `order` smallint(5) NOT NULL DEFAULT 0,
  29. `star` enum('0', '1') NOT NULL DEFAULT '0',
  30. `hide` enum('0', '1') NOT NULL DEFAULT '0',
  31. `mute` enum('0', '1') NOT NULL DEFAULT '0',
  32. `join` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  33. `quit` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  34. `category` varchar(40) NOT NULL DEFAULT '',
  35. PRIMARY KEY (`id`),
  36. KEY `cgid` (`cgid`),
  37. KEY `user` (`user`),
  38. KEY `order` (`order`),
  39. KEY `star` (`star`),
  40. KEY `hide` (`hide`),
  41. UNIQUE KEY `chatuser` (`cgid`, `user`)
  42. ) ENGINE=MyISAM;
  43. CREATE TABLE IF NOT EXISTS `zt_im_client` (
  44. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  45. `version` char(10) NOT NULL DEFAULT '',
  46. `desc` varchar(100) NOT NULL DEFAULT '',
  47. `changeLog` text NOT NULL,
  48. `strategy` varchar(10) NOT NULL DEFAULT '',
  49. `downloads` text NOT NULL,
  50. `createdDate` datetime NOT NULL,
  51. `createdBy` varchar(30) NOT NULL DEFAULT '',
  52. `editedDate` datetime NOT NULL,
  53. `editedBy` varchar(30) NOT NULL DEFAULT '',
  54. `status` enum('released','wait') NOT NULL DEFAULT 'wait',
  55. PRIMARY KEY (`id`)
  56. ) ENGINE=MyISAM;
  57. CREATE TABLE IF NOT EXISTS `zt_im_message` (
  58. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  59. `gid` char(40) NOT NULL DEFAULT '',
  60. `cgid` char(40) NOT NULL DEFAULT '',
  61. `user` varchar(30) NOT NULL DEFAULT '',
  62. `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  63. `order` bigint(8) unsigned NOT NULL,
  64. `type` enum('normal', 'broadcast', 'notify') NOT NULL DEFAULT 'normal',
  65. `content` text NOT NULL DEFAULT '',
  66. `contentType` enum('text', 'plain', 'emotion', 'image', 'file', 'object') NOT NULL DEFAULT 'text',
  67. `data` text NOT NULL DEFAULT '',
  68. `deleted` enum('0','1') NOT NULL DEFAULT '0',
  69. PRIMARY KEY (`id`),
  70. KEY `mgid` (`gid`),
  71. KEY `mcgid` (`cgid`),
  72. KEY `muser` (`user`),
  73. KEY `mtype` (`type`)
  74. ) ENGINE=MyISAM;
  75. CREATE TABLE IF NOT EXISTS `zt_im_messagestatus` (
  76. `user` mediumint(8) NOT NULL DEFAULT 0,
  77. `message` int(11) unsigned NOT NULL,
  78. `status` enum('waiting','sent','readed','deleted') NOT NULL DEFAULT 'waiting',
  79. UNIQUE KEY `user` (`user`,`message`)
  80. ) ENGINE=MyISAM;