package com.jkcredit.identity.model.vo;

import com.jkcredit.identity.constant.ResponseConstants;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author xusonglin
 * @version V1.0
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CommonResponseVO implements Serializable {
    private static final long serialVersionUID = 8535768355630673724L;

    private String code;

    private String result;

    private String message;

    public CommonResponseVO success(String result, String message) {
        return new CommonResponseVO(ResponseConstants.RESPONSE_CODE_SUCCESS, result, message);
    }

    public CommonResponseVO failed(String result, String message) {
        return new CommonResponseVO(ResponseConstants.RESPONSE_CODE_FAILED, result, message);
    }
}
