commit | author | age
|
90c639
|
1 |
<?php |
Z |
2 |
|
|
3 |
namespace app\models; |
|
4 |
|
|
5 |
use Yii; |
|
6 |
|
|
7 |
/** |
|
8 |
* This is the model class for table "{{%pay_type}}". |
|
9 |
* |
|
10 |
* @property int $id |
|
11 |
* @property int $mall_id |
|
12 |
* @property string $name 支付名称 |
|
13 |
* @property int $type 1:微信 2:支付宝 |
|
14 |
* @property string $appid |
|
15 |
* @property string $mchid |
|
16 |
* @property string $key |
|
17 |
* @property string $cert_pem |
|
18 |
* @property string $key_pem |
|
19 |
* @property int $is_service 是否为服务商支付 0否 1是 |
|
20 |
* @property string $service_key |
|
21 |
* @property string $service_appid 服务商appid |
|
22 |
* @property string $service_mchid 服务商mch_id |
|
23 |
* @property string $service_cert_pem |
|
24 |
* @property string $service_key_pem |
|
25 |
* @property int $is_auto_add 0否 1是 |
|
26 |
* @property string $alipay_appid 支付宝appid |
|
27 |
* @property string $app_private_key 支付宝应用私钥 |
|
28 |
* @property string $alipay_public_key 支付宝平台公钥 |
|
29 |
* @property string $appcert |
|
30 |
* @property string $alipay_rootcert 支付宝根证书 |
|
31 |
* @property int $is_delete |
|
32 |
* @property string $updated_at |
|
33 |
* @property string $created_at |
|
34 |
* @property string $deleted_at |
|
35 |
*/ |
|
36 |
class PayType extends \app\models\ModelActiveRecord |
|
37 |
{ |
|
38 |
/** |
|
39 |
* {@inheritdoc} |
|
40 |
*/ |
|
41 |
public static function tableName() |
|
42 |
{ |
|
43 |
return '{{%pay_type}}'; |
|
44 |
} |
|
45 |
|
|
46 |
/** |
|
47 |
* {@inheritdoc} |
|
48 |
*/ |
|
49 |
public function rules() |
|
50 |
{ |
|
51 |
return [ |
|
52 |
[['mall_id', 'name', 'updated_at', 'created_at', 'deleted_at'], 'required'], |
|
53 |
[['mall_id', 'type', 'is_service', 'is_auto_add', 'is_delete'], 'integer'], |
|
54 |
[['alipay_public_key', 'appcert', 'alipay_rootcert'], 'string'], |
|
55 |
[['updated_at', 'created_at', 'deleted_at'], 'safe'], |
|
56 |
[['name', 'appid', 'service_appid', 'service_mchid'], 'string', 'max' => 255], |
|
57 |
[['mchid', 'key', 'service_key', 'alipay_appid'], 'string', 'max' => 32], |
|
58 |
[['cert_pem', 'key_pem', 'service_cert_pem', 'service_key_pem', 'app_private_key'], 'string', 'max' => 2000], |
|
59 |
]; |
|
60 |
} |
|
61 |
|
|
62 |
/** |
|
63 |
* {@inheritdoc} |
|
64 |
*/ |
|
65 |
public function attributeLabels() |
|
66 |
{ |
|
67 |
return [ |
|
68 |
'id' => 'ID', |
|
69 |
'mall_id' => 'Mall ID', |
|
70 |
'name' => 'Name', |
|
71 |
'type' => '支付方式', |
|
72 |
'mchid' => '微信支付商户号', |
|
73 |
'key' => '微信支付Api密钥', |
|
74 |
'cert_pem' => '微信支付apiclient_cert.pem', |
|
75 |
'key_pem' => '微信支付apiclient_key.pem', |
|
76 |
'is_service' => '支付类型', |
|
77 |
'service_key' => '服务商Api密钥', |
|
78 |
'service_appid' => '服务商Appid', |
|
79 |
'service_mchid' => '服务商支付商户号', |
|
80 |
'service_cert_pem' => '服务商apiclient_cert.pem', |
|
81 |
'service_key_pem' => '服务商apiclient_key.pem', |
|
82 |
'is_auto_add' => 'Is Auto Add', |
|
83 |
'app_private_key' => '支付宝应用私钥', |
|
84 |
'alipay_public_key' => '支付宝平台公钥', |
|
85 |
'appcert' => '应用公钥证书', |
|
86 |
'alipay_rootcert' => '支付宝根证书', |
|
87 |
'is_delete' => 'Is Delete', |
|
88 |
'updated_at' => 'Updated At', |
|
89 |
'created_at' => 'Created At', |
|
90 |
'deleted_at' => 'Deleted At', |
|
91 |
]; |
|
92 |
} |
|
93 |
} |