|
@@ -0,0 +1,97 @@
|
|
|
+ALTER TABLE `product_spu`
|
|
|
+ ADD COLUMN `spu_apply_id` bigint NOT NULL COMMENT '商品申请id';
|
|
|
+
|
|
|
+
|
|
|
+CREATE TABLE `product_sku_apply` (
|
|
|
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|
|
+ `spu_apply_id` bigint NOT NULL COMMENT 'spu编号',
|
|
|
+ `properties` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '属性数组,JSON 格式 [{propertId: , valueId: }, {propertId: , valueId: }]',
|
|
|
+ `price` int DEFAULT '-1' COMMENT '商品价格,单位:分',
|
|
|
+ `promotion_fee` int DEFAULT NULL COMMENT '推广费, 单位: 分',
|
|
|
+ `mark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
|
|
|
+ `market_price` int DEFAULT NULL COMMENT '市场价,单位:分',
|
|
|
+ `cost_price` int DEFAULT '-1' COMMENT '成本价,单位: 分',
|
|
|
+ `bar_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SKU 的条形码',
|
|
|
+ `pic_url` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '图片地址',
|
|
|
+ `stock` int DEFAULT NULL COMMENT '库存',
|
|
|
+ `weight` double DEFAULT NULL COMMENT '商品重量,单位:kg 千克',
|
|
|
+ `volume` double DEFAULT NULL COMMENT '商品体积,单位:m^3 平米',
|
|
|
+ `first_brokerage_price` int DEFAULT NULL COMMENT '一级分销的佣金,单位:分',
|
|
|
+ `second_brokerage_price` int DEFAULT NULL COMMENT '二级分销的佣金,单位:分',
|
|
|
+ `sales_count` int DEFAULT '0' COMMENT '商品销量',
|
|
|
+ `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
|
+ `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
|
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
|
|
|
+ `updater` double(64,0) DEFAULT NULL COMMENT '更新人',
|
|
|
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
|
|
+ `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号',
|
|
|
+ `shop_id` bigint DEFAULT '0' COMMENT '店铺id',
|
|
|
+ `merchant_id` bigint DEFAULT NULL COMMENT '商户id',
|
|
|
+ `high_precision_price` decimal(11,6) DEFAULT NULL COMMENT '高精度价格',
|
|
|
+ `settlement_price` int DEFAULT '-1' COMMENT '结算价,单位: 分',
|
|
|
+ `high_precision_settlement_price` decimal(11,6) DEFAULT '0.000000' COMMENT '高精度结算价',
|
|
|
+ PRIMARY KEY (`id`) USING BTREE
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='商品sku申请表';
|
|
|
+
|
|
|
+
|
|
|
+CREATE TABLE `product_spu_apply` (
|
|
|
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '商品 SPU 编号,自增',
|
|
|
+ `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商品名称',
|
|
|
+ `keyword` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '关键字',
|
|
|
+ `introduction` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '商品简介',
|
|
|
+ `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '商品详情',
|
|
|
+ `producer_area` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '产地',
|
|
|
+ `spu_type` int DEFAULT NULL COMMENT '商品类别',
|
|
|
+ `category_id` bigint NOT NULL COMMENT '商品分类编号',
|
|
|
+ `brand_id` int DEFAULT NULL COMMENT '商品品牌编号',
|
|
|
+ `pic_url` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商品封面图',
|
|
|
+ `slider_pic_urls` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '商品轮播图地址\n 数组,以逗号分隔\n 最多上传15张',
|
|
|
+ `sort` int NOT NULL DEFAULT '0' COMMENT '排序字段',
|
|
|
+ `status` tinyint NOT NULL COMMENT '商品状态: 0 上架(开启) 1 下架(禁用)-1 回收',
|
|
|
+ `spec_type` bit(1) DEFAULT NULL COMMENT '规格类型:0 单规格 1 多规格',
|
|
|
+ `price` int DEFAULT '-1' COMMENT '商品价格,单位使用:分',
|
|
|
+ `market_price` int DEFAULT NULL COMMENT '市场价,单位使用:分',
|
|
|
+ `cost_price` int DEFAULT '-1' COMMENT '成本价,单位: 分',
|
|
|
+ `stock` int NOT NULL DEFAULT '0' COMMENT '库存',
|
|
|
+ `delivery_types` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '配送方式数组',
|
|
|
+ `delivery_template_id` bigint DEFAULT NULL COMMENT '物流配置模板编号',
|
|
|
+ `give_integral` int NOT NULL DEFAULT '0' COMMENT '赠送积分',
|
|
|
+ `sub_commission_type` bit(1) DEFAULT NULL COMMENT '分销类型',
|
|
|
+ `sales_count` int DEFAULT '0' COMMENT '商品销量',
|
|
|
+ `virtual_sales_count` int DEFAULT '0' COMMENT '虚拟销量',
|
|
|
+ `browse_count` int DEFAULT '0' COMMENT '商品点击量',
|
|
|
+ `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
|
+ `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
|
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人',
|
|
|
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人',
|
|
|
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
|
|
+ `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号',
|
|
|
+ `shop_id` bigint DEFAULT NULL COMMENT '店铺id',
|
|
|
+ `merchant_id` bigint DEFAULT NULL COMMENT '商户id',
|
|
|
+ `hidden` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否隐藏。隐藏:1,不隐藏:0',
|
|
|
+ `promotion_fee` int DEFAULT NULL COMMENT '推广费, 单位: 分,值为sku中最大的推广费',
|
|
|
+ `spu_pay_type` int NOT NULL DEFAULT '1' COMMENT '商品支付类别(1 rmb 2积分)',
|
|
|
+ `high_precision` bit(1) NOT NULL DEFAULT b'0' COMMENT '高精度',
|
|
|
+ `high_precision_price` decimal(11,6) DEFAULT 0 COMMENT '高精度价格',
|
|
|
+ `apply_member_user_id` bigint DEFAULT NULL COMMENT '申请用户id',
|
|
|
+ `check_system_user_id` bigint DEFAULT NULL COMMENT '审核系统用户id',
|
|
|
+ `check_time` datetime DEFAULT NULL COMMENT '审核时间',
|
|
|
+ `check_comment` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '审核意见',
|
|
|
+ `check_status` tinyint DEFAULT '0' COMMENT '审核状态:默认0表示未审核,1审核通过,2审核不通过',
|
|
|
+ PRIMARY KEY (`id`) USING BTREE
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='商品spu申请表';
|
|
|
+
|
|
|
+CREATE TABLE `product_spu_apply_log` (
|
|
|
+ `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'spu审核记录id',
|
|
|
+ `status` tinyint NOT NULL DEFAULT '0' COMMENT '申请状态 0:申请中 1:通过 2:未通过',
|
|
|
+ `product_spu_apply_id` bigint NOT NULL COMMENT '商品申请id',
|
|
|
+ `check_system_user_id` bigint DEFAULT NULL COMMENT '审核系统用户id',
|
|
|
+ `change_json_object` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '修改的json对象',
|
|
|
+ `check_comment` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '审核意见',
|
|
|
+ `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '创建者',
|
|
|
+ `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
|
+ `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '更新者',
|
|
|
+ `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
|
+ `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
|
|
+ PRIMARY KEY (`id`) USING BTREE
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='商品审核记录';
|