Webapp.php 701 B

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