package com.pj.api.open;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class ResultJson {
    /**
     * 操作状态，大于等于0 为成功
     */
    private int status;
    /**
     * 状态描述
     */
    private String message;
    /**
     * 0 不允许，1 允许
     */
    private int canpass;
    /**
     * 不允许放行的原因
     */
    private String reason;

    public static ResultJson success(){
        return new ResultJson(1,"ok",1,"");
    }
    public static ResultJson error(String reason){
        return new ResultJson(1,"ok",0,reason);
    }

}
