xhMerchant.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "xhMerchant".
  5. *
  6. * @property int $id
  7. * @property string $account 登陆帐号,用户名,域名后缀
  8. * @property string $merchantName 用户名,店名,公司名
  9. * @property string $password 密码
  10. * @property int $manageStyle 经营类型,0零售 1花艺培训学校 2批发商
  11. * @property int $accountStyle 公众号类型 0服务号 1订阅号 具体看配置文件
  12. * @property string $logo 花店logo
  13. * @property int $adminId 花店的管理员id,对应xhAdmin表
  14. * @property string $wxAppId 微信公众号的appid
  15. * @property string $wxAppSecret 微信公众号的appsecret
  16. * @property string $wxUserName 微信原始名 如gh_083d437a9941
  17. * @property string $wxAliasName 微信别名 如hzgdzh
  18. * @property string $wxQrcodeUrl 公众号二维码图片
  19. * @property string $gatheringQrcodeUrl 收款二维码
  20. * @property string $wxToken 微信token
  21. * @property string $wxJsApiTicket 微信分享调用jsapi_ticket
  22. * @property string $wxJsApiTicketExpire 微信分享调用jsapi_ticket过期时间点
  23. * @property string $wxAccessToken wxAccessToken
  24. * @property string $wxAccessTokenTime 微信accesstoken过期时间
  25. * @property string $wxRefreshToken wxAccessToken 的 refresh token
  26. * @property string $shopName 店名,分店名,用于微信门店创建
  27. * @property string $shopProvince 省
  28. * @property string $shopCity 市
  29. * @property string $shopDist 区县
  30. * @property string $shopAddress 详细街道地址
  31. * @property string $shopLat 商店的纬度
  32. * @property string $shopLong 商店的经度
  33. * @property string $shopPrecision 商店的精度
  34. * @property string $shopPhotoList 店面门牌照片 json
  35. * @property int $agentLevel 代理商等级 0非代理商
  36. * @property int $status 0待审1审核通过2审核未通过3冻结4解除冻结5自主关闭
  37. * @property string $createTime 创建时间
  38. * @property string $updateTime
  39. */
  40. class xhMerchant extends xhBaseModel
  41. {
  42. /**
  43. * @inheritdoc
  44. */
  45. public static function tableName()
  46. {
  47. return 'xhMerchant';
  48. }
  49. /**
  50. * @inheritdoc
  51. */
  52. public function rules()
  53. {
  54. return [
  55. [['manageStyle', 'accountStyle', 'adminId', 'agentLevel', 'status'], 'integer'],
  56. [['wxJsApiTicketExpire', 'wxAccessTokenTime', 'createTime', 'updateTime'], 'safe'],
  57. [['createTime'], 'required'],
  58. [['account', 'wxUserName', 'wxAliasName', 'shopName'], 'string', 'max' => 50],
  59. [['merchantName', 'password', 'logo', 'wxAppId', 'wxAppSecret', 'wxQrcodeUrl', 'gatheringQrcodeUrl'], 'string', 'max' => 100],
  60. [['wxToken', 'wxJsApiTicket', 'wxAccessToken', 'wxRefreshToken'], 'string', 'max' => 500],
  61. [['shopProvince', 'shopCity', 'shopDist', 'shopAddress', 'shopLat', 'shopLong', 'shopPrecision'], 'string', 'max' => 20],
  62. [['shopPhotoList'], 'string', 'max' => 1000],
  63. [['account'], 'unique'],
  64. [['merchantName'], 'unique'],
  65. ];
  66. }
  67. /**
  68. * @inheritdoc
  69. */
  70. public function attributeLabels()
  71. {
  72. return [
  73. 'id' => 'ID',
  74. 'account' => 'Account',
  75. 'merchantName' => 'Merchant Name',
  76. 'password' => 'Password',
  77. 'manageStyle' => 'Manage Style',
  78. 'accountStyle' => 'Account Style',
  79. 'logo' => 'Logo',
  80. 'adminId' => 'Admin ID',
  81. 'wxAppId' => 'Wx App ID',
  82. 'wxAppSecret' => 'Wx App Secret',
  83. 'wxUserName' => 'Wx User Name',
  84. 'wxAliasName' => 'Wx Alias Name',
  85. 'wxQrcodeUrl' => 'Wx Qrcode Url',
  86. 'gatheringQrcodeUrl' => 'Gathering Qrcode Url',
  87. 'wxToken' => 'Wx Token',
  88. 'wxJsApiTicket' => 'Wx Js Api Ticket',
  89. 'wxJsApiTicketExpire' => 'Wx Js Api Ticket Expire',
  90. 'wxAccessToken' => 'Wx Access Token',
  91. 'wxAccessTokenTime' => 'Wx Access Token Time',
  92. 'wxRefreshToken' => 'Wx Refresh Token',
  93. 'shopName' => 'Shop Name',
  94. 'shopProvince' => 'Shop Province',
  95. 'shopCity' => 'Shop City',
  96. 'shopDist' => 'Shop Dist',
  97. 'shopAddress' => 'Shop Address',
  98. 'shopLat' => 'Shop Lat',
  99. 'shopLong' => 'Shop Long',
  100. 'shopPrecision' => 'Shop Precision',
  101. 'shopPhotoList' => 'Shop Photo List',
  102. 'agentLevel' => 'Agent Level',
  103. 'status' => 'Status',
  104. 'createTime' => 'Create Time',
  105. 'updateTime' => 'Update Time',
  106. ];
  107. }
  108. }