backend/data/seeds/5 - availability.js

253 lines
6.6 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: '2025-02-18T09:00:00Z',
end_time: '2025-02-18T22:00:00Z',
},
{
account_id: 2,
meeting_id: '03ac7a10-316f-46e8-bb55-8611e7e5b31c',
possible_date_id: 1,
preference: 0,
start_time: '2025-02-18T10:00:00Z',
end_time: '2025-02-18T20:00:00Z',
},
// Meeting 1 - Day 2
{
account_id: 1,
meeting_id: '03ac7a10-316f-46e8-bb55-8611e7e5b31c',
possible_date_id: 2,
preference: 0,
start_time: '2025-02-19T10:00:00Z',
end_time: '2025-02-19T14:00:00Z',
},
{
account_id: 2,
meeting_id: '03ac7a10-316f-46e8-bb55-8611e7e5b31c',
possible_date_id: 2,
preference: 0,
start_time: '2025-02-19T09:00:00Z',
end_time: '2025-02-19T13:00:00Z',
},
// Meeting 1 - Day 3
{
account_id: 1,
meeting_id: '03ac7a10-316f-46e8-bb55-8611e7e5b31c',
possible_date_id: 3,
preference: 0,
start_time: '2025-02-20T15:00:00Z',
end_time: '2025-02-20T18:00:00Z',
},
{
account_id: 2,
meeting_id: '03ac7a10-316f-46e8-bb55-8611e7e5b31c',
possible_date_id: 3,
preference: 0,
start_time: '2025-02-20T14:00:00Z',
end_time: '2025-02-20T20:00:00Z',
},
// Meeting 1 - Day 4
{
account_id: 1,
meeting_id: '03ac7a10-316f-46e8-bb55-8611e7e5b31c',
possible_date_id: 4,
preference: 0,
start_time: '2025-02-21T00:00:00Z',
end_time: '2025-02-21T22:00:00Z',
},
// Meeting 2 - Day 1
{
account_id: 1,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 5,
preference: 0,
start_time: '2025-05-18T09:00:00Z',
end_time: '2025-05-18T17:00:00Z',
},
{
account_id: 3,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 5,
preference: 0,
start_time: '2025-05-18T15:00:00Z',
end_time: '2025-05-18T22:00:00Z',
},
{
account_id: 4,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 5,
preference: 0,
start_time: '2025-05-18T06:00:00Z',
end_time: '2025-05-18T17:00:00Z',
},
{
account_id: 5,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 5,
preference: 0,
start_time: '2025-05-18T06:00:00Z',
end_time: '2025-05-18T22:00:00Z',
},
{
account_id: 5,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 5,
preference: 0,
start_time: '2025-05-18T15:00:00Z',
end_time: '2025-05-18T20:00:00Z',
},
// Meeting 2 - Day 2
{
account_id: 1,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 6,
preference: 0,
start_time: '2025-05-19T15:00:00Z',
end_time: '2025-05-19T21:00:00Z',
},
{
account_id: 3,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 6,
preference: 0,
start_time: '2025-05-19T13:00:00Z',
end_time: '2025-05-19T19:00:00Z',
},
{
account_id: 4,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 6,
preference: 0,
start_time: '2025-05-19T16:00:00Z',
end_time: '2025-05-19T22:00:00Z',
},
{
account_id: 5,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 6,
preference: 0,
start_time: '2025-05-19T10:00:00Z',
end_time: '2025-05-19T15:00:00Z',
},
// Meeting 2 - Day 3
{
account_id: 1,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 7,
preference: 0,
start_time: '2025-05-22T09:00:00Z',
end_time: '2025-05-22T13:00:00Z',
},
{
account_id: 3,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 7,
preference: 0,
start_time: '2025-05-22T15:00:00Z',
end_time: '2025-05-22T19:00:00Z',
},
{
account_id: 4,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 7,
preference: 0,
start_time: '2025-05-22T17:00:00Z',
end_time: '2025-05-22T12:00:00Z',
},
{
account_id: 5,
meeting_id: '2e8f3748-ea5a-4d20-b9a8-683ac65f5634',
possible_date_id: 7,
preference: 0,
start_time: '2025-05-22T20:00:00Z',
end_time: '2025-05-22T23:00:00Z',
},
// Meeting 3 - Day 1
{
account_id: 1,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 8,
preference: 0,
start_time: '2025-08-18T15:00:00Z',
end_time: '2025-08-18T21:00:00Z',
},
{
account_id: 5,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 8,
preference: 0,
start_time: '2025-08-18T09:00:00Z',
end_time: '2025-08-18T13:00:00Z',
},
// Meeting 3 - Day 2
{
account_id: 1,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 9,
preference: 0,
start_time: '2025-10-18T15:00:00Z',
end_time: '2025-10-18T18:00:00Z',
},
{
account_id: 4,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 9,
preference: 0,
start_time: '2025-10-18T09:00:00Z',
end_time: '2025-10-18T14:00:00Z',
},
{
account_id: 5,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 9,
preference: 0,
start_time: '2025-10-18T06:00:00Z',
end_time: '2025-10-18T10:00:00Z',
},
{
account_id: 5,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 9,
preference: 0,
start_time: '2025-10-18T14:00:00Z',
end_time: '2025-10-18T18:00:00Z',
},
// Meeting 3 - Day 3
{
account_id: 1,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 10,
preference: 0,
start_time: '2025-12-18T06:00:00Z',
end_time: '2025-12-18T15:00:00Z',
},
{
account_id: 4,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 10,
preference: 0,
start_time: '2025-12-18T10:00:00Z',
end_time: '2025-12-18T18:00:00Z',
},
{
account_id: 5,
meeting_id: 'a8344a68-7961-4bff-bb3b-b288f3abcf1c',
possible_date_id: 10,
preference: 0,
start_time: '2025-12-18T09:00:00Z',
end_time: '2025-12-18T20:00:00Z',
},
]);
});
};