package com.seeyon.apps.bip.vo;

import com.alibaba.fastjson.JSONObject;

/**
 * 功能描述:<br>
 * <pre>
 *
 * </pre>
 *
 * @Author: FanGaowei
 * @Date: 2022/12/1
 */
public class BipResponse {

    private boolean success;
    private int status;
    private String msg;
    private String data;


    public BipResponse(JSONObject object) {
        if(object.containsKey("Status")) {
            this.status = object.getInteger("Status");
        } else {
            this.status = object.getInteger("status");
        }
        this.success = (1 == status);
        if(object.containsKey("Msg")) {
            this.msg = object.getString("Msg");
        } else {
            this.msg = object.getString("msg");
        }
        this.data = object.getString("Data");
    }

    public boolean isSuccess() {
        return success;
    }

    public BipResponse setSuccess(boolean success) {
        this.success = success;
        return this;
    }

    public int getStatus() {
        return status;
    }

    public BipResponse setStatus(int status) {
        this.status = status;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public BipResponse setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public String getData() {
        return data;
    }

    public BipResponse setData(String data) {
        this.data = data;
        return this;
    }
}
