package com.galaxis.manatee.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zcj
 * @version 0.1
 * @date 2020/1/10 12:01 上午
 */
@Service
public class ChuanYunConstant {

    /**
     * 保存项目号、项目ObjectId的映射关系
     */
    public static Map<String,String> PROJECT_CODE=new HashMap<>(2048);
    /**
     * 调用地址
     */
    public static String CHUAN_YUN_INVOKE_URL;

    /**
     * 账号
     */
    public static String ENGINE_CODE;

    /**
     * 密码
     */
    public static String ENGINE_SECRET;

    @Value(value = "${chuanYun.engine.code}")
    public void setEngineCode(String engineCode) {
        ENGINE_CODE = engineCode;
    }

    @Value(value = "${chuanYun.engine.secret}")
    public void setEngineSecret(String engineSecret) {
        ENGINE_SECRET = engineSecret;
    }

    @Value(value = "${chuanYun.url.invoke}")
    public void setChuanYunInvokeUrl(String chuanYunInvokeUrl) {
        CHUAN_YUN_INVOKE_URL = chuanYunInvokeUrl;
    }
}
