Mock data gen

by brian428

JavaScript

const reports = {
  projectReports: [],
  watershedReports: [],
  districtReports: []
};

// District
[ "St. Paul", "Rock Island", "Nashville" ].forEach( ( val, i ) => {
  reports.districtReports.push(
    { districtId: i.toString(), districtName: val + ' District', 
     reports: [
       { title: `${ val } District Daily Bulletin`, url: "http://www.google.com", date: new Date() },
       { title: `${ val } District Reservoir Report`, url: "http://www.google.com", date: new Date() },
     ] }
  )
} );

// Project
[ "River Project", "Dam Project", "Lake Project" ].forEach( ( val, i ) => {
  reports.projectReports.push(
    { title: `${ val }`, url: "http://www.google.com", date: new Date() },
  )
} );

// Watershed
[ "Mississippi River", "Colorado River", "Cape Fear River" ].forEach( ( val, i ) => {
  reports.watershedReports.push(
    { title: `${ val } Watershed Report`, url: "http://www.google.com", date: new Date() },
  )
} );

console.log( JSON.stringify( reports ) )


const corpReports = {
  reports: [
  	{ title: `CERL Report 1`, url: "http://www.google.com", date: new Date() },
    { title: `CERL Report 2`, url: "http://www.google.com", date: new Date() },
    { title: `CERL Report 3`, url: "http://www.google.com", date: new Date() },
  ],
  locationReports: [
  	{ title: `CERL Location Report 1`, url: "http://www.google.com", date: new Date() },
    { title: `CERL Location Report 2`, url: "http://www.google.com", date: new Date() },
    { title: `CERL Location Report 3`, url: "http://www.google.com", date: new Date() },
  ],
  specialReports: [
  	{ title: `CERL Special Report 1`, url: "http://www.google.com", date: new Date() },
    { title: `CERL Special Report 2`, url: "http://www.google.com", date: new Date() },
    { title: `CERL Special Report 3`, url: "http://www.google.com", date: new Date() },
  ]
};

console.log( JSON.stringify( corpReports ) )