mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 05:49:20 +08:00
feat: 新增拼多多店铺管理和商品管理
This commit is contained in:
@@ -15,8 +15,8 @@ DROP TABLE IF EXISTS `channel_pdd_goods`;
|
||||
CREATE TABLE `channel_pdd_goods` (
|
||||
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`company_id` bigint UNSIGNED NOT NULL COMMENT '公司ID',
|
||||
`shop_id` bigint UNSIGNED NOT NULL COMMENT '店铺ID(ec_shop.id)',
|
||||
`pdd_auth_id` bigint UNSIGNED NULL DEFAULT NULL COMMENT '拼多多授权ID(open_pdd_auth.id)',
|
||||
`shop_id` bigint UNSIGNED NOT NULL COMMENT '渠道店铺ID(channel_pdd_shop.id)',
|
||||
`mall_id` bigint UNSIGNED NOT NULL COMMENT '拼多多店铺ID(mall_id)',
|
||||
`goods_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '拼多多商品ID(goods_id)',
|
||||
`goods_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '商品名称(goods_name)',
|
||||
`goods_quantity` int NOT NULL DEFAULT 0 COMMENT '商品总库存(goods_quantity)',
|
||||
@@ -31,14 +31,13 @@ CREATE TABLE `channel_pdd_goods` (
|
||||
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '入库时间',
|
||||
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `uk_channel_pdd_goods_company_goods`(`company_id` ASC, `goods_id` ASC) USING BTREE,
|
||||
INDEX `idx_channel_pdd_goods_shop`(`shop_id` ASC) USING BTREE,
|
||||
UNIQUE INDEX `uk_channel_pdd_goods_shop_goods`(`shop_id` ASC, `goods_id` ASC) USING BTREE,
|
||||
INDEX `idx_channel_pdd_goods_company_mall`(`company_id` ASC, `mall_id` ASC) USING BTREE,
|
||||
INDEX `idx_channel_pdd_goods_mall_goods`(`mall_id` ASC, `goods_id` ASC) USING BTREE,
|
||||
INDEX `idx_channel_pdd_goods_onsale`(`is_onsale` ASC) USING BTREE,
|
||||
INDEX `idx_channel_pdd_goods_auth`(`pdd_auth_id` ASC) USING BTREE,
|
||||
INDEX `idx_channel_pdd_goods_sync`(`last_sync_time` ASC) USING BTREE,
|
||||
CONSTRAINT `fk_channel_pdd_goods_company` FOREIGN KEY (`company_id`) REFERENCES `org_company` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `fk_channel_pdd_goods_shop` FOREIGN KEY (`shop_id`) REFERENCES `ec_shop` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `fk_channel_pdd_goods_auth` FOREIGN KEY (`pdd_auth_id`) REFERENCES `open_pdd_auth` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||
CONSTRAINT `fk_channel_pdd_goods_shop` FOREIGN KEY (`shop_id`) REFERENCES `channel_pdd_shop` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '拼多多-商品主表(SPU)' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ========================================
|
||||
|
||||
Reference in New Issue
Block a user