text: import Sequelize from 'sequelize';
  import mongoose from 'mongoose';
  
  import User from '../app/models/User';
  import Recipient from '../app/models/Recipient';
  import File from '../app/models/File';
  import Deliveryman from '../app/models/Deliveryman';
  import Delivery from '../app/models/Delivery';
  import Signature from '../app/models/Signature';
  import DeliveryProblem from '../app/models/DeliveryProblem';
  import databaseConfig from '../config/database';
  
  const models = [
    User,
    Recipient,
    File,
    Deliveryman,
    Delivery,
    Signature,
    DeliveryProblem,
  ];
  
  class Database {
    constructor() {
      this.init();
      // this.mongo();
    }
  
    init() {
      this.connection = new Sequelize(databaseConfig);
  
      models
        .map(model => model.init(this.connection))
        .map(model => model.associate && model.associate(this.connection.models));
    }
    /*
    mongo() {
      this.mongoConnection = mongoose.connect(process.env.MONGO_URL, {
        useNewUrlParser: true,
        useFindAndModify: true,
        useUnifiedTopology: true,
      });
    }
  */
  }
  
  export default new Database();
  