require('dotenv').config();

/**
 * @property {import('sequelize').Options} test The test environment configuration
 * @property {import('sequelize').Options} development The development environment configuration
 * @property {import('sequelize').Options} production The production environment configuration
 */
const config = {
  test: {
    dialect: 'mysql',
    host: process.env.DB_HOST,
    username: process.env.DB_USER,
    password: process.env.DB_PASS,
    database: process.env.DB_DATABASE,
    timezone: '+08:00',
  },
  development: {
    dialect: 'mysql',
    host: process.env.DB_HOST,
    username: process.env.DB_USER_DEV,
    password: process.env.DB_PASS_DEV,
    database: process.env.DB_DATABASE_DEV,
    timezone: '+08:00',
  },
  production: {
    dialect: 'mysql',
    host: process.env.DB_HOST,
    username: process.env.DB_USER,
    password: process.env.DB_PASS,
    database: process.env.DB_DATABASE,
    timezone: '+08:00',
  },
};

module.exports = config;
