package ink.wgink.module.instantmessage.websocket.enums;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: MessageSendStatusEnum
 * @Description: 消息发送状态
 * @Author: wanggeng
 * @Date: 2021/1/14 12:59 下午
 * @Version: 1.0
 */
public enum MessageSendStatusEnum {
    SUCCESS(200, "成功"),
    FAILED(400, "失败"),
    MESSAGE_ERROR(401, "消息错误"),
    SESSION_ERROR(402, "会话错误"),
    TYPE_ERROR(403, "类型编码错误"),
    BODY_ERROR(404, "消息体错误"),
    FROM_ERROR(405, "来源错误"),
    TO_ERROR(406, "接收人错误"),
    RECEIVE_ERROR(407, "接收错误"),
    MESSAGE_ENCODE_ERROR(408, "消息加密错误"),
    MESSAGE_DECODE_ERROR(409, "消息解密错误"),

    USER_OFFLINE(410, "用户离线"),
    TEXT_MESSAGE_USER_OFFLINE(411, "文本消息用户离线"),
    RTC_MESSAGE_USER_OFFLINE(412, "实时语音用户离线"),


    CUSTOM_HANDLE_ERROR(500, "自定义处理异常");

    private int value;
    private String summary;

    MessageSendStatusEnum(int value, String summary) {
        this.value = value;
        this.summary = summary;
    }

    public int getValue() {
        return value;
    }

    public String getSummary() {
        return summary == null ? "" : summary.trim();
    }
}
