package quant.rich.emoney.pojo.dto;

import java.io.Serializable;

import org.springframework.http.HttpStatus;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@SuppressWarnings("serial")
@Data
@Accessors(chain=true)
@EqualsAndHashCode(callSuper=false)
public class EmoneyConvertResult extends R<Object> {

    private Integer protocolId;
    private String supposedClassName;
    
    public static EmoneyConvertResult error(String msg) {
        return (EmoneyConvertResult) new EmoneyConvertResult()
                .setResultCode(HttpStatus.BAD_REQUEST.value())
                .setMessage(msg)
                .setData(null);
    }
    
    public static EmoneyConvertResult ok(Serializable result) {
        return (EmoneyConvertResult) new EmoneyConvertResult()
                .setResultCode(HttpStatus.OK.value())
                .setMessage("")
                .setData(result);
    }
}
