package com.qqchen.deploy.backend.framework.ssh.websocket.response;

import com.qqchen.deploy.backend.framework.enums.SSHMessageType;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * SSH错误响应（Framework层）
 * 
 * 后端发送格式：
 * {
 *   "type": "error",
 *   "data": {
 *     "response": {
 *       "type": "error",
 *       "data": "Connection failed"
 *     }
 *   }
 * }
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class SSHErrorResponse extends SSHBaseResponse {
    
    public SSHErrorResponse() {
        setType(SSHMessageType.ERROR);
    }
    
    public SSHErrorResponse(String message) {
        this();
        setType(SSHMessageType.ERROR);
        setData(message);
    }
}
