feat(edit): 商品编辑页优化

This commit is contained in:
R524809
2026-09-21 17:44:50 +08:00
parent 75fa2b60f3
commit 05747d6f22
20 changed files with 1006 additions and 244 deletions
+8
View File
@@ -213,6 +213,10 @@ export type ProductEditorSnapshot = {
display_name: string | null;
sort_order: number;
purchase_cost_cny: string | null;
/** 当前平台下该 SKU 对 SPU 主题标签的覆盖;空数组表示继承 SPU。 */
tags: string[];
/** 当前平台下该 SKU 对 SPU 产品描述的覆盖;null 表示继承 SPU。 */
description: string | null;
specification_values: SpecificationValue[];
physical_spec: VariantPhysicalSpec;
package_spec: VariantPackageSpec;
@@ -493,6 +497,10 @@ export const saveProductEditorDraftRequestSchema = z
.string()
.regex(/^\d+(\.\d{1,4})?$/)
.nullable(),
tags: z
.array(z.string().trim().min(1).max(100))
.max(30),
description: nullableText(100_000),
physical_spec: variantPhysicalSpec,
package_spec: variantPackageSpec,
offer_id: nullableText(500),
@@ -0,0 +1,5 @@
-- SKU 可覆盖 SPU 的主题标签与产品描述;同一 SKU 在不同平台 profile 下可保留不同文案。
ALTER TABLE atlas.product_variant_platform_listings
ADD COLUMN description TEXT,
ADD COLUMN tags JSONB NOT NULL DEFAULT '[]'::jsonb
CHECK (jsonb_typeof(tags) = 'array');