feat: 新增产品属性增/删/改/查接口

This commit is contained in:
2025-02-12 14:33:39 +08:00
parent 06e7465155
commit 36ebe51a98
7 changed files with 314 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
<?php
use Phinx\Db\Adapter\MysqlAdapter;
use think\migration\Migrator;
class CreateProductAttrProp extends Migrator
@@ -29,6 +30,7 @@ class CreateProductAttrProp extends Migrator
{
$table = $this->table('product_attr_prop', ['id' => false, 'engine' => 'InnoDB', 'comment' => '商品属性特征表']);
$table->addColumn('attr_id', 'integer', ['signed' => false, 'null' => false, 'comment' => '属性ID'])
->addColumn('prop_type', MysqlAdapter::INT_TINY, ['limit' => 3, 'null' => false, 'default' => 2, 'comment' => '类型:1为选项类型2为文本输入类型'])
->addColumn('prop_name', 'string', ['limit' => 64, 'null' => false, 'comment' => '特征名'])
->addColumn('prop_value', 'string', ['limit' => 64, 'null' => false, 'comment' => '特征值'])
->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '新增时间'])