FounderGroup.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 FounderGroup extends \We7Table {
  8. protected $tableName = 'users_founder_group';
  9. protected $primaryKey = 'id';
  10. protected $field = array(
  11. 'name',
  12. 'package',
  13. 'maxaccount',
  14. 'maxsubaccount',
  15. 'timelimit',
  16. 'maxwxapp',
  17. 'maxwebapp',
  18. 'maxphoneapp',
  19. 'maxxzapp',
  20. 'maxaliapp',
  21. 'maxbaiduapp',
  22. 'maxtoutiaoapp',
  23. );
  24. protected $default = array(
  25. 'name' => '',
  26. 'package' => '',
  27. 'maxaccount' => '0',
  28. 'maxsubaccount' => '',
  29. 'timelimit' => '0',
  30. 'maxwxapp' => '0',
  31. 'maxwebapp' => '0',
  32. 'maxphoneapp' => '0',
  33. 'maxxzapp' => '0',
  34. 'maxaliapp' => '0',
  35. 'maxbaiduapp' => '0',
  36. 'maxtoutiaoapp' => '0',
  37. );
  38. public function searchWithName($name) {
  39. return $this->where('name', $name);
  40. }
  41. public function searchWithNoId($id) {
  42. return $this->where('id !=', $id);
  43. }
  44. public function getUserFounderGroupById($id) {
  45. return $this->where('id', $id)->get();
  46. }
  47. public function getUserFounderGroupList() {
  48. return $this->query->from('users_founder_group')->getall('id');
  49. }
  50. }