backend/data/seeds/5 - availability.js

286 lines
6.8 KiB
JavaScript

exports.seed = function (knex) {
// Deletes ALL existing entries
return knex('availability')
.del()
.then(function () {
// Inserts seed entries
return knex('availability').insert([
// Meeting 1 - Day 1
{
account_id: 1,
meeting_id: '03ac7a10-316f-46e8-bb55-8611e7e5b31c',
possible_date_id: 1,
preference: 0,
start_time: '09:00:00',
end_time: '22:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 2,
meeting_id: '03ac7a10-316f-46e8-bb55-8611e7e5b31c',
possible_date_id: 1,
preference: 0,
start_time: '10:00:00',
end_time: '20:00:00',
timezone: 'America/New_York',
},
// Meeting 1 - Day 2
{
account_id: 1,
meeting_id: '03ac7a10-316f-46e8-bb55-8611e7e5b31c',
possible_date_id: 2,
preference: 0,
start_time: '10:00:00',
end_time: '14:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 2,
meeting_id: '03ac7a10-316f-46e8-bb55-8611e7e5b31c',
possible_date_id: 2,
preference: 0,
start_time: '09:00:00',
end_time: '13:00:00',
timezone: 'America/New_York',
},
// Meeting 1 - Day 3
{
account_id: 1,
meeting_id: '03ac7a10-316f-46e8-bb55-8611e7e5b31c',
possible_date_id: 3,
preference: 0,
start_time: '15:00:00',
end_time: '18:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 2,
meeting_id: '03ac7a10-316f-46e8-bb55-8611e7e5b31c',
possible_date_id: 3,
preference: 0,
start_time: '14:00:00',
end_time: '20:00:00',
timezone: 'America/New_York',
},
// Meeting 1 - Day 4
{
account_id: 1,
meeting_id: '03ac7a10-316f-46e8-bb55-8611e7e5b31c',
possible_date_id: 4,
preference: 0,
start_time: '12:00:00',
end_time: '22:00:00',
timezone: 'Europe/Brussels',
},
// Meeting 2 - Day 1
{
account_id: 1,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 5,
preference: 0,
start_time: '09:00:00',
end_time: '17:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 3,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 5,
preference: 0,
start_time: '15:00:00',
end_time: '22:00:00',
timezone: 'Asia/Kolkata',
},
{
account_id: 4,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 5,
preference: 0,
start_time: '06:00:00',
end_time: '17:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 5,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 5,
preference: 0,
start_time: '06:00:00',
end_time: '10:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 5,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 5,
preference: 0,
start_time: '15:00:00',
end_time: '20:00:00',
timezone: 'Europe/Brussels',
},
// Meeting 2 - Day 2
{
account_id: 1,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 6,
preference: 0,
start_time: '15:00:00',
end_time: '21:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 3,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 6,
preference: 0,
start_time: '13:00:00',
end_time: '19:00:00',
timezone: 'Asia/Kolkata',
},
{
account_id: 4,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 6,
preference: 0,
start_time: '16:00:00',
end_time: '22:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 5,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 6,
preference: 0,
start_time: '10:00:00',
end_time: '15:00:00',
timezone: 'Europe/Brussels',
},
// Meeting 2 - Day 3
{
account_id: 1,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 7,
preference: 0,
start_time: '09:00:00',
end_time: '13:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 3,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 7,
preference: 0,
start_time: '15:00:00',
end_time: '19:00:00',
timezone: 'Asia/Kolkata',
},
{
account_id: 4,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 7,
preference: 0,
start_time: '17:00:00',
end_time: '24:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 5,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 7,
preference: 0,
start_time: '20:00:00',
end_time: '23:00:00',
timezone: 'Europe/Brussels',
},
// Meeting 3 - Day 1
{
account_id: 1,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 8,
preference: 0,
start_time: '15:00:00',
end_time: '21:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 5,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 8,
preference: 0,
start_time: '09:00:00',
end_time: '13:00:00',
timezone: 'Europe/Brussels',
},
// Meeting 3 - Day 2
{
account_id: 1,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 9,
preference: 0,
start_time: '15:00:00',
end_time: '18:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 4,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 9,
preference: 0,
start_time: '09:00:00',
end_time: '14:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 5,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 9,
preference: 0,
start_time: '6:00:00',
end_time: '10:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 5,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 9,
preference: 0,
start_time: '14:00:00',
end_time: '18:00:00',
timezone: 'Europe/Brussels',
},
// Meeting 3 - Day 3
{
account_id: 1,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 10,
preference: 0,
start_time: '06:00:00',
end_time: '15:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 4,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 10,
preference: 0,
start_time: '10:00:00',
end_time: '18:00:00',
timezone: 'Europe/Brussels',
},
{
account_id: 5,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 10,
preference: 0,
start_time: '09:00:00',
end_time: '20:00:00',
timezone: 'Europe/Brussels',
},
]);
});
};