multi-store/app/admin/validate/config/ConfigValidate.php

86 lines
1.4 KiB
PHP

<?php
namespace app\admin\validate\config;
use app\common\validate\BaseValidate;
/**
* 配置表验证器
* Class ConfigValidate
* @package app\admin\validate\config
*/
class ConfigValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require',
'name' => 'require',
'value' => 'require',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'name' => '名称',
'value' => '值',
];
/**
* @notes 添加场景
* @return ConfigValidate
* @author admin
* @date 2024/06/24 17:52
*/
public function sceneAdd()
{
return $this->only(['name','value']);
}
/**
* @notes 编辑场景
* @return ConfigValidate
* @author admin
* @date 2024/06/24 17:52
*/
public function sceneEdit()
{
return $this->only(['id','name','value']);
}
/**
* @notes 删除场景
* @return ConfigValidate
* @author admin
* @date 2024/06/24 17:52
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return ConfigValidate
* @author admin
* @date 2024/06/24 17:52
*/
public function sceneDetail()
{
return $this->only(['id']);
}
}