OperateHistory.php 861 B

1234567891011121314151617181920212223242526272829303132333435
  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 OperateHistory extends \We7Table {
  8. protected $tableName = 'users_operate_history';
  9. protected $primaryKey = 'id';
  10. protected $field = array(
  11. 'createtime',
  12. 'module_name',
  13. 'type',
  14. 'uid',
  15. 'uniacid',
  16. );
  17. protected $default = array(
  18. 'createtime' => '',
  19. 'module_name' => '',
  20. 'type' => '',
  21. 'uid' => '',
  22. 'uniacid' => '',
  23. );
  24. public function getALlByUid($uid) {
  25. return $this->query->where('uid', $uid)->orderby('createtime', 'DESC')->getall();
  26. }
  27. public function deleteByUidTypeOperate($data) {
  28. return $this->query->where($data)->delete();
  29. }
  30. public function searchWithLimit($limit_num) {
  31. return $this->query->limit($limit_num);
  32. }
  33. }