//这个是应用初始化sequelize的文件
const AZL = require('../../azeroth');
const default_config = require('../default_config');
const { Sequelize } = AZL.sequelize;
class SQL {
    constructor() {
        const db_conf = default_config.mysql_config;
        this.sequelize = new Sequelize(db_conf.database, db_conf.user, db_conf.password, {
            host: db_conf.host,
            dialect: 'mysql',
            timezone: "+08:00",
        });
    }
    static get_instance() {
        if (!SQL.instance) {
            SQL.instance = new SQL();
        }
        return SQL.instance;
    }
}
module.exports = SQL.get_instance();
