erp/app/admin/validate/customer/CustomerValidate.php
2024-04-23 18:03:12 +08:00

84 lines
1.4 KiB
PHP

<?php
namespace app\admin\validate\customer;
use app\common\validate\BaseValidate;
/**
* 客户管理验证器
* Class CustomerValidate
* @package app\admin\validate\customer
*/
class CustomerValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require',
'name' => 'require',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'name' => '客户名称',
];
/**
* @notes 添加场景
* @return CustomerValidate
* @author likeadmin
* @date 2024/04/23 14:44
*/
public function sceneAdd()
{
return $this->only(['name']);
}
/**
* @notes 编辑场景
* @return CustomerValidate
* @author likeadmin
* @date 2024/04/23 14:44
*/
public function sceneEdit()
{
return $this->only(['id','name']);
}
/**
* @notes 删除场景
* @return CustomerValidate
* @author likeadmin
* @date 2024/04/23 14:44
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return CustomerValidate
* @author likeadmin
* @date 2024/04/23 14:44
*/
public function sceneDetail()
{
return $this->only(['id']);
}
}