refactor: 产品分类添加path层级路径逻辑

This commit is contained in:
2025-04-24 14:21:33 +08:00
parent 865193475b
commit 8e7bb8c51a
4 changed files with 22 additions and 17 deletions

View File

@@ -32,6 +32,7 @@ class CreateProductCategory extends Migrator
$table->addColumn('language_id', 'integer', ['signed' => false, 'null' => false, 'comment' => '语言ID'])
->addColumn('unique_id', 'string', ['limit' => 64, 'null' => false, 'comment' => '唯一ID'])
->addColumn('pid', 'integer', ['signed' => false, 'null' => false, 'default' => 0, 'comment' => '父级ID'])
->addColumn('path', 'string', ['limit' => 128, 'null' => true, 'default' => null, 'comment' => '层级路径'])
->addColumn('name', 'string', ['limit' => 64, 'null' => false, 'comment' => '分类名称'])
->addColumn('icon', 'string', ['limit' => 125, 'default' => null, 'comment' => '图标'])
->addColumn('desc', 'string', ['limit' => 255, 'default' => null, 'comment' => '描述信息'])