erp/app/admin/validate/express/ExpressValidate.php

84 lines
1.4 KiB
PHP

<?php
namespace app\admin\validate\express;
use app\common\validate\BaseValidate;
/**
* 快递公司验证器
* Class ExpressValidate
* @package app\admin\validate\express
*/
class ExpressValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require',
'name' => 'require',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'name' => '快递公司',
];
/**
* @notes 添加场景
* @return ExpressValidate
* @author likeadmin
* @date 2024/05/28 09:58
*/
public function sceneAdd()
{
return $this->only(['name']);
}
/**
* @notes 编辑场景
* @return ExpressValidate
* @author likeadmin
* @date 2024/05/28 09:58
*/
public function sceneEdit()
{
return $this->only(['id','name']);
}
/**
* @notes 删除场景
* @return ExpressValidate
* @author likeadmin
* @date 2024/05/28 09:58
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return ExpressValidate
* @author likeadmin
* @date 2024/05/28 09:58
*/
public function sceneDetail()
{
return $this->only(['id']);
}
}