Added time log data format file.

This commit is contained in:
chris.watts90@outlook.com 2017-01-29 15:35:33 +00:00
parent d11071d394
commit 4af15b4b36

View File

@ -0,0 +1,75 @@
//so the user gets this data from /timelogs?userId=x
//however, given the data below could be over many years and therefore, thousands of data points.. some consideration should be given for reduced format.
// consideration should be to have a calendarWeek argument, i.e.: /timelogs?userId=x&calendarWeek=y.
// If no calendarWeek argument is provided, then it should default to the current calendarweek.
{
availableYears: [2017],
data: [
2017: [ //year of the logs collection
1:[ //calendar week of year.
{
LogId: n,
UserId: faker.random.number(maxUserCount),
Timestamp: faker.date.past(),
Direction: directions[faker.random.number(1)]
},
{
LogId: n,
UserId: faker.random.number(maxUserCount),
Timestamp: faker.date.past(),
Direction: directions[faker.random.number(1)]
},
{
LogId: n,
UserId: faker.random.number(maxUserCount),
Timestamp: faker.date.past(),
Direction: directions[faker.random.number(1)]
},
{
LogId: n,
UserId: faker.random.number(maxUserCount),
Timestamp: faker.date.past(),
Direction: directions[faker.random.number(1)]
},
{
LogId: n,
UserId: faker.random.number(maxUserCount),
Timestamp: faker.date.past(),
Direction: directions[faker.random.number(1)]
}
],
2:[
{
LogId: n,
UserId: faker.random.number(maxUserCount),
Timestamp: faker.date.past(),
Direction: directions[faker.random.number(1)]
},
{
LogId: n,
UserId: faker.random.number(maxUserCount),
Timestamp: faker.date.past(),
Direction: directions[faker.random.number(1)]
},
{
LogId: n,
UserId: faker.random.number(maxUserCount),
Timestamp: faker.date.past(),
Direction: directions[faker.random.number(1)]
},
{
LogId: n,
UserId: faker.random.number(maxUserCount),
Timestamp: faker.date.past(),
Direction: directions[faker.random.number(1)]
},
{
LogId: n,
UserId: faker.random.number(maxUserCount),
Timestamp: faker.date.past(),
Direction: directions[faker.random.number(1)]
}
]
],
]
}