v1.1.32.sql 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. ALTER TABLE `yoshop_order_goods`
  2. ADD COLUMN `goods_source_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '来源记录id' AFTER `user_id`;
  3. ALTER TABLE `yoshop_order`
  4. MODIFY COLUMN `order_source` tinyint(3) UNSIGNED NOT NULL DEFAULT 10 COMMENT '订单来源(10普通订单 20砍价订单 30秒杀订单)' AFTER `is_comment`;
  5. UPDATE `yoshop_store_access` SET `sort`='105' WHERE (`access_id`='10300');
  6. UPDATE `yoshop_store_access` SET `sort`='110' WHERE (`access_id`='10426');
  7. UPDATE `yoshop_store_access` SET `sort`='120' WHERE (`access_id`='10400');
  8. INSERT INTO `yoshop_store_access` VALUES ('10444', '整点秒杀', 'apps.sharp', '10074', '115', '1564449650', '1564449650');
  9. INSERT INTO `yoshop_store_access` VALUES ('10445', '秒杀商品', 'apps.sharp.goods', '10444', '100', '1564449650', '1564449650');
  10. INSERT INTO `yoshop_store_access` VALUES ('10446', '商品列表', 'apps.sharp.goods/index', '10445', '100', '1564449650', '1564449650');
  11. INSERT INTO `yoshop_store_access` VALUES ('10447', '新增商品', 'apps.sharp.goods/add', '10445', '105', '1564449650', '1564449650');
  12. INSERT INTO `yoshop_store_access` VALUES ('10448', '编辑商品', 'apps.sharp.goods/edit', '10445', '110', '1564449650', '1564449650');
  13. INSERT INTO `yoshop_store_access` VALUES ('10449', '删除商品', 'apps.sharp.goods/delete', '10445', '115', '1564449650', '1564449650');
  14. INSERT INTO `yoshop_store_access` VALUES ('10450', '活动会场', 'apps.sharp.active', '10444', '105', '1564449650', '1564449650');
  15. INSERT INTO `yoshop_store_access` VALUES ('10451', '会场列表', 'apps.sharp.active/index', '10450', '100', '1564449650', '1564449650');
  16. INSERT INTO `yoshop_store_access` VALUES ('10452', '新增会场', 'apps.sharp.active/add', '10450', '105', '1564449650', '1564449650');
  17. INSERT INTO `yoshop_store_access` VALUES ('10453', '修改活动状态', 'apps.sharp.active/state', '10450', '110', '1564449650', '1564449650');
  18. INSERT INTO `yoshop_store_access` VALUES ('10454', '删除会场', 'apps.sharp.active/delete', '10450', '115', '1564449650', '1564449650');
  19. INSERT INTO `yoshop_store_access` VALUES ('10455', '场次管理', 'apps.sharp.active_time', '10450', '120', '1564449650', '1564449650');
  20. INSERT INTO `yoshop_store_access` VALUES ('10456', '场次列表', 'apps.sharp.active_time/index', '10455', '100', '1564449650', '1564449650');
  21. INSERT INTO `yoshop_store_access` VALUES ('10457', '新增场次', 'apps.sharp.active_time/add', '10455', '105', '1564449650', '1564449650');
  22. INSERT INTO `yoshop_store_access` VALUES ('10458', '编辑场次', 'apps.sharp.active_time/edit', '10455', '110', '1564449650', '1564449650');
  23. INSERT INTO `yoshop_store_access` VALUES ('10459', '修改活动状态', 'apps.sharp.active_time/state', '10455', '115', '1564449650', '1564449650');
  24. INSERT INTO `yoshop_store_access` VALUES ('10460', '删除场次', 'apps.sharp.active_time/delete', '10455', '120', '1564449650', '1564449650');
  25. INSERT INTO `yoshop_store_access` VALUES ('10461', '基础设置', 'apps.sharp.setting/index', '10444', '125', '1564449650', '1564449650');
  26. CREATE TABLE `yoshop_sharp_active` (
  27. `active_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '活动会场ID',
  28. `active_date` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '活动日期',
  29. `status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '活动状态(0禁用 1启用)',
  30. `is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
  31. `wxapp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序id',
  32. `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  33. `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  34. PRIMARY KEY (`active_id`)
  35. ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='整点秒杀-活动会场表';
  36. CREATE TABLE `yoshop_sharp_active_goods` (
  37. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  38. `active_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '活动会场ID',
  39. `active_time_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '活动场次ID',
  40. `sharp_goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '秒杀商品ID',
  41. `sales_actual` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '实际销量',
  42. `wxapp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序id',
  43. `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  44. `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  45. PRIMARY KEY (`id`)
  46. ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='整点秒杀-活动会场与商品关联表';
  47. CREATE TABLE `yoshop_sharp_active_time` (
  48. `active_time_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '场次ID',
  49. `active_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '活动会场ID',
  50. `active_time` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '场次时间(0点-23点)',
  51. `status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '活动状态(0禁用 1启用)',
  52. `wxapp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序id',
  53. `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  54. `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  55. PRIMARY KEY (`active_time_id`)
  56. ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='整点秒杀-活动会场场次表';
  57. CREATE TABLE `yoshop_sharp_goods` (
  58. `sharp_goods_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '秒杀商品ID',
  59. `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
  60. `deduct_stock_type` tinyint(3) unsigned DEFAULT '10' COMMENT '库存计算方式(10下单减库存 20付款减库存)',
  61. `limit_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '限购数量',
  62. `seckill_stock` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品库存总量',
  63. `total_sales` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '累积销量',
  64. `sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品排序(数字越小越靠前)',
  65. `status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '商品状态(0下架 1上架)',
  66. `is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
  67. `wxapp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序id',
  68. `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  69. `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  70. PRIMARY KEY (`sharp_goods_id`)
  71. ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='整点秒杀-商品表';
  72. CREATE TABLE `yoshop_sharp_goods_sku` (
  73. `goods_sku_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品规格id',
  74. `spec_sku_id` varchar(255) NOT NULL DEFAULT '0' COMMENT '商品sku记录索引 (由规格id组成)',
  75. `sharp_goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '秒杀商品id',
  76. `seckill_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品价格',
  77. `seckill_stock` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '秒杀库存数量',
  78. `wxapp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序id',
  79. `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  80. `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  81. PRIMARY KEY (`goods_sku_id`),
  82. UNIQUE KEY `sku_idx` (`sharp_goods_id`,`spec_sku_id`)
  83. ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='整点秒杀-秒杀商品sku信息表';
  84. CREATE TABLE `yoshop_sharp_setting` (
  85. `key` varchar(30) NOT NULL DEFAULT '' COMMENT '设置项标示',
  86. `describe` varchar(255) NOT NULL DEFAULT '' COMMENT '设置项描述',
  87. `values` mediumtext NOT NULL COMMENT '设置内容(json格式)',
  88. `wxapp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序id',
  89. `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  90. UNIQUE KEY `unique_key` (`key`,`wxapp_id`)
  91. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='整点秒杀设置表';