Handsel.php 895 B

123456789101112131415161718192021222324252627282930313233343536373839
  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\Mc;
  7. class Handsel extends \We7Table {
  8. protected $tableName = 'mc_handsel';
  9. protected $primaryKey = 'id';
  10. protected $field = array(
  11. 'uniacid',
  12. 'touid',
  13. 'fromuid',
  14. 'module',
  15. 'sign',
  16. 'action',
  17. 'credit_value',
  18. 'createtime'
  19. );
  20. protected $default = array(
  21. 'uniacid' => '',
  22. 'touid' => '',
  23. 'fromuid' => '',
  24. 'module' => '',
  25. 'sign' => '',
  26. 'action' => '',
  27. 'credit_value' => '',
  28. 'createtime' => ''
  29. );
  30. public function getByUniacid($uniacid) {
  31. return $this->query->where('uniacid', $uniacid)->get();
  32. }
  33. public function getBySnake($fields = '*', $where = array(), $order = array('id' => 'DESC')) {
  34. return $this->query->select($fields)->where($where)->orderby($order);
  35. }
  36. }