Skip to content

Instantly share code, notes, and snippets.

@Eth3rnit3
Created November 28, 2018 16:07
Show Gist options
  • Save Eth3rnit3/9ff07d885e177c7318b827d48417f542 to your computer and use it in GitHub Desktop.
Save Eth3rnit3/9ff07d885e177c7318b827d48417f542 to your computer and use it in GitHub Desktop.
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