Baiduapp.php 827 B

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