multi-store/app/admin/validate/inventory_warehouse/InventoryWarehouseValidate.php
mkm 8567f2de4a fix(inventory_store): 修复库存盘点逻辑
- 引入 Raw 类以处理复杂的数据库查询
- 使用 Raw 实例解决 nums 和 enter_nums 直接比较的问题
2025-02-14 18:00:33 +08:00

82 lines
1.4 KiB
PHP

<?php
namespace app\admin\validate\inventory_warehouse;
use app\common\validate\BaseValidate;
/**
* 仓库盘存验证器
* Class InventoryWarehouseValidate
* @package app\admin\validate\inventory_warehouse
*/
class InventoryWarehouseValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
];
/**
* @notes 添加场景
* @return InventoryWarehouseValidate
* @author admin
* @date 2025/02/14 17:24
*/
public function sceneAdd()
{
return $this->remove('id', true);
}
/**
* @notes 编辑场景
* @return InventoryWarehouseValidate
* @author admin
* @date 2025/02/14 17:24
*/
public function sceneEdit()
{
return $this->only(['id']);
}
/**
* @notes 删除场景
* @return InventoryWarehouseValidate
* @author admin
* @date 2025/02/14 17:24
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return InventoryWarehouseValidate
* @author admin
* @date 2025/02/14 17:24
*/
public function sceneDetail()
{
return $this->only(['id']);
}
}