xhUser.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "xhUser".
  5. *
  6. * @property int $id
  7. * @property string $mobile 手机号
  8. * @property string $avatar 头像
  9. * @property string $userName 用户的名称,昵称,显示的名字
  10. * @property string $realName 真实姓名
  11. * @property int $sex 性别 0未知 1男性2女性
  12. * @property string $birthday
  13. * @property string $password 密码
  14. * @property string $payPassword 支付密码
  15. * @property string $openId 微信openid
  16. * @property string $unionId 微信同一个开放平台下(网站应用,公众号等)用户唯一标识
  17. * @property string $alipayId 支付宝id
  18. * @property int $isFull 用户信息是否完整 0完整 1不完整,通过扫码付款生成的用户有不完整的情况
  19. * @property int $merchantId 商户id
  20. * @property int $isMember 是否会员
  21. * @property int $subscribe 是否关注平台 0未关注 1关注
  22. * @property int $hasSubscribe 关注历史 0没有关注过公众号 1有关注过
  23. * @property string $tag 标签id列表
  24. * @property string $province 省
  25. * @property string $city 市
  26. * @property string $dist 区县
  27. * @property string $address 详细街道地址
  28. * @property string $addLat 纬度
  29. * @property string $addLong 经度
  30. * @property string $addPrecision 精度
  31. * @property int $status 帐户状态 0正常 1冻结
  32. * @property string $remark 商家对用户的备注信息
  33. * @property string $createTime 创建时间
  34. * @property string $updateTime
  35. * @property int $subscribeTime 关注时间
  36. */
  37. class xhUser extends xhBaseModel
  38. {
  39. /**
  40. * @inheritdoc
  41. */
  42. public static function tableName()
  43. {
  44. return 'xhUser';
  45. }
  46. /**
  47. * @inheritdoc
  48. */
  49. public function rules()
  50. {
  51. return [
  52. [['sex', 'isFull', 'merchantId', 'isMember','source', 'identity', 'subscribe', 'hasSubscribe', 'status', 'subscribeTime','addTime'], 'integer'],
  53. [['birthday', 'createTime', 'updateTime'], 'safe'],
  54. [['createTime'], 'required'],
  55. [['mobile'], 'string', 'max' => 15],
  56. [['avatar'], 'string', 'max' => 200],
  57. [['userName', 'realName', 'alipayId'], 'string', 'max' => 50],
  58. [['password', 'payPassword'], 'string', 'max' => 64],
  59. [['openId','miniOpenId', 'unionId'], 'string', 'max' => 100],
  60. [['tag'], 'string', 'max' => 500],
  61. [['province', 'city', 'dist', 'address', 'addLat', 'addLong', 'addPrecision'], 'string', 'max' => 20],
  62. [['remark'], 'string', 'max' => 1000],
  63. ];
  64. }
  65. /**
  66. * @inheritdoc
  67. */
  68. public function attributeLabels()
  69. {
  70. return [
  71. 'id' => 'ID',
  72. 'mobile' => 'Mobile',
  73. 'avatar' => 'Avatar',
  74. 'userName' => 'User Name',
  75. 'realName' => 'Real Name',
  76. 'sex' => 'Sex',
  77. 'birthday' => 'Birthday',
  78. 'password' => 'Password',
  79. 'payPassword' => 'Pay Password',
  80. 'openId' => 'Open ID',
  81. 'unionId' => 'Union ID',
  82. 'alipayId' => 'Alipay ID',
  83. 'isFull' => 'Is Full',
  84. 'merchantId' => 'Merchant ID',
  85. 'isMember' => 'Is Member',
  86. 'identity' => 'identity',
  87. 'miniOpenId' => 'miniOpenId',
  88. 'subscribe' => 'Subscribe',
  89. 'hasSubscribe' => 'has Subscribe',
  90. 'tag' => 'Tag',
  91. 'province' => 'Province',
  92. 'city' => 'City',
  93. 'dist' => 'Dist',
  94. 'address' => 'Address',
  95. 'addLat' => 'Add Lat',
  96. 'addLong' => 'Add Long',
  97. 'addPrecision' => 'Add Precision',
  98. 'status' => 'Status',
  99. 'source' => 'source',
  100. 'addTime' => 'addTime',
  101. 'remark' => 'Remark',
  102. 'createTime' => 'Create Time',
  103. 'updateTime' => 'Update Time',
  104. 'subscribeTime' => 'Subscribe Time',
  105. ];
  106. }
  107. }