attachmentgroup.table.php 629 B

12345678910111213141516171819202122232425
  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. class AttachmentgroupTable extends We7Table {
  7. protected $tableName = 'attachment_group';
  8. protected $field = array('uid', 'uniacid', 'name', 'type');
  9. public function searchWithUniacidOrUid($uniacid, $uid) {
  10. if (empty($uniacid)) {
  11. $this->query->where('uid', $uid);
  12. } else {
  13. $this->query->where('uniacid', $uniacid);
  14. }
  15. return $this;
  16. }
  17. public function deleteByUniacid($uniacid) {
  18. return $this->where('uniacid', $uniacid)->delete();
  19. }
  20. }