控制台应用,yzncms本身基于tp5.1框架,里面的队列用不了,bug,坑
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.

install.sql 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. CREATE TABLE IF NOT EXISTS `__PREFIX__member` (
  2. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  3. `username` varchar(16) NOT NULL COMMENT '用户名',
  4. `nickname` varchar(16) NOT NULL DEFAULT '' COMMENT '昵称',
  5. `password` varchar(32) NOT NULL COMMENT '密码',
  6. `encrypt` varchar(6) DEFAULT NULL COMMENT '加密因子',
  7. `point` mediumint(8) NOT NULL DEFAULT '0' COMMENT '用户积分',
  8. `amount` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '钱金总额',
  9. `login` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登录次数',
  10. `email` varchar(32) NOT NULL DEFAULT '' COMMENT '电子邮箱',
  11. `mobile` varchar(11) NOT NULL DEFAULT '' COMMENT '手机号',
  12. `gender` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '性别:0=未知,1=男,2=女',
  13. `birthday` date DEFAULT NULL COMMENT '生日',
  14. `motto` varchar(255) DEFAULT '' COMMENT '签名',
  15. `avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '头像',
  16. `groupid` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '用户组ID',
  17. `modelid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '用户模型ID',
  18. `vip` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'VIP会员',
  19. `overduedate` int(10) unsigned DEFAULT NULL COMMENT '过期时间',
  20. `reg_ip` varchar(50) NOT NULL DEFAULT '' COMMENT '注册IP',
  21. `reg_time` int(10) unsigned DEFAULT NULL COMMENT '注册时间',
  22. `last_login_ip` varchar(50) NOT NULL DEFAULT '' COMMENT '最后登录IP',
  23. `last_login_time` int(10) unsigned DEFAULT NULL COMMENT '最后登录时间',
  24. `ischeck_email` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否验证过邮箱',
  25. `ischeck_mobile` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否验证过手机',
  26. `token` varchar(50) DEFAULT '' COMMENT 'Token',
  27. `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '状态',
  28. PRIMARY KEY (`id`),
  29. UNIQUE KEY `username` (`username`),
  30. KEY `email` (`email`),
  31. KEY `mobile` (`mobile`)
  32. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='会员表';
  33. CREATE TABLE IF NOT EXISTS `__PREFIX__member_group` (
  34. `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT COMMENT '会员组id',
  35. `name` varchar(15) NOT NULL COMMENT '用户组名称',
  36. `issystem` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否是系统组',
  37. `starnum` tinyint(2) unsigned NOT NULL COMMENT '会员组星星数',
  38. `point` smallint(6) unsigned NOT NULL COMMENT '积分范围',
  39. `allowmessage` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '许允发短消息数量',
  40. `allowvisit` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否允许访问',
  41. `allowpost` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否允许发稿',
  42. `allowpostverify` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否投稿不需审核',
  43. `allowsearch` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否允许搜索',
  44. `allowupgrade` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否允许自主升级',
  45. `allowsendmessage` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '允许发送短消息',
  46. `allowpostnum` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '每天允许发文章数',
  47. `allowattachment` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否允许上传附件',
  48. `price_y` decimal(8,2) unsigned NOT NULL DEFAULT '0.00',
  49. `price_m` decimal(8,2) unsigned NOT NULL DEFAULT '0.00',
  50. `price_d` decimal(8,2) unsigned NOT NULL DEFAULT '0.00',
  51. `icon` varchar(255) NOT NULL DEFAULT '' COMMENT '用户组图标',
  52. `usernamecolor` varchar(7) NOT NULL DEFAULT '' COMMENT '用户名颜色',
  53. `description` varchar(100) NOT NULL DEFAULT '' COMMENT '描述',
  54. `listorder` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  55. `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '状态',
  56. `expand` mediumtext COMMENT '拓展',
  57. PRIMARY KEY (`id`)
  58. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='会员组';
  59. CREATE TABLE IF NOT EXISTS `__PREFIX__member_token` (
  60. `token` varchar(50) NOT NULL COMMENT 'Token',
  61. `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
  62. `create_time` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  63. `expire_time` int(10) unsigned DEFAULT NULL COMMENT '过期时间',
  64. PRIMARY KEY (`token`)
  65. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='会员Token表';
  66. CREATE TABLE IF NOT EXISTS `__PREFIX__member_amount_log` (
  67. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  68. `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
  69. `amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变更余额',
  70. `before` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变更前余额',
  71. `after` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变更后余额',
  72. `remark` varchar(255) DEFAULT '' COMMENT '备注',
  73. `create_time` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  74. PRIMARY KEY (`id`)
  75. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='会员余额变动表';
  76. CREATE TABLE IF NOT EXISTS `__PREFIX__member_point_log` (
  77. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  78. `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
  79. `point` int(10) NOT NULL DEFAULT '0' COMMENT '变更积分',
  80. `before` int(10) NOT NULL DEFAULT '0' COMMENT '变更前积分',
  81. `after` int(10) NOT NULL DEFAULT '0' COMMENT '变更后积分',
  82. `remark` varchar(255) DEFAULT '' COMMENT '备注',
  83. `create_time` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  84. PRIMARY KEY (`id`)
  85. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='会员积分变动表';
  86. INSERT INTO `__PREFIX__member_group` VALUES ('1', '禁止访问', '1', '0', '0', '0', '1', '1', '0', '1', '0', '0', '0', '0','0.00','0.00', '0.00', '', '', '0', '10', '1', '');
  87. INSERT INTO `__PREFIX__member_group` VALUES ('2', '新手上路', '1', '1', '50', '100', '1', '1', '0', '0', '1', '1', '0', '0','50.00', '10.00', '1.00' ,'', '', '', '8', '1', '');
  88. INSERT INTO `__PREFIX__member_group` VALUES ('6', '注册会员', '1', '2', '100', '150', '0', '1', '0', '0', '1', '1', '0', '0','300.00', '30.00', '1.00', '', '', '', '7', '1', '');
  89. INSERT INTO `__PREFIX__member_group` VALUES ('4', '中级会员', '1', '3', '150', '500', '1', '1', '0', '1', '1', '1', '0', '0','360.00', '60.00', '1.00', '', '', '', '6', '1', '');
  90. INSERT INTO `__PREFIX__member_group` VALUES ('5', '高级会员', '1', '5', '300', '999', '1', '1', '0', '1', '1', '1', '0', '0','500.00', '90.00', '1.00', '', '', '', '5', '1', '');
  91. INSERT INTO `__PREFIX__member_group` VALUES ('7', '邮件认证', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0.00', '0.00', '0.00','', '#000000', '', '4', '1', '');
  92. INSERT INTO `__PREFIX__member_group` VALUES ('8', '游客', '1', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0','0.00', '0.00', '0.00', '', '', '', '9', '1', '');
  93. -- 1.1.0 --
  94. ALTER TABLE `__PREFIX__member` ENGINE = InnoDB;
  95. ALTER TABLE `__PREFIX__member_group` ENGINE = InnoDB;
  96. ALTER TABLE `__PREFIX__member_token` ENGINE = InnoDB;
  97. ALTER TABLE `__PREFIX__member_amount_log` ENGINE = InnoDB;
  98. ALTER TABLE `__PREFIX__member_point_log` ENGINE = InnoDB;
  99. -- 1.1.1 --
  100. ALTER TABLE `__PREFIX__member` ADD COLUMN `gender` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '性别:0=未知,1=男,2=女' AFTER `mobile`,
  101. ADD COLUMN `birthday` date DEFAULT NULL COMMENT '生日' AFTER `gender`,
  102. ADD COLUMN `motto` varchar(255) DEFAULT '' COMMENT '签名' AFTER `birthday`;