package com.taais.biz.constant;

import com.taais.common.core.config.TaaisConfig;

/**
 * @author allen
 */
public class BizConstant {
    // 视频文件存储目录
    public static final String UPLOAD_DIR = "uploads/";
    public static final String MODEL_PATH = "model";
    public static final String MODEL_SUFFIX = ".pt";
    public static final String PREDICT_PATH = "predict";
    public static final String TD_TRAIN_MODEL_SUFFIX = ".ckpt";

    public static final String UNZIP_SUFFIX = "_unzip";
    public static final String STABLE_SUFFIX = "_stable";
    public static final String TO_INFRARED_SUFFIX = "_to_infrared";
    public static final String TRACK_SEQUENCE_SUFFIX = "_track_sequence";
    public static final String TARGET_DETECTION_SUFFIX = "_target_detection";

    public static class ModelStatus {
        public static final String NOT_START = "0";
        public static final String RUNNING = "1";
        public static final String END = "2";
        public static final String FAILED = "3";
        public static final String INTERRUPTED = "4";
    }

    public static class BizType {
        public static final String VIDEO_STABLE = "video_stable";
        public static final String TO_INFRARED = "to_infrared";
        public static final String TARGET_DETECTION = "target_detection";
        public static final String TRACK_SEQUENCE = "track_sequence";
    }

    public static class SubSystem {
        public static final String  ToInfrared = "0";
        public static final String  TargetDetection = "1";
        public static final String TrackSequence = "2";
    }

    public static class AlgorithmType {
        public static final String TRAIN = "0";
        public static final String TEST = "1";
        public static final String REASONING = "2";
    }

    public class VideoStatus {
        public static final String NOT_START = "0";
        public static final String RUNNING = "1";
        public static final String END = "2";
        public static final String FAILED = "3";
        public static final String INTERRUPTED = "4";
    }

    public static final String TASK_FOLDER_PATH_HEAD = "/task/";

    public static final String TASK_FOLDER_PATH_MID_TRAIN = "/train/";
    public static final String TASK_FOLDER_PATH_MID_TEST = "/test/";

    public static final String TASK_FOLDER_PATH_MID_REASONING = "/reasoning/";

    public static final String TASK_FOLDER_PATH_TRAIL_ORIGINAL = "/original/";

    public static final String TASK_FOLDER_PATH_TRAIL_ENHANCEMENT = "/enhancement/";

    public static final String TASK_FOLDER_PATH_TRAIL_EXPANSION = "/expansion/";

    public static final String TASK_FOLDER_PATH_TRAIL_RESULT = "/result/";

    public static final String TASK_FOLDER_PATH_LOG = "log/";
    public static final String TASK_FOLDER_LOG_PATH = TASK_FOLDER_PATH_LOG + "log.log";
    public static final String IMAGE = "images/";
    public static final String LABEL = "labels/";

    public static final String STEP1_SELECT_TASK = "1";
    public static final String STEP2_TRAIN_DATA_SELECT = "2";
    public static final String STEP3_TRAIN_DATA_ENHANCEMENT = "3";
    public static final String STEP4_TRAIN_DATA_EXPANSION = "4";
    public static final String STEP5_TRAIN = "5";

    public static final String STEP6_TEST_DATA_SELECT = "6";
    public static final String STEP7_TEST_DATA_ENHANCEMENT = "7";
    public static final String STEP8_TEST_DATA_EXPANSION = "8";
    public static final String STEP9_TEST = "9";

    public static final String STEP10_REASONING_DATA_SELECT = "10";
    public static final String STEP11_REASONING_DATA_ENHANCEMENT = "11";
    public static final String STEP12_REASONING_DATA_EXPANSION = "12";
    public static final String STEP13_REASONING = "13";

    // task status 要和数据字典保持一致 biz_task_status
    public static final String TASK_STATUS_PENDING = "0";
    public static final String TASK_STATUS_PROCESSING = "1";
    public static final String TASK_STATUS_SUCCEED = "2";
    public static final String TASK_STATUS_FAILED = "3";
    // 同步数据字典配置biz_ag_type
    public static final String TASK_BIZ_AG_TYPE1_CODE = "1"; // 训练
    public static final String TASK_BIZ_AG_TYPE1_CN = "训练"; // 训练
    public static final String TASK_BIZ_AG_TYPE2_CODE = "2"; // 测试
    public static final String TASK_BIZ_AG_TYPE2_CN = "验证"; // 测试
    public static final String TASK_BIZ_AG_TYPE3_CODE = "3"; // 推理
    public static final String TASK_BIZ_AG_TYPE3_CN = "测试"; // 推理
    public static final String TASK_BIZ_AG_TYPE4_CODE = "4"; // 增广
    public static final String TASK_BIZ_AG_TYPE4_CN = "增广"; // 增广

    public static final String TYPE_DATA_PROCESS = "dataProcess";
    public static final String TYPE_DATA_BIZ_PROCESS = "dataBizProcess";
    public static final String R_CURVE = "R_curve.png";
    public static final String P_CURVE = "P_curve.png";
    public static final String F1_CURVE = "F1_curve.png";
    public static final String ORIGINAL_IMAGE= "原始图片";
    //路径需要从配置文件中取
    public static final String DOCKER_BASE_PATH= TaaisConfig.getProfile();
//    public static final String DOCKER_BASE_PATH= "D:/home/ObjectDetection_Web";
    public static final String DOCKER_PT_PATH= "weights/best.pt";

    public static final String REMARK_PREFIX = "__URL__";

    public static final String TYPE_OBJ_MATCH = "OBJ_MATCH";

    public static final String DOCKER_OBJ_MATCH_PATH = "/objectMatch";
    public static final String TYPE_OBJ_TRACE = "OBJ_TRACE";
    public static final String DOCKER_MAT_TASK = "/obj_track";
    public static final String MULTI_OBJ_TRACE_URL = "127.0.0.1:10027/objTrace";
    public static final String MULTI_OBJ_MATCH_URL = "127.0.0.1:10028/imgMatch";
}
