84 lines
1.4 KiB
PHP
84 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace app\admin\validate\user;
|
|
|
|
|
|
use app\common\validate\BaseValidate;
|
|
|
|
|
|
/**
|
|
* 用户反馈表验证器
|
|
* Class UserFeedbackValidate
|
|
* @package app\admin\validate\user
|
|
*/
|
|
class UserFeedbackValidate extends BaseValidate
|
|
{
|
|
|
|
/**
|
|
* 设置校验规则
|
|
* @var string[]
|
|
*/
|
|
protected $rule = [
|
|
'id' => 'require',
|
|
'content' => 'require',
|
|
];
|
|
|
|
|
|
/**
|
|
* 参数描述
|
|
* @var string[]
|
|
*/
|
|
protected $field = [
|
|
'id' => 'id',
|
|
'content' => '反馈内容',
|
|
];
|
|
|
|
|
|
/**
|
|
* @notes 添加场景
|
|
* @return UserFeedbackValidate
|
|
* @author likeadmin
|
|
* @date 2024/05/13 16:56
|
|
*/
|
|
public function sceneAdd()
|
|
{
|
|
return $this->only(['content','images','name','contact']);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 编辑场景
|
|
* @return UserFeedbackValidate
|
|
* @author likeadmin
|
|
* @date 2024/05/13 16:56
|
|
*/
|
|
public function sceneEdit()
|
|
{
|
|
return $this->only(['id','content','images','name','contact']);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 删除场景
|
|
* @return UserFeedbackValidate
|
|
* @author likeadmin
|
|
* @date 2024/05/13 16:56
|
|
*/
|
|
public function sceneDelete()
|
|
{
|
|
return $this->only(['id']);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 详情场景
|
|
* @return UserFeedbackValidate
|
|
* @author likeadmin
|
|
* @date 2024/05/13 16:56
|
|
*/
|
|
public function sceneDetail()
|
|
{
|
|
return $this->only(['id']);
|
|
}
|
|
|
|
} |