Aliapp.php 757 B

123456789101112131415161718192021222324252627282930313233
  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\Account;
  7. class Aliapp extends \We7Table {
  8. protected $tableName = 'account_aliapp';
  9. protected $primaryKey = 'acid';
  10. protected $field = array(
  11. 'uniacid',
  12. 'level',
  13. 'name',
  14. 'appid',
  15. );
  16. protected $default = array(
  17. 'uniacid' => '',
  18. 'level' => 0,
  19. 'name' => '',
  20. 'appid' => '',
  21. );
  22. public function getAccount($uniacid) {
  23. return $this->query->where('uniacid', $uniacid)->get();
  24. }
  25. public function searchWithAccount() {
  26. return $this->query->from($this->tableName, 't')
  27. ->leftjoin('account', 'a')
  28. ->on(array('t.uniacid' => 'a.uniacid'));
  29. }
  30. }