UNPKG

@apantle/awsome-factory-associator

Version:

Provides a syntax to define factories with any kind of association.

22 lines (19 loc) 329 B
/** * Store.js * * @description ::Represents a Store */ const { DataTypes } = require('sequelize'); module.exports = { attributes: { city: { type: DataTypes.STRING } }, associations: () => { Store.belongsToMany(Salesman, { through: 'SalesmanStore', foreignKey: 'store_id' }); } };