Kfonlline.php 400 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace app\admin\model;
  3. use think\Model;
  4. /**
  5. * 智能问答分组模型
  6. */
  7. class Kfonlline extends Model
  8. {
  9. public function getOnlineAll(){
  10. $return = [] ;
  11. $ret = $this->all();
  12. if ($ret){
  13. $return[$ret['uid']] = $ret['uid'];
  14. }
  15. return $return ;
  16. }
  17. public function user(){
  18. $this->hasOne('Users','uid','id');
  19. }
  20. }