24 lines
480 B
PHP
24 lines
480 B
PHP
<?php
|
|
declare (strict_types = 1);
|
|
|
|
namespace app\admin\model\v1;
|
|
|
|
use app\common\model\ProductParamsBaseModel;
|
|
|
|
/**
|
|
* 产品 - 产品参数模型
|
|
* @mixin \think\Model
|
|
*/
|
|
class ProductParamsModel extends ProductParamsBaseModel
|
|
{
|
|
// 要据产品ID查询
|
|
public function scopeProductId($query, $id)
|
|
{
|
|
if (is_array($id)) {
|
|
$query->where('product_id', 'in', $id);
|
|
return;
|
|
}
|
|
$query->where('product_id', '=', $id);
|
|
}
|
|
}
|