refactor: 修改产品相关接口

This commit is contained in:
2025-02-11 15:31:53 +08:00
parent ae8802987a
commit a6ae40f120
2 changed files with 7 additions and 2 deletions

View File

@@ -37,9 +37,11 @@ class CreateProduct extends Migrator
->addColumn('desc', 'string', ['limit' => 255, 'null' => false, 'default' => '', 'comment' => '产品描述'])
->addColumn('video_img', 'string', ['limit' => 255, 'null' => false, 'default' => '', 'comment' => '产品视频封面'])
->addColumn('video_url', 'string', ['limit' => 255, 'null' => false, 'default' => '', 'comment' => '产品视频'])
->addColumn('is_sale', 'boolean', ['default' => 1, 'null' => false, 'comment' => '是否上架:1上架,0下架'])
->addColumn('is_sale', 'boolean', ['default' => 1, 'null' => false, 'comment' => '是否在售:1是,0否'])
->addColumn('is_new', 'boolean', ['default' => 0, 'null' => false, 'comment' => '是否新品:1新品,0非新品'])
->addColumn('is_hot', 'boolean', ['default' => 0, 'null' => false, 'comment' => '是否热销:1热销,0非热销'])
->addColumn('is_show', 'boolean', ['default' => 0, 'null' => false, 'comment' => '是否上架:1上架,0下架'])
->addColumn('stock_qty', 'integer', ['signed' => false, 'null' => true, 'default' => 0, 'comment' => '库存数量'])
->addColumn('sort', 'integer', ['null' => false, 'default' => 0, 'comment' => '排序'])
->addColumn('detail', 'text', ['null' => true, 'comment' => '产品详情'])
->addColumn('status', 'boolean', ['null' => false, 'default' => 1, 'comment' => '状态:1启用,-1禁用'])