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

import lombok.Getter;

/**
 * 禁用1启用0, 已删除2
 */
@Getter
public enum FireCheckListStateEnum {
    ENABLE(0,"启用"),
    DISABLE(1,"禁用"),
    DELETED(2,"已删除"),
    ;
    private final Integer code;
    private final String name;

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