MappingFans.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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\Mc;
  7. class MappingFans extends \We7Table {
  8. protected $tableName = 'mc_mapping_fans';
  9. protected $primaryKey = 'fanid';
  10. protected $field = array(
  11. 'acid',
  12. 'uniacid',
  13. 'uid',
  14. 'openid',
  15. 'nickname',
  16. 'groupid',
  17. 'salt',
  18. 'follow',
  19. 'followtime',
  20. 'unfollowtime',
  21. 'tag',
  22. 'updatetime',
  23. 'unionid',
  24. 'user_from',
  25. );
  26. protected $default = array(
  27. 'acid' => '',
  28. 'uniacid' => '0',
  29. 'uid' => '0',
  30. 'openid' => '',
  31. 'nickname' => '',
  32. 'groupid' => '',
  33. 'salt' => '',
  34. 'follow' => '1',
  35. 'followtime' => '',
  36. 'unfollowtime' => '',
  37. 'tag' => '',
  38. 'updatetime' => '0',
  39. 'unionid' => '',
  40. 'user_from' => '',
  41. );
  42. public function searchWithUniacid($uniacid) {
  43. return $this->query->where('uniacid', $uniacid);
  44. }
  45. public function searchWithOpenid($openid) {
  46. return $this->query->where('openid', $openid);
  47. }
  48. public function searchWithUnionid($unionid) {
  49. return $this->query->where('unionid', $unionid);
  50. }
  51. }