Profile.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. namespace We7\Table\Users;
  7. class Profile extends \We7Table {
  8. protected $tableName = 'users_profile';
  9. protected $primaryKey = 'id';
  10. protected $field = array(
  11. 'uid',
  12. 'createtime',
  13. 'edittime',
  14. 'realname',
  15. 'nickname',
  16. 'avatar',
  17. 'qq',
  18. 'mobile',
  19. 'fakeid',
  20. 'vip',
  21. 'gender',
  22. 'birthyear',
  23. 'birthmonth',
  24. 'birthday',
  25. 'constellation',
  26. 'zodiac',
  27. 'telephone',
  28. 'idcard',
  29. 'studentid',
  30. 'grade',
  31. 'address',
  32. 'zipcode',
  33. 'nationality',
  34. 'resideprovince',
  35. 'residecity',
  36. 'residedist',
  37. 'graduateschool',
  38. 'company',
  39. 'education',
  40. 'occupation',
  41. 'position',
  42. 'revenue',
  43. 'affectivestatus',
  44. 'lookingfor',
  45. 'bloodtype',
  46. 'height',
  47. 'weight',
  48. 'alipay',
  49. 'msn',
  50. 'email',
  51. 'taobao',
  52. 'site',
  53. 'bio',
  54. 'interest',
  55. 'workerid',
  56. 'send_expire_status',
  57. 'is_send_mobile_status',
  58. 'location',
  59. );
  60. protected $default = array(
  61. 'uid' => '',
  62. 'createtime' => '',
  63. 'edittime' => '',
  64. 'realname' => '',
  65. 'nickname' => '',
  66. 'avatar' => '',
  67. 'qq' => '',
  68. 'mobile' => '',
  69. 'fakeid' => '',
  70. 'vip' => '0',
  71. 'gender' => '0',
  72. 'birthyear' => '0',
  73. 'birthmonth' => '0',
  74. 'birthday' => '0',
  75. 'constellation' => '',
  76. 'zodiac' => '',
  77. 'telephone' => '',
  78. 'idcard' => '',
  79. 'studentid' => '',
  80. 'grade' => '',
  81. 'address' => '',
  82. 'zipcode' => '',
  83. 'nationality' => '',
  84. 'resideprovince' => '',
  85. 'residecity' => '',
  86. 'residedist' => '',
  87. 'graduateschool' => '',
  88. 'company' => '',
  89. 'education' => '',
  90. 'occupation' => '',
  91. 'position' => '',
  92. 'revenue' => '',
  93. 'affectivestatus' => '',
  94. 'lookingfor' => '',
  95. 'bloodtype' => '',
  96. 'height' => '',
  97. 'weight' => '',
  98. 'alipay' => '',
  99. 'msn' => '',
  100. 'email' => '',
  101. 'taobao' => '',
  102. 'site' => '',
  103. 'bio' => '',
  104. 'interest' => '',
  105. 'workerid' => '',
  106. 'send_expire_status' => '0',
  107. 'is_send_mobile_status' => '',
  108. 'location' => '',
  109. );
  110. public function getByUid($uid) {
  111. return $this->query->where('uid', $uid)->get();
  112. }
  113. public function getByMobile($mobile) {
  114. return $this->query->where('mobile', $mobile)->get();
  115. }
  116. }