module.exports = {
    current: {server: "192.168.1.184", port: "60666"},
    defaultLicenseKey:'civil.smartcost.com.cn|yun.smartcost.com.cn|cloud.smartcost.com.cn|qa.smartcost.com.cn|uat.smartcost.com.cn|zbqa.smartcost.com.cn|zbuat.smartcost.com.cn|jlqa.smartcost.com.cn|jluat.smartcost.com.cn|zb.smartcost.com.cn|jl.smartcost.com.cn|ym.smartcost.com.cn|qm.smartcost.com.cn|um.smartcost.com.cn,834986144349993#A0Jb6Rnch56cuEWcs86Yu46bj9Cdz36Y4JXYtNnLkV7bsNGLuNmLt36YuQ7cvNGdyFWbz9ib5lHLuNmLt36YuQ7cvNGdyFWbz9CbpZXajJiOiMXbEJCLig1jlzahlDZmpnInmb1uk/avoDrlmvJilrKqmXrunfbtmD0jnLiOiEmTDJCLiMTO9kDNzQDNxYDO9QzM8IiOiQWSiwSflNHbhZmOiI7ckJye0ICbuFkI1pjIEJCLi4TP7d4cY5WV4IkQlFVT6BHVPdjN8UUMNNUQ7lDVzNTMw3Wel94d6I7MOhFWLJXOzITcSl7cpVXZ4x6KWNHaURWWkJle54WQ5NlWr2WQFFHTaRFeG54KGJmI0IyUiwCO6IDN9ATNyAjM0IicfJye#4Xfd5nIzImNnJiOiMkIsISMx8idgMlSgQWYlJHcTJiOi8kI1tlOiQmcQJCLiYDMyMDMxAiMwEDM9EDMyIiOiQncDJCLi86Yu46bj9Cdz36Y4JXYtNnLtVHLuNmLt36YuQ7cvNGdyFWbz9Sbxxibj9SbvNmL4N7bjRnch56cu4Wes86Yu46bj9Cdz36Y4JXYtNnLspGLuNmLt36YuQ7cvNGdyFWbz9iY0xibj9SbvNmL4N7bjRnch56cuQXY5xmas86Yu46bj9Cdz36Y4JXYtNnLhFHbqxibj9SbvNmL4N7bjRnch56cuQXY5Jmes86Yu46bj9Cdz36Y4JXYtNnLhFnY0xibj9SbvNmL4N7bjRnch56cuQXY5xibj9SbvN1LMN',
    local: {server: "localhost", port: "27017"},
    qa: {
        server: "192.168.1.90",
        port: "60666",
        options:{
            user:'smartcost',
            pass:'smartcost3850888',
            auth: {
                "authdb": "admin"
            },
            connectTimeoutMS: 100000,
            useMongoClient: true
        }
    },
    qa_outer: {
        server: "smartcost.in.8866.org",
        port: "26904",
        options:{
            user:'smartcost',
            pass:'smartcost3850888',
            auth: {
                "authdb": "admin"
            },
            connectTimeoutMS: 100000,
            useMongoClient: true
        },
        importURL:"192.168.1.184:6050"
    },
    pp:{  server: "172.18.111.231",
        port: "27017",
        options:{
            user:'smartcost',
            pass:'SmartCost3850888',
            auth: {
                "authdb": "admin"
            },
            connectTimeoutMS: 50000,
            useMongoClient: true
        }},
    uat:{  server: "112.74.42.187",
    port: "27017",
    options:{
        user:'smartcost',
        pass:'SmartCost3850888',
        auth: {
            "authdb": "admin"
        },
        connectTimeoutMS: 50000,
        useMongoClient: true
    }},
    prod_s:{  server: "112.74.42.187",
        port: "28066",
        options:{
            user:'smartcost',
            pass:'SmartCost3850888',
            auth: {
                "authdb": "admin"
            },
            connectTimeoutMS: 50000,
            useMongoClient: true
        }},
    prod:{
        dbURL:"mongodb://smartcost:SmartCost3850888@dds-wz9da4d5ca0fdd341.mongodb.rds.aliyuncs.com:3717,dds-wz9da4d5ca0fdd342.mongodb.rds.aliyuncs.com:3717/scConstruct?authSource=admin;replicaSet=mgset-7518601",
        LicenseKey:"civil.smartcost.com.cn|yun.smartcost.com.cn|cloud.smartcost.com.cn|qa.smartcost.com.cn|uat.smartcost.com.cn|zbqa.smartcost.com.cn|zbuat.smartcost.com.cn|jlqa.smartcost.com.cn|jluat.smartcost.com.cn|zb.smartcost.com.cn|jl.smartcost.com.cn|ym.smartcost.com.cn|qm.smartcost.com.cn|um.smartcost.com.cn,834986144349993#A0Jb6Rnch56cuEWcs86Yu46bj9Cdz36Y4JXYtNnLkV7bsNGLuNmLt36YuQ7cvNGdyFWbz9ib5lHLuNmLt36YuQ7cvNGdyFWbz9CbpZXajJiOiMXbEJCLig1jlzahlDZmpnInmb1uk/avoDrlmvJilrKqmXrunfbtmD0jnLiOiEmTDJCLiMTO9kDNzQDNxYDO9QzM8IiOiQWSiwSflNHbhZmOiI7ckJye0ICbuFkI1pjIEJCLi4TP7d4cY5WV4IkQlFVT6BHVPdjN8UUMNNUQ7lDVzNTMw3Wel94d6I7MOhFWLJXOzITcSl7cpVXZ4x6KWNHaURWWkJle54WQ5NlWr2WQFFHTaRFeG54KGJmI0IyUiwCO6IDN9ATNyAjM0IicfJye#4Xfd5nIzImNnJiOiMkIsISMx8idgMlSgQWYlJHcTJiOi8kI1tlOiQmcQJCLiYDMyMDMxAiMwEDM9EDMyIiOiQncDJCLi86Yu46bj9Cdz36Y4JXYtNnLtVHLuNmLt36YuQ7cvNGdyFWbz9Sbxxibj9SbvNmL4N7bjRnch56cu4Wes86Yu46bj9Cdz36Y4JXYtNnLspGLuNmLt36YuQ7cvNGdyFWbz9iY0xibj9SbvNmL4N7bjRnch56cuQXY5xmas86Yu46bj9Cdz36Y4JXYtNnLhFHbqxibj9SbvNmL4N7bjRnch56cuQXY5Jmes86Yu46bj9Cdz36Y4JXYtNnLhFnY0xibj9SbvNmL4N7bjRnch56cuQXY5xibj9SbvN1LMN"
    },
    setupDb:function (env="local") {
        let me = this;
        me.current.server = me[env].server;
        me.current.port = me[env].port;
    },
    getSessionURL:function (env="local") {
        let me = this;
        if(me[env].dbURL){
            return me[env].dbURL.replace('scConstruct','usersManagesOpr');
        }
        if(me[env].options){
            return 'mongodb://'+ me[env].options.user +':'+ me[env].options.pass+'@'+ me[env].server+ ':'+ me[env].port + '/usersManagesOpr?authSource=admin';
        }else {
            return  'mongodb://' + me[env].server + ':' + me[env].port + '/usersManagesOpr';//'mongodb://' + config.current.server + ':' + config.current.port + '/usersManagesOpr'
        }
    },
    getLicenseKey:function (env = "local") {
        let me = this;
        if (me[env].LicenseKey){
            return  me[env].LicenseKey;
        }else {
            return me.defaultLicenseKey;
        }
    },
    pageSize: 20
};
