88 lines
1.5 KiB
PHP
88 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace app\admin\validate\user_ship;
|
|
|
|
|
|
use app\common\validate\BaseValidate;
|
|
|
|
|
|
/**
|
|
* 会员类型验证器
|
|
* Class UserShipValidate
|
|
* @package app\admin\validate\user_ship
|
|
*/
|
|
class UserShipValidate extends BaseValidate
|
|
{
|
|
|
|
/**
|
|
* 设置校验规则
|
|
* @var string[]
|
|
*/
|
|
protected $rule = [
|
|
'id' => 'require',
|
|
'title' => 'require',
|
|
'limit' => 'require',
|
|
'sort' => 'require',
|
|
];
|
|
|
|
|
|
/**
|
|
* 参数描述
|
|
* @var string[]
|
|
*/
|
|
protected $field = [
|
|
'id' => 'id',
|
|
'title' => '会员名称',
|
|
'limit' => '充值金额',
|
|
'sort' => '排序倒序',
|
|
];
|
|
|
|
|
|
/**
|
|
* @notes 添加场景
|
|
* @return UserShipValidate
|
|
* @author admin
|
|
* @date 2024/06/29 14:18
|
|
*/
|
|
public function sceneAdd()
|
|
{
|
|
return $this->only(['title','limit','sort']);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 编辑场景
|
|
* @return UserShipValidate
|
|
* @author admin
|
|
* @date 2024/06/29 14:18
|
|
*/
|
|
public function sceneEdit()
|
|
{
|
|
return $this->only(['id','title','limit','sort']);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 删除场景
|
|
* @return UserShipValidate
|
|
* @author admin
|
|
* @date 2024/06/29 14:18
|
|
*/
|
|
public function sceneDelete()
|
|
{
|
|
return $this->only(['id']);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 详情场景
|
|
* @return UserShipValidate
|
|
* @author admin
|
|
* @date 2024/06/29 14:18
|
|
*/
|
|
public function sceneDetail()
|
|
{
|
|
return $this->only(['id']);
|
|
}
|
|
|
|
} |