package cn.iocoder.yudao.framework.common.enums;

/**
 * 通用状态枚举 0否 1是
 */
public enum GeneralStatusEnum {
    /**
     * 0否
     */
    NO(0, "否"),
    /**
     * 1是
     */
    YES(1, "是");

    private final Integer status;
    private final String statusDesc;

    GeneralStatusEnum(Integer status, String statusDesc) {
        this.status = status;
        this.statusDesc = statusDesc;
    }

    public Integer getStatus() {
        return status;
    }

    public String getName() {
        return statusDesc;
    }

    public static boolean isNo(Integer status) {
        return NO.getStatus().equals(status);
    }

    public static boolean isYes(Integer status) {
        return YES.getStatus().equals(status);
    }
}
