forked from PierreLeresteux/timesheet-nodejs-mongo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel.json
More file actions
120 lines (117 loc) · 3.28 KB
/
model.json
File metadata and controls
120 lines (117 loc) · 3.28 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
"collections" : {
"categories" : [{
"_id" : "CategoryId",
"name" : "Category Name",
"projects" : [{
"id" : "ProjectId",
"name" : "Project Name",
"accounting" : {
"name" : "Accounting Name"
}
}]
}],
"activities" : [{
"_id" : "ActivityId",
"user" : "user_login",
"date" : {
"year" : 2012,
"month" : 12,
"day" : 14
},
"hours" : 8,
"project" : {
"id" : "ProjectId", // The link with categories/projects
"name" : "Project Name" // Derived from project.id
},
"category" : {
"id" : "CategoryId", // Derived from project.id
"name" : "Category Name" // Derived from project.id
},
"accounting" : {
"name" : "Accounting Name" // Derived from project.id
}
}]
},
"rest_examples" : [{
"request" : {
"method" : "GET",
"url" : "/activities?year=2012&month=12&day=14&user=sjob"
},
"response" : {
"data" : [{
"id" : "3d396cd4",
"user" : "sjob",
"date" : {
"year" : 2012,
"month" : 12,
"day" : 14
},
"hours" : 4,
"project" : {
"id" : "1006a33c",
"name" : "RTT"
},
"category" : {
"id" : "05b6b92c",
"name" : "Vacation/Off"
},
"accounting" : {
"name" : "abs"
}
},{
"id" : "375ae043",
"user" : "sjob",
"date" : {
"year" : 2012,
"month" : 12,
"day" : 14
},
"hours" : 4,
"project" : {
"id" : "1006a33c",
"name" : "DataStore"
},
"category" : {
"id" : "707abfa3",
"name" : "Future Architecture"
},
"accounting" : {
"name" : "prd"
}
}]
}
},{
"request" : {
"method" : "GET",
"url" : "/categories/707abfa3"
},
"response" : {
"data" : {
"id" : "707abfa3",
"name" : "Future Architecture",
"projects" : [{
"id" : "1006a33c",
"name" : "DataStore",
"accounting" : {
"name" : "prd"
}
}]
}
}
},{
"request" : {
"method" : "GET",
"url" : "/projects/1006a33c"
},
"response" : {
"data" : {
"id" : "1006a33c",
"name" : "DataStore",
"accounting" : {
"name" : "prd"
}
}
}
}]
}