package com.ruoyi.yunxin.data;

import com.ruoyi.yunxin.enums.CallNoticeEnum;

public class ImMsgGen {

    /**
     * 通话通知
     * @param status
     * @param from
     * @param to
     * @param callTime
     */
    public static ImDataRes callNotice(CallNoticeEnum status, Long from, Long to, long callTime){
        ImDataRes imDataRes = new ImDataRes();
        imDataRes.setType(15);
        ImDataRes.ImData imData = new ImDataRes.ImData();
        imData.setCalltype(1);
        imData.setStatus(status.getCode()); // 通话状态，1 取消 2 拒绝 3 超时 4 已通话
        imData.setFrom_uid(from);
        imData.setTo_uid(to);
        imData.setCall_time(callTime);
        imDataRes.setData(imData);
        return imDataRes;
    }

}
