package com.dji.sample.component.redis;

/**
 * @author sean
 * @version 1.0
 * @date 2022/4/21
 */
public final class RedisConst {

    public static final int WAYLINE_JOB_BLOCK_TIME = 600;

    private RedisConst() {

    }

    public static final String DELIMITER = ":";

    public static final Integer DEVICE_ALIVE_SECOND = 60;

    public static final Integer WEBSOCKET_ALIVE_SECOND = 60 * 60 * 24;

    public static final String DEVICE_ONLINE_PREFIX = "online" + DELIMITER;

    public static final String WEBSOCKET_PREFIX = "webSocket" + DELIMITER;

    public static final String WEBSOCKET_ALL = WEBSOCKET_PREFIX + "all";

    public static final String HMS_PREFIX = "hms" + DELIMITER;

    public static final String FIRMWARE_UPGRADING_PREFIX = "upgrading" + DELIMITER;

    public static final String STATE_PAYLOAD_PREFIX = "payload" + DELIMITER;

    public static final String LOGS_FILE_PREFIX = "logs_file" + DELIMITER;

    public static final String WAYLINE_JOB_TIMED_EXECUTE = "wayline_job_timed_execute";

    public static final String WAYLINE_JOB_CONDITION_PREPARE = "wayline_job_condition_prepare";

    public static final String WAYLINE_JOB_CONDITION_PREFIX = WAYLINE_JOB_CONDITION_PREPARE + DELIMITER;

    public static final String WAYLINE_JOB_BLOCK_PREFIX = "wayline_job_block" + DELIMITER;

    public static final String WAYLINE_JOB_RUNNING_PREFIX = "wayline_job_running" + DELIMITER;

    public static final String WAYLINE_JOB_PAUSED_PREFIX = "wayline_job_paused" + DELIMITER;

    public static final String WAYLINE_JOB_BREAK_POINT_PREFIX = "wayline_job_break_point" + DELIMITER;

    public static final String WAYLINE_JOB_BREAK_POINT_CREATE_PREFIX = "wayline_job_break_point_create" + DELIMITER;

    public static final Integer WAYLINE_JOB_BREAK_POINT_ALIVE_SECOND = 60 * 60 * 24;

    public static final String OSD_PREFIX = "osd" + DELIMITER;

    /** 飞行器 WPMZ（航线任务库）版本，完整 key = wpmz_version:{sn} */
    public static final String WPMZ_VERSION_PREFIX = "wpmz_version" + DELIMITER;

    /** 飞行器 mode_code_reason，完整 key = mode_code_reason:{sn} */
    public static final String MODE_CODE_REASON_PREFIX = "mode_code_reason" + DELIMITER;

    public static final String MEDIA_FILE_PREFIX = "media_file" + DELIMITER;

    public static final String MEDIA_HIGHEST_PRIORITY_PREFIX = "media_highest_priority" + DELIMITER;

    public static final String LIVE_CAPACITY = "live_capacity";

    public static final String DRC_PREFIX = "drc" + DELIMITER;

    public static final Integer DRC_MODE_ALIVE_SECOND = 3600;

    public static final String MQTT_ACL_PREFIX = "mqtt_acl" + DELIMITER;

    public static final String FILE_UPLOADING_PREFIX = "file_uploading" + DELIMITER;

    public static final String DRONE_CONTROL_PREFiX = "control_source" + DELIMITER;

    /** 直播观看者会话前缀，完整 key = live_session:{videoIdStr}:{sessionId} */
    public static final String LIVE_SESSION_PREFIX = "live_session" + DELIMITER;

    /** 直播观看者心跳 TTL（秒），心跳间隔建议为 10s，TTL 设为 30s */
    public static final Integer LIVE_SESSION_TTL_SECOND = 30;

    /** 直播重启防抖前缀，完整 key = live_restart_debounce:{videoIdStr} */
    public static final String LIVE_RESTART_DEBOUNCE_PREFIX = "live_restart_debounce" + DELIMITER;

    /** 直播重启防抖窗口（秒） */
    public static final Integer LIVE_RESTART_DEBOUNCE_SECOND = 10;

    /** 直播刷新防抖前缀，完整 key = live_refresh_debounce:{videoIdStr} */
    public static final String LIVE_REFRESH_DEBOUNCE_PREFIX = "live_refresh_debounce" + DELIMITER;

    /** 直播刷新防抖窗口（秒） */
    public static final Integer LIVE_REFRESH_DEBOUNCE_SECOND = 5;

    public static final String DEVICE_DETAIL_PREFIX = "device_detail" + DELIMITER;
    /**
     *  飞行总架次 total_flight_sorties
     */
    public static final String DEVICE_TOTAL_FLIGHT_SORTIES_PREFIX = DEVICE_DETAIL_PREFIX + "total_flight_sorties" + DELIMITER;
    /**
     * 飞行总里程 total_flight_distance m
     */
    public static final String DEVICE_TOTAL_FLIGHT_DISTANCE_PREFIX = DEVICE_DETAIL_PREFIX + "total_flight_distance" + DELIMITER;
    /**
     * 飞行总航时 total_flight_time s
     */
    public static final String DEVICE_TOTAL_FLIGHT_TIME_PREFIX = DEVICE_DETAIL_PREFIX + "total_flight_time" + DELIMITER;

    /** VersityGW 临时 STS 用户：hash field=accessKey, value=expireEpochSec */
    public static final String VGW_STS_USERS = "oss" + DELIMITER + "vgw_sts_users";

}