-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdatabase.js
More file actions
50 lines (47 loc) · 1.11 KB
/
database.js
File metadata and controls
50 lines (47 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
var Mock = require('mockjs')
var Random = Mock.Random;
module.exports = function() {
var data = { users: [] }
// Create 1000 users
for (var i = 0; i < 100; i++) {
data.users.push({
id: i+1,
name: Random.name(),
actualname: Random.name(),
location: Random.city(),
organization:Random.sentence(),
email:Random.email(),
img:Random.image(),
about:Random.string(),
exp:Random.string(),
info:{
followings:Random.natural(1,100),
followers:Random.natural(1,100),
likes:Random.natural(1,100),
reports:Random.natural(1,100)
},
intro:Random.string()
})
}
return data
}
/*
{
id: number;
name: string;
actualname: string;
location: string;
organization: string;
email: string;
img: string;
about: string;
exp: string;
info: {
followings: number;
followers: number;
likes: number;
reports: number;
};
intro: string;
}
*/