package com.zd.common.core.domain;

import java.io.Serializable;

/**
 * 极星算法平台接收返回类
 */
public class Result implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 成功
     */
    public static final int SUCCESS = 1000;

    /**
     * 失败
     */
    public static final int FAIL = 9999;

    /**
     * 错误代码(1000成功;9999失败;）
     */
    private int status_code;

    /**
     * 提示信息
     */
    private String message;


    public static  Result ok() {
        return restResult(SUCCESS, null);
    }

    private static Result restResult(int code, String msg) {
        Result apiResult = new Result();
        apiResult.setStatus_code(code);
        apiResult.setMessage(msg);
        return apiResult;
    }

    public int getStatus_code() {
        return status_code;
    }

    public void setStatus_code(int status_code) {
        this.status_code = status_code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
