feat: 可扩展档案模式框架 + 内置 3C(电子) 模式
- 新增 category.archive_kind 与 kind_field 字段模板表(迁移 0010) - 种子 electronics 字段模板 + 3C 品类树(手机/笔记本/平板等) - 后端按档案模式动态计算完整度/合格:食品沿用 food_detail, 其它模式走 product.attributes + kind_field - 新增 GET /api/kind-fields?kind= 接口 - 后台编辑页按品类模式动态渲染规格参数表单 - 公开详情页/接口输出带标签的规格表 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -44,6 +44,8 @@ export interface ProductDetail {
|
||||
brand: string | null;
|
||||
category_id: string | null;
|
||||
category_path: string | null;
|
||||
archive_kind: string;
|
||||
attributes: Record<string, unknown>;
|
||||
net_content_value: number | null;
|
||||
net_content_unit: string | null;
|
||||
country_of_origin: string | null;
|
||||
@@ -77,9 +79,23 @@ export interface Category {
|
||||
level: number;
|
||||
parent_id: string | null;
|
||||
gpc_brick_code: string | null;
|
||||
archive_kind: string;
|
||||
product_count: number;
|
||||
}
|
||||
|
||||
export interface KindField {
|
||||
kind: string;
|
||||
field_key: string;
|
||||
group_label: string;
|
||||
label_zh: string;
|
||||
field_type: string;
|
||||
unit: string | null;
|
||||
options: string[];
|
||||
placeholder: string | null;
|
||||
sort_order: number;
|
||||
qualified: boolean;
|
||||
}
|
||||
|
||||
export interface CategoryInput {
|
||||
name_zh: string;
|
||||
name_en?: string | null;
|
||||
|
||||
Reference in New Issue
Block a user