package cn.estsh.i3plus.pojo.mes.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;

/**
 * @author Wynne.Lu
 * @date 2020/3/9 15:35
 * @desc
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ActorMessageModel {

    private boolean success;

    private Object dataObj;

    public boolean isSuccess() {
        return success;
    }

    public static ActorMessageModel getSuccess() {
        return new ActorMessageModel(true, null);
    }

    public static ActorMessageModel getFailure() {
        return new ActorMessageModel(false, null);
    }

    public static ActorMessageModel getSuccess(Object data) {
        return new ActorMessageModel(true, data);
    }

    public static ActorMessageModel getFailure(Object data) {
        return new ActorMessageModel(false, data);
    }


}
