<?php

namespace app\api\model\chat;

use app\common\model\Users as UsersModel;
use app\common\model\chat\ChatMessage as ChatMessageModel;
use app\common\model\chat\ChatUsers as ChatUsersModel;

/**
 * @package app\online\model
 * @class ChatMessage
 * @author xzncit 2024/4/2
 */
class ChatMessage extends ChatMessageModel {

    public function service(){
        return $this->hasOne(ChatUsersModel::class,'id','service_id');
    }

    public function user() {
        return $this->hasOne(UsersModel::class,'id','user_id');
    }

}