Clerks.php 878 B

123456789101112131415161718192021222324252627282930313233343536373839
  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\Activity;
  7. class Clerks extends \We7Table {
  8. protected $tableName = 'activity_clerks';
  9. protected $primaryKey = 'id';
  10. protected $field = array(
  11. 'uniacid',
  12. 'uid',
  13. 'storeid',
  14. 'name',
  15. 'password',
  16. 'mobile',
  17. 'openid',
  18. 'nickname',
  19. );
  20. protected $default = array(
  21. 'uniacid' => '',
  22. 'uid' => 0,
  23. 'storeid' => 0,
  24. 'name' => '',
  25. 'password' => '',
  26. 'mobile' => '',
  27. 'openid' => '',
  28. 'nickname' => '',
  29. );
  30. public function getByUid($uid, $uniacid) {
  31. return $this->query->where('uid', $uid)->where('uniacid', $uniacid)->get();
  32. }
  33. public function getByOpenid($openid, $uniacid) {
  34. return $this->query->where('openid', $openid)->where('uniacid', $uniacid)->get();
  35. }
  36. }