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.
45 lines
1.8 KiB
45 lines
1.8 KiB
<?php
|
|
|
|
namespace app\home\validate;
|
|
|
|
class WalletValidate extends BaseHomeValidate
|
|
{
|
|
protected $rule = [
|
|
'user_id' => 'require|number',
|
|
'recharge_type' => 'require|in:1,2',
|
|
'recharge_channel' => 'require|isString',
|
|
'recharge_num' => 'require|number',
|
|
'change_num' => 'require|gt:0',
|
|
'page' => 'number',
|
|
'page_size' => 'number',
|
|
];
|
|
|
|
protected $message = [
|
|
'user_id.require' => 'Please fill in the user ID.',
|
|
'account_type.require' => 'Please fill in the market type.',
|
|
'from_account.require' => 'Please select the transfer out account.',
|
|
'to_account.require' => 'Please select the transfer in account.',
|
|
'account_type.in' => 'Account type is incorrect.',
|
|
'from_account.in' => 'Transfer out account type is incorrect.',
|
|
'to_account.in' => 'Transfer in account type is incorrect.',
|
|
'recharge_type.require' => 'Please fill in the recharge method.',
|
|
'recharge_type.in' => 'The recharge method is incorrect.',
|
|
'recharge_channel.require' => 'Please fill in the recharge channel.',
|
|
'recharge_num.require' => 'Please fill in the recharge amount.',
|
|
'change_num.gt' => 'The quantity must be greater than 0.',
|
|
'page.number' => 'Please enter the page number.',
|
|
'page_size.number' => 'Please enter the page size number.',
|
|
];
|
|
|
|
protected $scene = [
|
|
'recharge' => ['user_id','account_type','recharge_type','recharge_channel','recharge_num'],
|
|
'transfer' => ['user_id','from_account','to_account','change_num'],
|
|
|
|
'getRechargeList'=>['user_id','page','page_size'],
|
|
'getDrawalList'=>['user_id','account_type','page','page_size'],
|
|
'getUserBalance'=>['user_id','account_type'],
|
|
|
|
|
|
|
|
];
|
|
}
|
|
|