| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\admin\model;
- use think\Model;
- /**
- * 智能问答分组模型
- */
- class Kfonline extends Model
- {
- public function getOnlineAll($status = 0)
- {
- $return = [];
- if ($status == 0) {
- $rets = $this->all();
- } else {
- $rets = $this->where(['status' => $status])->select();
- }
- if ($rets) {
- foreach ($rets as $ret) {
- $return[$ret->uid] = trim($ret->uid,'KF');
- }
- }
- return $return;
- }
- public function user()
- {
- $this->hasOne('Users', 'uid', 'id');
- }
- }
|