multi-store/app/admin/validate/supplier/SupplierValidate.php
mkm ae2dcb759e feat(order): 添加订单处理逻辑
fix(order): 修复订单中的错误
refactor(order): 重构订单代码,优化结构
style(order): 优化订单代码风格
test(order): 为订单添加测试
docs(order): 更新订单相关文档
build(order): 更新订单依赖
ops(order): 更新订单基础设施
chore(order): 更新订单 .gitignore
2024-08-15 17:52:16 +08:00

94 lines
1.8 KiB
PHP

<?php
namespace app\admin\validate\supplier;
use app\common\validate\BaseValidate;
/**
* 供应链验证器
* Class SupplierValidate
* @package app\admin\validate\supplier
*/
class SupplierValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require',
'mer_name' => 'require',
'phone' => 'require',
'settle_cycle' => 'require',
'address' => 'require',
'mark' => 'require',
'status' => 'require',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'mer_name' => '商户名称',
'phone' => '商户电话',
'settle_cycle' => '结算周期,单位天',
'address' => '商户地址',
'mark' => '商户备注',
'status' => '状态',
];
/**
* @notes 添加场景
* @return SupplierValidate
* @author admin
* @date 2024/08/15 14:10
*/
public function sceneAdd()
{
return $this->only(['mer_name','phone','settle_cycle','address','mark','status']);
}
/**
* @notes 编辑场景
* @return SupplierValidate
* @author admin
* @date 2024/08/15 14:10
*/
public function sceneEdit()
{
return $this->only(['id','mer_name','phone','settle_cycle','address','mark','status']);
}
/**
* @notes 删除场景
* @return SupplierValidate
* @author admin
* @date 2024/08/15 14:10
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return SupplierValidate
* @author admin
* @date 2024/08/15 14:10
*/
public function sceneDetail()
{
return $this->only(['id']);
}
}