You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.4 KiB
68 lines
1.4 KiB
<?php
|
|
|
|
namespace We7\Table\Account;
|
|
|
|
class Wechats extends \We7Table {
|
|
protected $tableName = 'account_wechats';
|
|
protected $primaryKey = 'acid';
|
|
protected $field = array(
|
|
'uniacid',
|
|
'token',
|
|
'encodingaeskey',
|
|
'auth_refresh_token',
|
|
'level',
|
|
'name',
|
|
'account',
|
|
'original',
|
|
'signature',
|
|
'country',
|
|
'province',
|
|
'city',
|
|
'username',
|
|
'password',
|
|
'lastupdate',
|
|
'key',
|
|
'secret',
|
|
'styleid',
|
|
'subscribeurl',
|
|
'createtime',
|
|
);
|
|
protected $default = array(
|
|
'uniacid' => '',
|
|
'token' => '',
|
|
'encodingaeskey' => '',
|
|
'auth_refresh_token' => '',
|
|
'level' => '0',
|
|
'name' => '',
|
|
'account' => '',
|
|
'original' => '',
|
|
'signature' => '',
|
|
'country' => '',
|
|
'province' => '',
|
|
'city' => '',
|
|
'username' => '',
|
|
'password' => '',
|
|
'lastupdate' => '0',
|
|
'key' => '',
|
|
'secret' => '',
|
|
'styleid' => '1',
|
|
'subscribeurl' => '',
|
|
'createtime' => '',
|
|
);
|
|
public function getAccount($uniacid) {
|
|
return $this->query->where('uniacid', $uniacid)->get();
|
|
}
|
|
public function searchWithAccount() {
|
|
return $this->query->from($this->tableName, 't')
|
|
->leftjoin('account', 'a')
|
|
->on(array('t.uniacid' => 'a.uniacid'));
|
|
}
|
|
|
|
public function searchWithsearchWithAccountAndUniAccountUsers() {
|
|
return $this->query->from($this->tableName, 't')
|
|
->leftjoin('account', 'a')
|
|
->on(array('t.uniacid' => 'a.uniacid'))
|
|
->leftjoin('uni_account_users', 'u')
|
|
->on(array('u.uniacid' => 't.uniacid'));
|
|
}
|
|
}
|