package com.zcloud.fire.check.domain.enums;

import lombok.Getter;

/**
 * 0启用,1禁用
 */
@Getter
public enum FireRegionStateEnum {
    ENABLE(0,"启用"),
    DISABLE(1,"禁用"),
    ;
    private final Integer code;
    private final String name;

        FireRegionStateEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }
    //判断code是否存在
    public static boolean contains(Integer code) {
        for (FireRegionStateEnum fireRegionStateEnum : FireRegionStateEnum.values()) {
            if (fireRegionStateEnum.getCode().equals(code)) {
                return true;
            }
        }
        return false;
    }
}
