xhWxOpenAdmin.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "xhWxOpenAdmin".
  5. *
  6. * @property int $id
  7. * @property string $mobile 手机号
  8. * @property string $avatar 头像
  9. * @property string $adminName 管理员姓名
  10. * @property string $password 密码
  11. * @property int $roleId 角色id
  12. * @property string $province 省
  13. * @property string $city 市
  14. * @property string $dist 区县
  15. * @property string $address 详细街道地址
  16. * @property string $latitude 纬度
  17. * @property string $longitude 经度
  18. * @property string $precision 精度
  19. * @property string $openId 微信openid
  20. * @property int $merchantId 平台所属的商家id
  21. * @property int $userId 管理员的信息从用户表里哪个id复制过来的
  22. * @property int $wxOpenId 管理员属于哪个开放平台
  23. * @property string $unionId 微信unionId
  24. * @property int $subscribe 关注微信公众号 0未关注 1关注
  25. * @property int $status 帐户状态 0正常 1冻结
  26. * @property string $createTime 创建时间
  27. * @property string $updateTime
  28. */
  29. class xhWxOpenAdmin extends xhBaseModel
  30. {
  31. /**
  32. * @inheritdoc
  33. */
  34. public static function tableName()
  35. {
  36. return 'xhWxOpenAdmin';
  37. }
  38. /**
  39. * @inheritdoc
  40. */
  41. public function rules()
  42. {
  43. return [
  44. [['roleId', 'merchantId', 'userId', 'wxOpenId', 'subscribe', 'status'], 'integer'],
  45. [['createTime'], 'required'],
  46. [['createTime', 'updateTime'], 'safe'],
  47. [['mobile'], 'string', 'max' => 15],
  48. [['avatar'], 'string', 'max' => 200],
  49. [['adminName'], 'string', 'max' => 50],
  50. [['password', 'openId', 'unionId'], 'string', 'max' => 100],
  51. [['province', 'city', 'dist', 'address', 'latitude', 'longitude', 'precision'], 'string', 'max' => 20],
  52. [['openId'], 'unique'],
  53. ];
  54. }
  55. /**
  56. * @inheritdoc
  57. */
  58. public function attributeLabels()
  59. {
  60. return [
  61. 'id' => 'ID',
  62. 'mobile' => 'Mobile',
  63. 'avatar' => 'Avatar',
  64. 'adminName' => 'Admin Name',
  65. 'password' => 'Password',
  66. 'roleId' => 'Role ID',
  67. 'province' => 'Province',
  68. 'city' => 'City',
  69. 'dist' => 'Dist',
  70. 'address' => 'Address',
  71. 'latitude' => 'Latitude',
  72. 'longitude' => 'Longitude',
  73. 'precision' => 'Precision',
  74. 'openId' => 'Open ID',
  75. 'merchantId' => 'Merchant ID',
  76. 'userId' => 'User ID',
  77. 'wxOpenId' => 'Wx Open ID',
  78. 'unionId' => 'Union ID',
  79. 'subscribe' => 'Subscribe',
  80. 'status' => 'Status',
  81. 'createTime' => 'Create Time',
  82. 'updateTime' => 'Update Time',
  83. ];
  84. }
  85. }