v1.1.17.sql 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. ALTER TABLE `yoshop_order` ADD COLUMN `delivery_type` tinyint(3) UNSIGNED NOT NULL DEFAULT 10 COMMENT '配送方式(10快递配送 20上门自提)' AFTER `pay_time`;
  2. ALTER TABLE `yoshop_order` ADD COLUMN `extract_shop_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '自提门店id' AFTER `delivery_type`;
  3. ALTER TABLE `yoshop_order` ADD COLUMN `extract_clerk_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '核销店员id' AFTER `extract_shop_id`;
  4. ALTER TABLE `yoshop_sharing_order` ADD COLUMN `delivery_type` tinyint(3) UNSIGNED NOT NULL DEFAULT 10 COMMENT '配送方式(10快递配送 20上门自提)' AFTER `pay_time`;
  5. ALTER TABLE `yoshop_sharing_order` ADD COLUMN `extract_shop_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '自提门店id' AFTER `delivery_type`;
  6. ALTER TABLE `yoshop_sharing_order` ADD COLUMN `extract_clerk_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '核销店员id' AFTER `extract_shop_id`;
  7. # 商家门店记录表
  8. CREATE TABLE `yoshop_store_shop` (
  9. `shop_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '门店id',
  10. `shop_name` varchar(255) NOT NULL DEFAULT '' COMMENT '门店名称',
  11. `logo_image_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店logo图片id',
  12. `linkman` varchar(20) NOT NULL DEFAULT '' COMMENT '联系人',
  13. `phone` varchar(20) NOT NULL DEFAULT '' COMMENT '联系电话',
  14. `shop_hours` varchar(255) NOT NULL DEFAULT '' COMMENT '营业时间',
  15. `province_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '所在省份id',
  16. `city_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '所在城市id',
  17. `region_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '所在辖区id',
  18. `address` varchar(100) NOT NULL DEFAULT '' COMMENT '详细地址',
  19. `longitude` varchar(50) NOT NULL DEFAULT '' COMMENT '门店坐标经度',
  20. `latitude` varchar(50) NOT NULL DEFAULT '' COMMENT '门店坐标纬度',
  21. `geohash` varchar(50) NOT NULL DEFAULT '' COMMENT 'geohash',
  22. `summary` varchar(1000) NOT NULL DEFAULT '0' COMMENT '门店简介',
  23. `is_check` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '是否支持自提核销(0否 1支持)',
  24. `status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '门店状态(0禁用 1启用)',
  25. `is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
  26. `wxapp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序id',
  27. `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  28. `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
  29. PRIMARY KEY (`shop_id`)
  30. ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家门店记录表';
  31. # 商家门店店员表
  32. CREATE TABLE `yoshop_store_shop_clerk` (
  33. `clerk_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '店员id',
  34. `shop_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '所属门店id',
  35. `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  36. `real_name` varchar(30) NOT NULL DEFAULT '' COMMENT '店员姓名',
  37. `mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '手机号',
  38. `status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '状态(0禁用 1启用)',
  39. `is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
  40. `wxapp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序id',
  41. `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  42. `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
  43. PRIMARY KEY (`clerk_id`)
  44. ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家门店店员表';
  45. #商家门店核销订单记录表
  46. CREATE TABLE `yoshop_store_shop_order` (
  47. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
  48. `order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单id',
  49. `order_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '订单类型(10商城订单 20拼团订单)',
  50. `shop_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店id',
  51. `clerk_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '核销员id',
  52. `wxapp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序id',
  53. `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  54. PRIMARY KEY (`id`)
  55. ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家门店核销订单记录表';
  56. # 新增权限url:门店管理
  57. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10356', '门店管理', 'shop', '0', '100', '1551504862', '1551504862');
  58. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10357', '门店管理', 'shop', '10356', '105', '1551505016', '1551505016');
  59. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10358', '门店列表', 'shop/index', '10357', '100', '1551505032', '1551505048');
  60. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10359', '添加门店', 'shop/add', '10357', '100', '1551505032', '1551505048');
  61. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10360', '编辑门店', 'shop/edit', '10357', '100', '1551505032', '1551505048');
  62. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10361', '删除门店', 'shop/delete', '10357', '100', '1551505032', '1551505048');
  63. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10362', '店员管理', 'shop.clerk', '10356', '110', '1551505016', '1551505016');
  64. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10363', '店员列表', 'shop.clerk/index', '10362', '100', '1551505032', '1551505048');
  65. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10364', '添加店员', 'shop.clerk/add', '10362', '100', '1551505032', '1551505048');
  66. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10365', '编辑店员', 'shop.clerk/edit', '10362', '100', '1551505032', '1551505048');
  67. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10366', '删除店员', 'shop.clerk/delete', '10362', '100', '1551505032', '1551505048');
  68. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10367', '订单核销记录', 'shop.order/index', '10356', '115', '1551505016', '1551505016');
  69. # 新增权限url:订单核销
  70. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10368', '门店自提核销', 'order.operate/extract', '10043', '100', '1551505016', '1551505016');
  71. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10369', '门店自提核销', 'apps.sharing.order.operate/extract', '10318', '100', '1551505016', '1551505016');
  72. # 新增权限url:满额包邮
  73. INSERT INTO `yoshop_store_access` (`access_id`, `name`, `url`, `parent_id`, `sort`, `create_time`, `update_time`) VALUES ('10370', '满额包邮', 'market.basic/full_free', '10052', '100', '1551505016', '1551505016');