package com.ho.common.tools.constant;

/**
 * @author fancl
 * @desc: RedisKey常量
 * @date 2022/8/23
 */
public interface RedisKeyConstant {
    //电站
    String STATION = "station:";
    //电站
    String DEVICE = "device:";
    //收益
    String EARNINGS = "earnings:";
    //收益备份
    String EARNINGS_BACK = "earningsBack:";
    //BMS
    String BMS = "bms:";
    //储能变流器
    String PCS = "pcs:";
    //电表
    String ELE_METER = "ele_meter:";
    //一体机柜
    String DEVICE001 = "device001:";

    //通用电表
    String COMMON_ELEMETER = "commonElemeter:";
    //气象仪
    String WEATHER_STATION = "weatherStation:";
    //每5分钟的时间间隔对象key
    String FIVE_MINUTE_INTERVAL = "minute_interval:fiveMinute";

    //每2分钟的时间间隔对象key
    String ONE_MINUTE_INTERVAL = "minute_interval:oneMinute";
    //每30分钟的时间间隔对象key
    String THIRTY_MINUTE_INTERVAL = "minute_interval:thirty";
    //每60分钟的时间间隔对象key
    String SIXTY_MINUTE_INTERVAL = "minute_interval:sixtyMinute";

    //每一天为时间间隔对象key
    String ONE_DAY_INTERVAL = "day_interval:oneDay";
    //每个月生成一个key
    String MONTH_INTERVAL = "day_interval:month";

    //工单的分布式锁
    String LOCK_KEY_WORK_ORDER = "lockKeyWorkOrder";
    //电价模板的分布式锁
    String LOCK_KEY_PRICE_TEMPLATE = "lockKeyPriceTemplate";
    //菜单的分布式锁
    String LOCK_KEY_PERMISSION = "lockKeyPermission";

    //设备分布式锁
    String LOCK_KEY_DEVICE = "lockKeyDevice";

    //告警配置 批量
    String LOCK_KEY_ALARM_CONFIG = "lockKeyAlarmConfig";

    //模型配置批量
    String LOCK_KEY_MODEL_CONFIG = "lockKeyModelConfig";

    //设备字段批量
    String LOCK_KEY_EQUIPMENT_FIELD = "lockKeyEquipmentField";

    //模型设备关联
    String LOCK_KEY_MODEL_EQUIPMENT_ASSOCIATION = "modelEquipmentAssociation";

    //运行评价的总得分前缀
    String OPERATION_EVALUATION = "totalScore:";

    //天气的缓存前缀
    String WEATHER_TEMPERATURE = "weather:";
    //根据IP缓存天气缓存
    String WEATHER_IP = "weatherIp:";

    //文件的缓存前缀
    String FILE_STATIONID_FILEPATH = "file:";

    //判断文件通道是否被占用
    String FILE_USING = "file_using";

    //文件交互状态
    String FILE_STATUS = "file_status";

    //文件下发所有状态
    String FILE_SEND_ALL = "file_send_all";

    //文件下发状态
    String FILE_SEND_STATUS = "file_send_status";

    //文件下发消息
    String FILE_SEND_MSG = "file_send_msg";

    //文件下发进度
    String FILE_PROCESS = "file_process";

    //文件下发备份进度
    String FILE_BACK_PROCESS = "file_back_process";
    //文件下发备份进度时间
    String FILE_BACK_TIME = "file_back_time";

    //文件消息
    String FILE_MSG = "file_msg";

    //文件名称
    String FILE_NAME = "file_name";
    //文件原始路径
    String FILE_SRC_PATH = "file_src_path";

    //文件下载所有状态
    String DOWNLOAD_FILE_ALL = "download_file_all";

    //云端读文件属性
    String CLOUD_READ_ATTRIBUTE = "cloud_read_attribute";

    //云端删除边端文件
    String CLOUD_DELETE_DEVICE_FILE = "cloud_delete_device_file";

    //云端修改边端文件属性
    String CLOUD_MODIFY_DEVICE_FILE = "cloud_modify_device_file";

    //云端修改边端文件属性
    String CLOUD_MODIFY_DEVICE_PERMISSION = "cloud_modify_device_permission";

    String IS_END = "is_end";

    //边端回应值
    String DEVICE_RESPONSE = "device_response";

    //命令下发通道是否被占用
    String ORDER_USING = "order_using";

    //读文件属性路径
    String FILE_PATH = "file_path";

    //读文件属性SN
    String FILE_ATTRIBUTE_SN = "file_attribute_sn";

    //读文件属性SN
    String FILE_TYPE = "file_type";

    //消息
    String MSG = "msg";

    //文件批量下发下发所有状态
    String FILE_BATCH_SEND_ALL = "file_batch_send_all";

    //云端读文件
    String CLOUD_READ = "cloud:read";
    //边端读文件
    String EDGE_READ = "edge:read";

    //云端写文件
    String CLOUD_WRITE = "cloud:write";

    //禾望逆变器
    String INVERTER = "inverter:";


    //心跳
    String HEARTBEAT = "heartbeat:";


    //收益统计
    String REVENUE_STATISTICS = "revenue_statistics:";

    /****************计划曲线相关*******************/
    interface PlanPower{
        String CURVE = "curve:";
        String DISPATCH = "dispatch:";
    }

    /****************文件属性相关*******************/
    //文件名称
    String NAME = "name";
    //所有者
    String USER = "user";
    //文件类型
    String FILETYPE = "fileType";
    //修改时间
    String TIME = "time";
    //文件大小
    String SIZE = "size";
    //权限
    String PERMISSION = "permission";
    //原始文件大小
    String ORIGINALSIZE = "originalSize";

    interface Channel{

        //API方式
        String API = "api";
    }

    //用户权限相关
    interface User {

        //用户信息键值对 1
        String TOKEN = "token:";
        //用户信息键值对 2
        String USER_NAME = "userName:";

        //大屏token
        String TOKEN_LARGE_SCREEN = "tokenLargeScreen:";
        //用户信息键值对 2
        String USER_NAME_LARGE_SCREEN = "userNameLargeScreen:";
        //通用大屏token
        String TOKEN_COMMON_LARGE_SCREEN = "tokenCommonLargeScreen:";

        //用户信息键值对 3 手机号 暂时没用到
        String PHONE = "phone:";
        // token
        String ACCESS_TOKEN = "authorization";
        // 用户权鉴缓存 key
        // String IDENTIFY_CACHE_KEY="shiro-cache:com.ho.user.CustomRealm.authorizationCache:";
        String IDENTIFY_CACHE_KEY = "shiro-cache:com.ho.user.config.shiro.CustomRealm.authorizationCache:";
        //登陆渠道 pc
        String LOGIN_CHANNEL_PC = "pc";
        //登陆渠道 app
        String LOGIN_CHANNEL_APP = "app";
        //登陆方式 account 账号
        String LOGIN_TYPE_ACCOUNT = "account";
        //登陆方式 phone 手机号
        String LOGIN_TYPE_PHONE = "phone";

    }

    //设备相关
    interface Device {

        //实时充电桩数据
        String REAL_TIME_CHARGING_PILE = "realTimeChargingPileList:";
        //实时充电枪数据
        String REAL_TIME_CHARGING_GUN = "realTimeChargingGunList:";

        //充电桩主面板数据缓存
        String PILE_MAIN_PANEL = "pileMainPanel:";

    }

    //MQTT相关
    interface MQTT {
        //登录缓存
        String LOGIN = "login:";
        //登录黑名单
        String BLACK = "black:";
    }

    //光伏电站相关
    interface PV {
        //光伏电站当日收益
        String STATION_PV_TODAY_PROFIT = "stationPvTodayProfit:";
        //累计充电量 ,对应平台模型逆变器累计充电量
        String CUMULATIVE_POWER_GENERATION = "cumulativePowerGeneration";
        //发电量和收益曲线
        String POWER_GENERATION_CURVE = "pvStation:powerGenerationCurve:";

    }

    //驾驶舱相关
    interface COCKPIT {
        //累计光伏发电量
        String PV_POWER_GENERATION = "cockpit:pvPowerGeneration:";
        //储能累计放电量
        String ENERGY_POWER_GENERATION = "cockpit:energyPowerGeneration:";
        //充电桩累计放电量
        String CHARGE_PILE_POWER_GENERATION = "cockpit:chargePilePowerGeneration:";
        //集团数据
        String GROUP_DATA = "cockpitHome:groupData:";
        //累计总和
        String CUMULATIVE = "cockpitHome:cumulative:";
        //电站地图
        String STATION_MAP = "cockpitHome:stationMap:";
        //给电站用的大屏数据
        String FOR_STATION_COCKPIT = "cockpitHome:forStationCockpit:";

    }


    interface PCS_DEVICE {

        //停机状态(shutdownStatus)
        String SHUTDOWN_STATUS = "shutdownStatus";
        //待机状态(readinessStatus)
        String READINESS_STATUS = "readinessStatus";
        //运行状态(runningStatus)
        String RUNNING_STATUS = "runningStatus";
        //总故障状态 totalFaultStatus
        String TOTAL_FAULT_STATUS = "totalFaultStatus";
        //远程就地状态 remoteLocalStatus
        String REMOTE_LOCAL_STATUS = "remoteLocalStatus";
        //电网频率 grid
        String GRID = "grid";

    }

    interface BMS_DEVICE {
        //可充电电量 rechargeCapacity
        String RECHARGE_CAPACITY = "rechargeCapacity";

        //可放电电量 dischargeCapacity
        String DISCHARGE_CAPACITY = "dischargeCapacity";

        //日充
        String DAY_CHARGE = "dailyCharge";
        //日放
        String DAY_DISCHARGE = "dailyDischarge";
        //月充
        String MONTH_CHARGE = "monthCharge";
        //月放
        String MONTH_DISCHARGE = "monthDischarge";
        //年充
        String YEAR_CHARGE = "yearCharge";
        //年放
        String YEAR_DISCHARGE = "yearDischarge";

        //总充
        String TOTAL_CHARGE = "totalCharge";
        //总放
        String TOTAL_DISCHARGE = "totalDischarge";
    }

    //移动卡流量监控
    interface MOBILE_CARD{
        //锁的名字
        String LOCK_NAME= "mobileTraffic";
        //redis中的交易序号的键值
        String TRANS_ID = "traffic:transId";
        //移动运营商
        String OPERATOR_MOBILE = "mobile";
    }

    //电站id
    String STATION_ID = "stationId";

    interface CUSTOM{
        //建科院标志
        String CUSTOM_PLAN = "customPlan";
        //soc上限
        String SOC_UPPER = "socUpper";
        //soc下限
        String SOC_LOWER = "socLower";
    }

    //告警缓存
    interface ALARM{
        //集团级告警
        String GROUP_ALARM_CONFIG = "groupAlarmConfig:";
        //电站级告警
        String COMPANY_ALARM_CONFIG = "companyAlarmConfig:";
    }
    //点表缓存key
    String DEVICE_TYPE_COL = "deviceTypeCol:";

    //五遥表缓存
    interface COL{
        //遥测缓存
        String DEVICE_YC_COL = "deviceYCCol:";
        //遥信缓存
        String DEVICE_YX_COL = "deviceYXCol:";
        //遥控缓存
        String DEVICE_YK_COL = "deviceYKCol:";
    }
    //转发数据
    String FORWARD_DATA = "forwardData:";
    //设备类型表
    String DEVICE_TYPE_CONFIG = "deviceTypeConfig:";
    //接收数据-设备
    String DEVICE_PUSH = "devicePush:";
    //天气key
    String WEATHER_PROVINCE_CITY = "weatherProvinceCity:";
    //聚合告警
    String POLYMERIZATION = "polymerization:";

    //点数据集合 pointListData
    String POINT_LIST_DATA = "pointListData:";
}
