84 lines
1.4 KiB
PHP
84 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace app\psi\validate;
|
|
|
|
|
|
use app\common\validate\BaseValidate;
|
|
|
|
|
|
/**
|
|
* PsiWarehouseOrder验证器
|
|
* Class WarehouseOrderValidate
|
|
* @package app\psi\validate
|
|
*/
|
|
class WarehouseOrderValidate extends BaseValidate
|
|
{
|
|
|
|
/**
|
|
* 设置校验规则
|
|
* @var string[]
|
|
*/
|
|
protected $rule = [
|
|
'id' => 'require',
|
|
'total_price' => 'require',
|
|
];
|
|
|
|
|
|
/**
|
|
* 参数描述
|
|
* @var string[]
|
|
*/
|
|
protected $field = [
|
|
'id' => 'id',
|
|
'total_price' => '总价格',
|
|
];
|
|
|
|
|
|
/**
|
|
* @notes 添加场景
|
|
* @return WarehouseOrderValidate
|
|
* @author admin
|
|
* @date 2025/03/10 11:08
|
|
*/
|
|
public function sceneAdd()
|
|
{
|
|
return $this->only(['total_price']);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 编辑场景
|
|
* @return WarehouseOrderValidate
|
|
* @author admin
|
|
* @date 2025/03/10 11:08
|
|
*/
|
|
public function sceneEdit()
|
|
{
|
|
return $this->only(['id','total_price']);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 删除场景
|
|
* @return WarehouseOrderValidate
|
|
* @author admin
|
|
* @date 2025/03/10 11:08
|
|
*/
|
|
public function sceneDelete()
|
|
{
|
|
return $this->only(['id']);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 详情场景
|
|
* @return WarehouseOrderValidate
|
|
* @author admin
|
|
* @date 2025/03/10 11:08
|
|
*/
|
|
public function sceneDetail()
|
|
{
|
|
return $this->only(['id']);
|
|
}
|
|
|
|
} |