Created
November 28, 2018 10:32
-
-
Save Eth3rnit3/085bc5f5a2ae4a75b7510abff2b4f48d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = (sequelize, DataTypes) => { | |
const Company = sequelize.define('Company', { | |
name: DataTypes.STRING | |
}, {}); | |
Company.associate = function(models) { | |
Company.hasMany(models.User, {as: 'employes'}) | |
}; | |
return Company; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment