bourse stock
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.3 KiB

3 months ago
<?php
namespace app\admin\validate\setting;
use app\admin\validate\AdminBaseValidate;
class PaymentValidate extends AdminBaseValidate
{
protected $rule = [
'page' => 'require|integer',
'limit' => 'require|integer',
'country' => 'require|checkIsString',
'channel' => 'require',
'service_rate' => 'require|float',
//'channel_type' => 'checkInRequire|in:Bank,TRC-20,ERC-20,BRC-20',
'channel_type' => 'require',
'status' => 'checkStatusRequire|in:0,1',
'pay_type' => 'checkStatusRequire|in:0,1',
'is_recharge' => 'checkStatusRequire|in:0,1',
'is_withdrawal' => 'checkStatusRequire|in:0,1',
'id' => 'require|checkNumberIntBg',
];
protected $message = [
'page.require' => '分页参数无效',
'page.integer' => '分页参数无效',
'limit.require' => '分页参数无效',
'limit.integer' => '分页参数无效',
'channel.require' => '渠道名称不能为空',
'country.require' => '国家代码无效',
'service_rate.require' => '手续费率不能为空',
'service_rate.float' => '手续费率无效',
'country.checkIsString' => '国家代码无效',
'status.checkStatusRequire' => '状态无效',
'status.in' => '状态无效',
'pay_type.checkStatusRequire' => '结算方式无效',
'pay_type.in' => '结算方式无效',
'is_recharge.checkStatusRequire' => '充值渠道状态无效',
'is_recharge.in' => '充值渠道状态无效',
'is_withdrawal.checkStatusRequire' => '提现渠道状态无效',
'is_withdrawal.in' => '提现渠道状态无效',
'channel_type.checkInRequire' => '渠道类型无效1',
'channel_type.in' => '渠道类型无效',
'channel_type.require' => '渠道类型无效',
'id.require' => '主键无效',
'id.checkNumberIntBg' => '主键无效',
];
protected $scene = [
// 美股
'payment_index' => ['page','limit'],
'payment_add' => ['country','channel', 'status', 'pay_type', 'service_rate', 'channel_type', 'exchange_rate','is_recharge','is_withdrawal'],
'payment_edit' => ['id','country','channel', 'status', 'pay_type', 'service_rate', 'channel_type', 'exchange_rate','is_recharge','is_withdrawal'],
'payment_info'=>['id'],
];
}