Nav.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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\Site;
  7. class Nav extends \We7Table {
  8. protected $tableName = 'site_nav';
  9. protected $primaryKey = 'id';
  10. protected $field = array(
  11. 'uniacid',
  12. 'multiid',
  13. 'categoryid',
  14. 'section',
  15. 'module',
  16. 'displayorder',
  17. 'name',
  18. 'description',
  19. 'position',
  20. 'url',
  21. 'icon',
  22. 'css',
  23. 'status',
  24. );
  25. protected $default = array(
  26. 'uniacid' => '',
  27. 'multiid' => '',
  28. 'categoryid' => '0',
  29. 'section' => '0',
  30. 'module' => '',
  31. 'displayorder' => '',
  32. 'name' => '',
  33. 'description' => '',
  34. 'position' => '1',
  35. 'url' => '',
  36. 'icon' => '',
  37. 'css' => '',
  38. 'status' => '1',
  39. );
  40. public function searchWithPosition($position) {
  41. return $this->query->where('position', $position);
  42. }
  43. public function searchWithStatus($stauts) {
  44. return $this->query->where('status', $stauts);
  45. }
  46. public function searchWithUniacid($uniacid) {
  47. return $this->query->where('uniacid', $uniacid);
  48. }
  49. public function searchWithMultiid($multiid) {
  50. return $this->query->where('multiid', $multiid);
  51. }
  52. }