QuickBuckleApply.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. /**
  9. * @description:
  10. * @property string $huifu_id
  11. * @property string $card_no
  12. * @property string $card_name
  13. * @property string $cert_no
  14. * @property string $mobile_no
  15. * @property string $req_date
  16. * @property string $req_seq_id
  17. * @property string $token_no
  18. * @property string $user_huifu_id
  19. * @property integer $bind_card_stat
  20. * @property integer $saas_id
  21. * @property string $bank_name
  22. * @property string $card_type
  23. * @property string $card_bin
  24. * @property string $issuer_id
  25. * @property string $bank_code
  26. * agent_examine
  27. */
  28. class QuickBuckleApply extends \yii\db\ActiveRecord
  29. {
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public static function tableName()
  34. {
  35. return '{{%quick_buckle_apply}}';
  36. }
  37. /**
  38. * {@inheritdoc}
  39. */
  40. public function rules()
  41. {
  42. return [
  43. [[ 'huifu_id','card_no','card_name','cert_no','mobile_no','req_date','req_seq_id','token_no','user_huifu_id','bank_name','card_type','card_bin','issuer_id','bank_code'], 'string'],
  44. [['bind_card_stat', 'saas_id'], 'integer']
  45. ];
  46. }
  47. /**
  48. * {@inheritdoc}
  49. */
  50. public function attributeLabels()
  51. {
  52. return [
  53. 'id' => 'ID',
  54. 'huifu_id' => '汇付商户Id',
  55. 'saas_id' => '商盟用户id',
  56. 'card_no' => '银行卡号',
  57. 'card_name' => '银行卡开户姓名',
  58. 'cert_no' => '身份证',
  59. 'mobile_no' => '手机号',
  60. 'req_date' => '请求日期',
  61. 'req_seq_id' => '请求流水号',
  62. 'token_no' => '卡令牌',
  63. 'user_huifu_id' => '用户汇付号',
  64. 'bind_card_stat' => '绑卡状态',
  65. 'bank_name' => '银行名称',
  66. 'card_type' => '银行卡类型',
  67. 'card_bin' => '银行卡BIN',
  68. 'issuer_id' => '发卡行id',
  69. 'bank_code' => '银行编码',
  70. ];
  71. }
  72. public static function add($data)
  73. {
  74. $app = new self();
  75. $app->huifu_id = $data['huifu_id'];
  76. $app->saas_id = $data['saas_id'];
  77. $app->card_no = $data['card_no'];
  78. $app->card_name = $data['card_name'];
  79. $app->cert_no = $data['cert_no'];
  80. $app->mobile_no = $data['mobile_no'];
  81. $app->req_date = $data['req_date'];
  82. $app->req_seq_id = $data['req_seq_id'];
  83. $app->bank_name = explode('(', str_replace('\n','', $data['bank_name']))[0];
  84. $app->card_type = $data['card_type'];
  85. $app->card_bin = $data['card_bin'];
  86. $app->issuer_id = $data['issuer_id'];
  87. $app->bank_code = $data['bank_code'];
  88. return $app->save();
  89. }
  90. }