refactor: 修改产品更新及详情接口
This commit is contained in:
19
app/admin/model/v1/ProductRelatedModel.php
Normal file
19
app/admin/model/v1/ProductRelatedModel.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace app\admin\model\v1;
|
||||
|
||||
use app\common\model\ProductRelatedBaseModel;
|
||||
|
||||
/**
|
||||
* 产品 - 关联产品模型
|
||||
* @mixin \think\Model
|
||||
*/
|
||||
class ProductRelatedModel extends ProductRelatedBaseModel
|
||||
{
|
||||
// 根据产品ID查询
|
||||
public function scopeProductId($query, $id)
|
||||
{
|
||||
$query->where('product_id', $id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user