SalesmanNewStore.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. use yii\behaviors\TimestampBehavior;
  10. use yii\db\ActiveRecord;
  11. /**
  12. * This is the model class for table "{{%salesman_new_store}}".
  13. *
  14. * @property integer $id
  15. * @property integer $salesman_saas_id
  16. * @property integer $store_id
  17. * @property integer $store_saas_id
  18. * @property integer $store_mini_id
  19. * @property string $store_mini_appid
  20. * @property string $store_mini_errmsg
  21. * @property integer $store_mini_info
  22. * @property string $store_mini_info_errmsg
  23. * @property string $store_mini_pay_apply_id
  24. * @property string $store_mini_pay_sub_mchid
  25. * @property string $store_mini_pay_errmsg
  26. * @property integer $store_ali_mini_id
  27. * @property string $store_ali_mini_appid
  28. * @property string $store_ali_mini_errmsg
  29. * @property string $store_ali_mini_pid
  30. * @property integer $store_ali_mini_pay
  31. * @property string $store_ali_mini_pay_errmsg
  32. * @property string $store_ali_mini_shop_id
  33. * @property string $store_ali_mini_shop_errmsg
  34. * @property integer $type
  35. * @property integer $is_delete
  36. * @property integer $created_at
  37. * @property integer $updated_at
  38. * @property integer $status
  39. * @property string $store_params
  40. */
  41. class SalesmanNewStore extends \yii\db\ActiveRecord
  42. {
  43. /**
  44. * @inheritdoc
  45. */
  46. public static function tableName()
  47. {
  48. return '{{%salesman_new_store}}';
  49. }
  50. public function behaviors()
  51. {
  52. return [
  53. [
  54. 'class' => TimestampBehavior::class,
  55. ]
  56. ];
  57. }
  58. public function getParams($key) {
  59. $store_params = json_decode($this->store_params, true);
  60. if(!is_array($store_params)){
  61. return '';
  62. }
  63. return $store_params[$key] ?? '';
  64. }
  65. }