Created
November 28, 2018 12:26
-
-
Save Eth3rnit3/566ad599f71e2a89ee7c69c0b81b2156 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
const models = require('./models'); | |
const User = models.User; | |
const Company = models.Company; | |
const WorkingDay = models.WorkingDay; | |
User.bulkCreate([ | |
{email: '[email protected]', firstName: 'John', lastName: 'DOE', companyId: 1}, | |
{email: '[email protected]', firstName: 'Logan', lastName: 'WOLVERINE', companyId: 1}, | |
{email: '[email protected]', firstName: 'John', lastName: 'CONNOR', companyId: 1} | |
]) | |
.then((newUsers) => { | |
console.log(newUsers) | |
}) | |
.catch((err) => { | |
console.log("Error while users creation : ", err) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment