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

import lombok.Getter;

/**
 * 消防器材类型
 */
@Getter
public enum FireDeviceTypeEnum {
    UNDERGROUND_FIRE_HYDRANT("dxxfsst", "地下消防栓栓体"),
    FIRE_RESPIRATOR_MASK("xfhxmz", "消防呼吸面罩"),
    PORTABLE_FIRE_WATER_CANNON("yidongxiaofangshuipao", "移动消防水炮"),
    MINI_FIRE_STATION_CABINET("wxxfzgz", "微型消防站柜子"),
    IRON_BAR("tx", "铁铤"),
    FIRE_NOZZLE("xfqt001", "消防枪头"),
    ENHANCED_WATER_EXTINGUISHER("qhsmhq001", "强化水灭火器"),
    MULTI_FUNCTION_WATER_GUN("dgnsq", "多功能水枪"),
    FIRE_EXTINGUISHER_BRACKET("mhqtj001", "灭火器托架"),
    FIRE_WATER_DIVIDER("scrfsq", "消防二分水器"),
    FIRE_BUCKET("xft01", "消防桶"),
    DRY_POWDER_EXTINGUISHER("xfsb001", "干粉灭火器"),
    FIRE_SAND("xfs", "消防砂"),
    STRONG_LIGHT_LAMP("qgzmd", "强光照明灯"),
    FIRE_BOX("xfx001", "消防箱"),
    FIRE_EQUIPMENT_BOX("xfsx", "消防器材箱"),
    FIRE_SHOVEL("xgq01", "消防锹"),
    FIRE_HYDRANT_BOX("xfxxt", "消防栓箱体"),
    HEPTAFLUOROPROPANE_EXTINGUISHER("qfbwmhq", "七氟丙烷灭火器"),
    FIRE_AXE("xff01", "消防斧"),
    FIRE_HELMET("xftk", "消防头盔"),
    PORTABLE_FOAM_CANNON("yidongpaomenpao", "移动泡沫炮"),
    WATER_BASED_EXTINGUISHER("sjxmhq01", "水基型灭火器"),
    MANHOLE_COVER("jg001", "并盖"),
    FOAM_GUN("poameqiang", "泡沫枪"),
    FIRE_LIGHT_SAFETY_ROPE("xfqxaqs", "消防轻型安全绳"),
    FIRE_SAFETY_BELT("xfanyd", "消防安全腰带、消防腰带、斧套"),
    FIRE_PUMP_ADAPTER("38", "水泵接合器"),
    RED_EXTINGUISHER("b9561bbc6243bfac6ebe0397a62f55", "红色灭火器"),
    FIRE_HOOK("xfg01", "消防钩"),
    FIRE_FIGHTING_PROTECTIVE_SUIT("xfymhf", "消防员灭火防护服"),
    FIRE_HOSE_EN("xfsd01", "消防水带"),
    FIRE_FIGHTING_PROTECTIVE_BOOTS("xfymhhx", "消防员灭火防护靴"),
    FIRE_GLOVES("xfst", "消防手套"),
    FIRE_FILTER_GAS_MASK("xfglszhfdmj", "消防过滤式综合防毒面具"),
    WATER_GUN("shuiq", "水枪"),
    CARBON_DIOXIDE_EXTINGUISHER("ryhrmhq01", "二氧化碳灭火器"),
    WATER_GUN_HOSE_CONNECTOR("sdsddj", "水枪、水带接口"),
    FIRE_EXTINGUISHER_BOX("mhqx01", "灭火器箱"),
    FIRE_HYDRANT("243bfac6ebe0397a62f55", "消防栓"),
    FIRE_BLANKET("mgt", "灭火毯"),
    FIRE_HYDRANT_WRENCH("xfsbs", "消防栓扳手");

    private final String code;
    private final String description;

    FireDeviceTypeEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }
    /**
     * 根据编码获取枚举
     */
    public static FireDeviceTypeEnum getByCode(String code) {
        for (FireDeviceTypeEnum type : values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }
    public static FireDeviceTypeEnum getByDescription(String description) {
        for (FireDeviceTypeEnum type : values()) {
            if (type.getDescription().equals(description)) {
                return type;
            }
        }
        return null;
    }

}
