Created
November 28, 2018 16:07
-
-
Save Eth3rnit3/9ff07d885e177c7318b827d48417f542 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; | |
| let currentDate = new Date(); | |
| WorkingDay.bulkCreate([ | |
| { | |
| weekDay: 'Monday', | |
| workingDate: currentDate, | |
| isWorking: true | |
| }, | |
| { | |
| weekDay: 'Tuesday', | |
| workingDate: currentDate, | |
| isWorking: true | |
| }, | |
| { | |
| weekDay: 'Wednesday', | |
| workingDate: currentDate, | |
| isWorking: false | |
| } | |
| ]) | |
| .then((workingDays) => { | |
| console.log(workingDays) | |
| }) | |
| .catch((err) => console.log("Error while WorkingDay creation : ", err)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment