Visit.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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\Stat;
  7. class Visit extends \We7Table {
  8. protected $tableName = 'stat_visit';
  9. protected $primaryKey = 'id';
  10. protected $field = array(
  11. 'uniacid',
  12. 'type',
  13. 'module',
  14. 'count',
  15. 'date',
  16. );
  17. protected $default = array(
  18. 'uniacid' => '',
  19. 'type' => '',
  20. 'module' => '',
  21. 'count' => '',
  22. 'date' => '',
  23. );
  24. public function searchWithUnacid($uniacid) {
  25. return $this->query->where('uniacid', $uniacid);
  26. }
  27. public function searchWithDate($date) {
  28. return $this->query->where('date', $date);
  29. }
  30. public function searchWithGreaterThenDate($date) {
  31. return $this->query->where('date >=', $date);
  32. }
  33. public function searchWithLessThenDate($date) {
  34. return $this->query->where('date <=', $date);
  35. }
  36. public function searchWithModule($module) {
  37. return $this->query->where('module', $module);
  38. }
  39. public function searchWithType($type) {
  40. return $this->query->where('type', $type);
  41. }
  42. }