package net.northking.cctp.executePlan.constants;

/**
 * <p>Title: PlanConstant</p>
 * <p>Description: 计划常量</p>
 *
 * @Author chenjianfeng
 * @Version V1.0
 * @Date 2022/12/09
 * <p>Copyright (c) 京北方信息技术股份有限公司 Corporation 2022 . All rights reserved.</p>
 */

public class PlanConstant {

    public static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";

    public static final String PC = "pc";

    public static final String MOBILE = "mob";

    public static final String API = "api";

    public static final String SCRIPT_TYPE_API = "0";
    public static final String SCRIPT_TYPE_BS = "1";
    public static final String SCRIPT_TYPE_CS = "2";
    public static final String SCRIPT_TYPE_ANDROID = "3";
    public static final String SCRIPT_TYPE_IOS = "4";
    public static final String SCRIPT_TYPE_SCENE = "5";

    /**
     * 脚本测试意图id key
     */
    public static final String SCRIPT_TEST_PURPOSE_ID = "__row_id__";

    /**
     * 脚本测试意图名称key
     */
    public static final String SCRIPT_TEST_PURPOSE_NAME = "测试轮次名";

    /**
     * 设备离线key
     */
    public static final String DEVICE_OFFLINE_KEY = "allOffline";

    /**
     * 设备未离线
     */
    public static final int DEVICE_OFFLINE_NO = 0;
    /**
     * 设备部分离线
     */
    public static final int DEVICE_OFFLINE_PORTION = 1;
    /**
     * 设备全部离线
     */
    public static final int DEVICE_OFFLINE_ALL = 2;


    /**
     * 引擎类型-PC
     */
    public static final String ENGINE_TYPE_PC = "1";

    /**
     * 引擎类型-移动端
     */
    public static final String ENGINE_TYPE_MOBILE = "2";

    /**
     * 引擎类型-接口
     */
    public static final String ENGINE_TYPE_API = "3";

    /**
     * 设备类型-移动
     */
    public static final String DEVICE_TYPE_MOBILE = "1";

    /**
     * 设备类型-PC
     */
    public static final String DEVICE_TYPE_PC = "2";


    /**
     * 计划批次委托URL
     */
    public static final String PLAN_BATCH_ENTRUST_URL = "/v1/plan/entrust";

    /**
     * 计划批次取消URL
     */
    public static final String PLAN_BATCH_CANCEL_URL = "/v1/plan/remove";

    /**
     * 任务等待状态
     */
    public static final String TASK_WAIT_EXECUTE_STATUS = "0";

    /**
     * 任务开始执行状态
     */
    public static final String TASK_START_EXECUTE_STATUS = "1";

    /**
     * 任务执行成功状态
     */
    public static final String TASK_EXECUTE_SUCCESS_STATUS = "2";

    /**
     * 任务执行失败状态
     */
    public static final String TASK_EXECUTE_FAIL_STATUS = "3";

    /**
     * 任务断言失败状态
     */
    public static final String TASK_ASSERT_FAIL_STATUS = "4";

    /**
     * 任务取消状态
     */
    public static final String TASK_CANCEL_STATUS = "5";

    /**
     * 任务超时状态
     */
    public static final String TASK_TIMEOUT_STATUS = "6";

    /**
     * 任务总数key
     */
    public static final String TASK_TOTAL = "total";

    /**
     * 等待中脚本书
     */
    public static final String WAIT_TOTAL = "waitTotal";

    /**
     * 输入项数据集合
     */
    public static final String SCRIPT_INPUT_LIST = "inputDataList";

    /**
     * 脚本总数
     */
    public static final String SCRIPT_TOTAL = "scriptTotal";

    /**
     * 批次开始时间key
     */
    public static final String BATCH_START_TIME = "startTime";

    /**
     * 计划批次号key
     */
    public static final String PLAN_BATCH_NUM = "batch";

    /**
     * 计划批次ID
     */
    public static final String PLAN_BATCH_ID = "batchId";

    /**
     * 批次等待状态
     */
    public static final String BATCH_WAITING_STATUS = "0";

    /**
     * 批次执行中状态
     */
    public static final String BATCH_EXECUTING_STATUS = "1";

    /**
     * 批次已完成状态
     */
    public static final String BATCH_FINISH_STATUS = "2";

    /**
     * 批次已取消状态
     */
    public static final String BATCH_CANCEL_STATUS = "3";

    /**
     * 计划新建状态
     */
    public static final String PLAN_NEW_STATUS = "0";

    /**
     * 计划等待中状态
     */
    public static final String PLAN_WAITING_STATUS = "1";

    /**
     * 计划执行中状态
     */
    public static final String PLAN_EXECUTING_STATUS = "2";

    /**
     * 计划已完成状态
     */
    public static final String PLAN_FINISH_STATUS = "3";

    /**
     * 计划已取消状态
     */
    public static final String PLAN_CANCEL_STATUS = "4";


    /**
     * 计划步骤移动类型
     */
    public static final String MOBILE_COMPONENT_LIB = "NK.mobile";


    /**
     * 计划步骤PC类型
     */
    public static final String PC_COMPONENT_LIB = "NK.Desktop";

    /**
     * 计划步骤内部类型（分区组件，接口组件，业务组件）
     */
    public static final String INTERNAL_COMPONENT_LIB = "NK.internal";

    /**
     * 接口步骤
     */
    public static final String INTERFACE_COMPONENT_LIB = "NK.Interface";


    /**
     * 分区标识
     */
    public static final String GROUP_COMMAND = "group";

    /**
     * 接口步骤
     */
    public static final String INTERFACE_STEP_TYPE = "interface";

    /**
     * 业务组件
     */
    public static final String BUSINESS_STEP_TYPE = "business";

    /**
     * 最大步骤解析层数
     */
    public static final int MAX_STEP_ANALYSIS_NUM = 10;

    /**
     * 创建时间
     */
    public static final String CREATED_TIME = "created_time";

    /**
     * 平台类型-安卓
     */
    public static final String PLATFORM_TYPE_ANDROID = "0";

    /**
     * 平台类型-ios
     */
    public static final String PLATFORM_TYPE_IOS = "1";

    /**
     * 平台类型-Harmony
     */
    public static final String PLATFORM_TYPE_HARMONY = "2";

    /**
     * 计划触发方式  1 自动
     */
    public static final String TRIGGER_TYPE_AUTO = "1" ;
    /**
     * 计划触发方式  2 手动
     */
    public static final String TRIGGER_TYPE_MANUAL = "2" ;
    /**
     * 计划触发方式  3 devops
     */
    public static final String TRIGGER_TYPE_DEVOPS = "3" ;
    //禁用计划
    public static final Integer PLAN_UN_ENABLE = 0;
    //启用计划
    public static final Integer PLAN_ENABLE = 1;

    /**
     * 线程池最大处理数量
     */
    public static final int EXECUTOR_MAX_PROCESS_NUM = 500;

    /**
     * 输入项数据集引用类型-静态数据
     */
    public static final String INPUT_SET_QUOTE_TYPE_STATIC = "1";
    /**
     * 输入项数据集引用类型-模糊数据
     */
    public static final String INPUT_SET_QUOTE_TYPE_FUZZY = "2";

}
