Added more staff data

This commit is contained in:
Erik Tiekstra
2021-04-14 08:46:35 +02:00
parent 0b0dd8e107
commit acfe221bab
12 changed files with 196 additions and 36 deletions

View File

@@ -1,14 +1,21 @@
import fs from 'fs';
import agencies from './agencies.js';
import kommuner from './kommuner.js';
import participants from './participants.js';
import services from './services.js';
import staff from './staff.js';
const generatedStaff = staff.generate(20);
const apiData = {
participants: participants.generate(50),
services: services.generate(),
staff: staff.generate(50),
staff: generatedStaff,
kommuner: kommuner.generate(),
agencies: agencies.generate(),
participants: participants.generate(50).map(participant => ({
...participant,
staffId: generatedStaff[Math.floor(Math.random() * generatedStaff.length)].id,
})),
};
fs.writeFileSync('api.json', JSON.stringify(apiData, null, '\t'));