package com.zd.common.core.constant;

/**
 * 硬件设备相关数据缓存前缀
 * @author liubo
 * @date 2022-06-21
 */
public enum CacheDevice {

    /**
     * 老传感器缓存前缀
     */
    SENSOR_KEY("sensor_fedc_01:", 5 * 60 * 60L),

    /**
     * 老传感器失效周期
     */
    SENSOR_LIFE("sensor_life:", 100L),

    /**
     * 继电器缓存前缀
     */
    RELAY_KEY("relay_fedc:", 300L),

    /**
     * 继电器失效周期
     */
    RELAY_LIFE("relay_life:", 10 * 60 * 60L);

    /**
     * redis 缓存
     */
    private String redisKey;

    /**
     * TimeUnit.SECONDS
     * 缓存失效时间
     */
    private Long redisTime;

    CacheDevice(java.lang.String redisKey, Long redisTime) {
        this.redisKey = redisKey;
        this.redisTime = redisTime;
    }

    public String getRedisKey() {
        return redisKey;
    }

    public void setRedisKey(String redisKey) {
        this.redisKey = redisKey;
    }

    public Long getRedisTime() {
        return redisTime;
    }

    public void setRedisTime(Long redisTime) {
        this.redisTime = redisTime;
    }
}
