Sequelize models association error in findAll() method with include: []

I'm tring to use findAll() method from Sequelize in my controller file with Include: [] but Sequelize doesn't match my foreign key association... When i try to execute the application sequelize returns me in console the error: UnhandledPromiseRejectionWarning: SequelizeEagerLoadingError: Deliverymen is not associated to Deliverymen! I tried to use the option freezeTableName, because i thinked it was the pluralization from Sequelize, but it doesn't worked. This is a piece of code of my controller file with findAll method:

const deliveries = await Deliveries.findAll({
  order: ['id'],
  attributes: [
    'id',
    'product',
    'canceled_at',
    'start_date',
    'end_date',
  ],
  limit: 20,
  offset: (page - 1) * 20,
  include: [
    {
      model: Deliverymen,
          as: 'deliveryman',
          attributes: ['name', 'email'],
          include: [{
            model: Files,
            as: 'avatar',
            attributes: ['name', 'path', 'url'],
          }],
    },
  ],
});

This is how is my model of Deliveries, where i make my associate() method:

import Sequelize, { Model } from 'sequelize';

class Deliveries extends Model {

  static init(sequelize) {
    super.init({
      product: {
        type: Sequelize.STRING,
        allowNull: false,
      },
      canceled_at: {
        type: Sequelize.DATE,
        allowNull: true,
      },
      start_date: {
        type: Sequelize.DATE,
        allowNull: true,
      },
      end_date: {
        type: Sequelize.DATE,
        allowNull: true,
      },
    },
    {
      sequelize,
    });
    return this;
  };

  // Foreign keys
  static associate(models) {
    this.belongsTo(models.Recipients, { foreignKey: 'recipient_id', as: 'recipient' });
    this.belongsTo(models.Deliverymen, { foreignKey: 'deliveryman_id', as: 'deliveryman' });
    this.belongsTo(models.Files, { foreignKey: 'signature_id', as: 'signature' });
  }

}

export default Deliveries;

i'm working with sequelize migrations, so this is how i mounted my deliveries table in PostgreSQL:

'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {

    await queryInterface.createTable('deliveries', {
      id: {
        type: Sequelize.INTEGER,
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
      },
      recipient_id: {
        type: Sequelize.INTEGER,
        references: { model: 'recipients', key: 'id' },
        onUpdate: 'CASCADE',
        onDelete: 'SET NULL',
        allowNull: false,
      },
      deliveryman_id: {
        type: Sequelize.INTEGER,
        references: { model: 'deliverymen', key: 'id' },
        onUpdate: 'CASCADE',
        onDelete: 'SET NULL',
        allowNull: true,
      },
      signature_id: {
        type: Sequelize.INTEGER,
        references: { model: 'files', key: 'id' },
        onUpdate: 'CASCADE',
        onDelete: 'SET NULL',
        allowNull: true,
      },
      product: {
        type: Sequelize.STRING,
        allowNull: false,
      },
      canceled_at: {
        type: Sequelize.DATE,
        allowNull: true,
      },
      start_date: {
        type: Sequelize.DATE,
        allowNull: true,
      },
      end_date: {
        type: Sequelize.DATE,
        allowNull: true,
      },
      created_at: {
        type: Sequelize.DATE,
        allowNull: false,
      },
      updated_at: {
        type: Sequelize.DATE,
        allowNull: false,
      },
    });
  },

  down: async (queryInterface) => {
     await queryInterface.dropTable('deliveries');
  }
};
 

Also, this is how i mount my models in index.js

import Sequelize from 'sequelize';

// Models
import Users from '../app/models/Users';
import Recipients from '../app/models/Recipients';
import Files from '../app/models/Files';
import Deliverymen from '../app/models/Deliverymen';
import Deliveries from '../app/models/Deliveries';

import databaseConfig from '../config/database';

const models = [Users, Recipients, Files, Deliverymen, Deliveries];

class Database {

  constructor() {
    this.init();
  }

  init() {
    this.connection = new Sequelize(databaseConfig);

    models
      .map(model => model.init(this.connection))
      .map(model => model.associate && model.associate(this.connection.models));
  }
}

export default new Database();

If anyone could help-me solve this issue i would be grateful, i searched for a lot of forums and sequelize documentation but nothing worked, maybe i'm missing something very stupid...

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum