5 module.exports = function (sequelize, DataTypes) {
7 var ContactPhone = sequelize.define('ContactPhone', {
9 type: DataTypes.STRING,
13 tableName: 'contact_phones',
14 associate: function (models) {
15 ContactPhone.belongsToMany(models.Contact, {
16 through: 'contact_has_phones'
18 ContactPhone.hasMany(models.ReportCall, {
23 ContactPhone.hasMany(models.ReportCall, {
25 foreignKey: 'destination',