package easydo.technology.enums;

import java.util.HashMap;
import java.util.Map;

public enum RedisKeyEnum {

    KEY_ESIGN_TOKEN_KEY("esignTokenKey", "E签宝token"),
    KEY_ESIGN_REFRESH_KEY("esignRefreshKey", "E签宝refreshToken"),
    KEY_QDMETRO_LIVE_REDIS_KEY("QdMetro_live_redis_key_", "地铁大屏"),
    KEY_EZVIZ_TOKEN_KEY("ezviz_token_key_", "萤石云token"),
    KEY_WECHAT_TOKEN_KEY("wechat_token_key_", "微信公众平台token"),
    KEY_ENERGY_WATER_METER_TOKEN("energy_water_meter_token", "能源管理(水电表)token"),
    KEY_CAR_RINSE_SIDE_IMAGE("carRinse_side_image_", "车辆冲洗侧面摄像头抓拍图片"),
    KEY_CF_GLD_MASTER_GET_TOKEN("cf_gld_master_get_token", "广联达主数据token"),
    ;

    RedisKeyEnum(String value, String comment) {
        this.value = value;
        this.comment = comment;
    }

    private static Map<String, RedisKeyEnum> typelookup = new HashMap<>();

    static {
        for (RedisKeyEnum baseEnum : RedisKeyEnum.values()) {
            typelookup.put(baseEnum.value, baseEnum);
        }
    }

    public static RedisKeyEnum forType(String type) {
        return typelookup.get(type);
    }

    private String value;
    private String comment;

    public String getValue() {
        return value;
    }

    public String getComment() {
        return comment;
    }


}
