-
Notifications
You must be signed in to change notification settings - Fork 2
/
structure.txt
47 lines (38 loc) · 1.49 KB
/
structure.txt
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
:: users - holds the users
_id
username: S,U
password: S
email: S,U
full_name: S
is_disabled:B // maybe, later
is_admin: B // maybe, later
// User.Activity --> this point to the activities collection, the Activity model
// User.findByCredentials( {username, password} ) => User/null if password matches for the user
// User.generateAuthToken() => token for this user
// User.toJSON() => json object of User, with password and _v removed
:: routes - holds the routes that a user can choose to workout on
_id
route_name: S,U
activity_type: S,('run','cycle',swim)
title: S
cover_image: S
description: S
difficulty: S,('easy','moderate','difficult')
distance: N
time: N
location: S // maybe, later
map_data: S // something that setups the map
// Route.findByRouteName( {route_name} ) => returns the route for the provided route_name
// Route.findByActivityType( {activity_type} ) => will return a list of routes that have the specified activity_type
// Route.toJSON() => json object of Route, with _v removed
:: activities - will hold the recorded activities (runs, cycling, etc)
_id
userId: _id.User
routeId: _id.Route
activity_type: S,('run','cycle','swim'),
date_activity: D
distance: N
time_taken: N
pace: N
cal_burned: N
// Activity.toJSON() => json object of Activity, with _v removed