Insure.php
2.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
namespace app\products\validate;
use app\common\validate\BaseValidate;
/**
* Notes:功能描述 通用验证规则
* User: 张佳
* DateTime: 2020/8/3 15:23
* Class Insure
* @package app\products\validate
*/
class Insure extends BaseValidate
{
protected $rule = [
"utype" => "require",
"org_code" => "require",
"uid" => "require",
'productCode' => 'require',
'suiteCode' => 'require',
'insBeginDate' => 'require',
'insEndDate' => 'require',
'chargeFreq' => 'require',
'birthday' => 'require',
'sex' => 'require',
'age' => 'require',
'socialFlag' => 'require',
'adultFlag' => 'require',
'totalPremiun' => 'require',
'monthPremium' => 'require',
'prevPremium' => 'require',
];
protected $message = [
"utype.require" => "获取推广码的用户类型必须",
"org_code.require" => "组织机构编码必须",
"uid.require" => "用户id必须",
'productCode.require' => '商品代码不能为空',
'suiteCode.require' => '方案代码不能为空',
'insBeginDate.require' => '保险起期不能为空',
'insEndDate.require' => '保险止期不能为空',
'chargeFreq.require' => '付费方式不能为空',
'birthday.require' => '生日不能为空',
'sex.require' => '性别不能为空',
'age.require' => '年龄不能为空',
'socialFlag.require' => '社保状态不能为空',
'adultFlag.require' => '是否成年人不能为空',
'totalPremiun' => '总保费不能为空',
'monthPremium' => '次月保费',
'prevPremium' => '标准保费',
];
protected $scene = [
"get_promo_code" => ["utype", "org_code", "uid"],
"pre_cal" => ["productCode","suiteCode","insBeginDate","insEndDate","chargeFreq"],
"pre_cal_info" =>["sex","age","birthday"],
"pre_cal_order" =>[''],
"pre_cal_holder" =>[''],
"pre_cal_insured" =>[''],
];
}