/**
 * 车场镜像模块
 * @date 2022-03
 * @author 何华东
 */

import Contants from './Contants';
import { generateMySqlKnexInstance } from './Knex';

const test_knex_config = {
    connection: {
        host: '121.36.160.42',
        port: 3306,
        user: 'nkc_test',
        password: 'nkc_test_ZahJ5een',
        database: 'park_image',
        multipleStatements: true
    }
};

const prod_knex_config = {
    connection: {
        host: '122.112.252.51',
        port: 33390,
        user: 'nostandar',
        password: 'Keytop@!#321',
        database: 'park_image_new',
        multipleStatements: true
    }
};

/**
 * 车场镜像knex配置
 */
export const knex_config = Contants.IS_PROD ? prod_knex_config : test_knex_config;

/**
 * 车场镜像knex实例
 */
export const knexInstance = generateMySqlKnexInstance(knex_config);