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:
@@ -0,0 +1,9 @@
|
||||
-- Detach any products from the seeded 3C categories, then remove them.
|
||||
UPDATE product SET category_id = NULL
|
||||
WHERE category_id IN (SELECT id FROM category WHERE path <@ 'electronics');
|
||||
|
||||
DELETE FROM category WHERE path <@ 'electronics';
|
||||
|
||||
DROP TABLE IF EXISTS kind_field;
|
||||
|
||||
ALTER TABLE category DROP COLUMN IF EXISTS archive_kind;
|
||||
Reference in New Issue
Block a user