Keyword.php 785 B

12345678910111213141516171819202122232425262728293031323334353637
  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\Rule;
  7. class Keyword extends \We7Table {
  8. protected $tableName = 'rule_keyword';
  9. protected $primaryKey = 'id';
  10. protected $field = array(
  11. 'rid',
  12. 'uniacid',
  13. 'module',
  14. 'content',
  15. 'type',
  16. 'displayorder',
  17. 'status',
  18. );
  19. protected $default = array(
  20. 'rid' => '0',
  21. 'uniacid' => '0',
  22. 'module' => '',
  23. 'content' => '',
  24. 'type' => '1',
  25. 'displayorder' => '1',
  26. 'status' => '1',
  27. );
  28. public function getByUniacidAndContent($uniacid, $content, $status = 1) {
  29. return $this->where(array(
  30. 'uniacid' => $uniacid,
  31. 'content' => $content,
  32. 'status' => $status,
  33. ))->get();
  34. }
  35. }