-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobjects.js
More file actions
57 lines (41 loc) · 1.15 KB
/
Copy pathobjects.js
File metadata and controls
57 lines (41 loc) · 1.15 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
exports.newItem = function (origin, destination, sender){
return {
trip : {
trip_id : undefined,//designated by unique trip._id
added_distance : undefined,//desiganted after analysing unique trip
},
image_id : undefined,//+
sender : sender,//designated by username
origin : origin,//+newLocation
destination : destination,//+newLocation
upload_date : undefined,
desired_date : undefined,
completed : false,
}
}
exports.newTrip = function (origin, destination, cost, rate, dasher){
return {
items : [],//designated by item_id
dasher : dasher,//designated by username
origin : origin,//+newLocation
destination : destination,//+newLocation
directions : undefined,
base_distance : undefined,
cost : cost,//+
rate : rate,//+
upload_date : undefined,
desired_date : undefined,
completed : false,
}
}
exports.newUser = function (username, password){
return {
email : email,//+
password : password,//+
displayName : undefined,//+newName
facebook : undefined,
trustRating : undefined,
trips : [],//designated by unique trip._id
items : [],//designated by unique item._id
}
}