finance-pay/app/adminapi/validate/PayOrderValidate.php

116 lines
3.3 KiB
PHP
Raw Permalink Normal View History

2023-11-29 09:44:22 +08:00
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\validate;
use app\common\validate\BaseValidate;
/**
* PayOrder验证器
* Class PayOrderValidate
* @package app\adminapi\validate
*/
class PayOrderValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require',
'order_from' => 'require',
'order_type' => 'require',
'collection_account' => 'require',
'pay_user_role' => 'require',
'pay_user_info' => 'require',
'order_no' => 'require',
'business_order_no' => 'require',
'total_fee' => 'require',
'pay_type' => 'require',
'pay_status' => 'require',
'business_callback_url' => 'require',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'order_from' => '订单来源1商城2供销',
'order_type' => '订单类型',
'collection_account' => '收款账户',
'pay_user_role' => '付款角色',
'pay_user_info' => '付款方信息',
'order_no' => '支付订单编号',
'business_order_no' => '业务系统订单编号',
'total_fee' => '总金额',
'pay_type' => '支付方式',
'pay_status' => '支付状态',
'business_callback_url' => '业务系统异步通知地址',
];
/**
* @notes 添加场景
* @return PayOrderValidate
* @author likeadmin
* @date 2023/11/24 18:08
*/
public function sceneAdd()
{
return $this->only(['order_from','order_type','collection_account','pay_user_role','pay_user_info','order_no','business_order_no','total_fee','pay_type','pay_status','business_callback_url']);
}
/**
* @notes 编辑场景
* @return PayOrderValidate
* @author likeadmin
* @date 2023/11/24 18:08
*/
public function sceneEdit()
{
return $this->only(['id','order_from','order_type','collection_account','pay_user_role','pay_user_info','order_no','business_order_no','total_fee','pay_type','pay_status','business_callback_url']);
}
/**
* @notes 删除场景
* @return PayOrderValidate
* @author likeadmin
* @date 2023/11/24 18:08
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return PayOrderValidate
* @author likeadmin
* @date 2023/11/24 18:08
*/
public function sceneDetail()
{
return $this->only(['id']);
}
}