提交其他文件
This commit is contained in:
36
app/api/validate/TeamasterValidate.php
Normal file
36
app/api/validate/TeamasterValidate.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\validate;
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
/**
|
||||
* 公众号茶艺师传参判断
|
||||
* Class TeamasterValidate
|
||||
* @package app\api\validate
|
||||
*/
|
||||
class TeamasterValidate extends BaseValidate
|
||||
{
|
||||
protected $rule = [
|
||||
'teamaster_id' => 'number',
|
||||
'page' => 'number',
|
||||
'size' => 'number'
|
||||
];
|
||||
|
||||
|
||||
protected $message = [
|
||||
'teamaster_id.require' => '茶艺师id缺失',
|
||||
'page.require' => '缺少页数',
|
||||
'page.number' => '页数必须为数字',
|
||||
'size.require' => '缺少条数',
|
||||
'size.number' => '条数必须为数字'
|
||||
];
|
||||
public function teamasterCollect()
|
||||
{
|
||||
return $this->only(['teamaster_id']);
|
||||
}
|
||||
public function teamasterCollectList()
|
||||
{
|
||||
return $this->only(['page','size']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user