WechatConfig.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. /**
  9. * This is the model class for table "{{%wechat_config}}".
  10. *
  11. * @property integer $id
  12. * @property integer $store_id
  13. * @property string $app_id
  14. * @property string $app_secret
  15. * @property string $ext
  16. * @property string $mch_id
  17. * @property string $pay_key
  18. * @property string $cert_pem
  19. * @property string $pay_key_url
  20. * @property string $cert_pem_url
  21. * @property string $key_pem
  22. * @property string $name
  23. * @property integer $type
  24. * @property integer $created_at
  25. * @property integer $updated_at
  26. * @property integer $is_delete
  27. */
  28. class WechatConfig extends \yii\db\ActiveRecord
  29. {
  30. /**
  31. * 配置类型
  32. */
  33. const TYPE_CONFIG_MINI = 1;
  34. const TYPE_CONFIG_MP = 2;
  35. const TYPE_CONFIG_APP = 3;
  36. /**
  37. * @inheritdoc
  38. */
  39. public static function tableName()
  40. {
  41. return '{{%wechat_config}}';
  42. }
  43. /**
  44. * @inheritdoc
  45. */
  46. public function rules()
  47. {
  48. return [
  49. [['created_at', 'updated_at', 'is_delete', 'type', 'store_id'], 'integer'],
  50. [['store_id', 'app_id', 'app_secret'], 'required'],
  51. [['cert_pem', 'key_pem', 'ext', 'name', 'key_pem_url', 'cert_pem_url'], 'string'],
  52. [['app_id', 'app_secret', 'mch_id', 'pay_key'], 'string', 'max' => 255],
  53. ];
  54. }
  55. /**
  56. * @inheritdoc
  57. */
  58. public function attributeLabels()
  59. {
  60. return [
  61. 'id' => 'ID',
  62. 'store_id' => 'StoreID',
  63. 'app_id' => 'App ID',
  64. 'app_secret' => 'App Secret',
  65. 'mch_id' => 'Mch ID',
  66. 'pay_key' => 'Key',
  67. 'cert_pem' => 'Cert Pem',
  68. 'key_pem' => 'Key Pem',
  69. 'cert_pem_url' => 'Cert Pem Url',
  70. 'key_pem_url' => 'Key Pem Url',
  71. 'type' => '类型,1:小程序,2:公众号,3:app',
  72. 'ext' => '扩展字段',
  73. 'name' => '商城微信后台企业名称',
  74. 'created_at' => '创建时间',
  75. 'updated_at' => '更新时间',
  76. 'is_delete' => 'Is Delete',
  77. ];
  78. }
  79. }