erp_old/app/admin/validate/setting/LabelValidate.php
2024-02-17 18:01:44 +08:00

82 lines
1.3 KiB
PHP

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