mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-11-30 22:20:45 +00:00
43 lines
912 B
PHP
43 lines
912 B
PHP
<?php
|
|
|
|
namespace App\Filters;
|
|
|
|
class GoodsSkuFilter extends Filters
|
|
{
|
|
protected function skuTitle($value)
|
|
{
|
|
return $this->builder->where('title', 'like', '%' . $value . '%');
|
|
}
|
|
|
|
protected function status($value)
|
|
{
|
|
return $this->builder->where('status', $value);
|
|
}
|
|
|
|
protected function excludeIds($value)
|
|
{
|
|
return $this->builder->whereNotIn('id', $value);
|
|
}
|
|
|
|
protected function externalSkuId($value)
|
|
{
|
|
return $this->builder->where('external_sku_id', $value);
|
|
}
|
|
|
|
protected function isCombination($value)
|
|
{
|
|
return $this->builder->where('is_combination', $value);
|
|
}
|
|
|
|
protected function createTimeStart($value)
|
|
{
|
|
|
|
return $this->builder->where('created_at',">=", $value);
|
|
}
|
|
|
|
protected function createTimeEnd($value)
|
|
{
|
|
return $this->builder->where('created_at',"<=", $value);
|
|
}
|
|
}
|