-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobjects.js
More file actions
129 lines (90 loc) · 2.29 KB
/
Copy pathobjects.js
File metadata and controls
129 lines (90 loc) · 2.29 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
121
/*
* Classes for Hide-N-Seek app
* EECS 394 Team Yellow
*/
/*
* Module to store app functionality. Provides link between backend and frontend.
*/
var HideNSeek = (function(Parse) {
var app = {};
/*
* User
* - userId:
* - userName:
* - seeker: boolean, true if user is a seeker, false if user is a hider
* - gameFk: foriegn key linking user to a game, can be null if user isn't in a game
*/
app.User = Parse.Object.extend("User", {
// Instance methods
// Instance properties
initialize: function (attrs, options) {
}
}, {
// Class methods
});
/*
* Game
* - gameId: primary key
* - name: User generated name of the game, default value is "Hide-N-Seek Game"
* - startTime:
* - timeLimit:
* - maxParticipants: maximum number of users allowed to join a game, default is null
* - public: boolean, true if game is public, false (default) if not
* - radius: radius of game, if user exits radius they are out of game, default is null
* - creatorIsSeeker: boolean, true if user who created game is seeker, false otherwise
*/
app.Game = Parse.Object.extend("Game", {
// Instance methods
// Instance properties
initialize: function (attrs, options) {
}
}, {
// Class methods
});
/*
* Location
* - lat: latitude
* - long: longitude
* - userFk: foriegn key to a user
* - timeStamp:
* - gameFk: foriegn key to a game
*/
app.Location = Parse.Object.extend("Location", {
// Instance methods
// Instance properties
initialize: function (attrs, options) {
}
}, {
// Class methods
});
/*
* Tag
* - gameFk: foriegn key to a game
* - seekerFk: foriegn key to user who did the tagging
* - hiderFk: foriegn key to user who got tagged
* - timeStamp:
*/
app.Tag = Parse.Object.extend("Tag", {
// Instance methods
// Instance properties
initialize: function (attrs, options) {
}
}, {
// Class methods
});
/*
* Message
* - message: text of message post, viewable by all users of the same role (seeker/hider)
* - userFk: foriegn key to user who posted message
* - gameFk: foriegn key to game
*/
app.Message = Parse.Object.extend("Message", {
// Instance methods
// Instance properties
initialize: function (attrs, options) {
}
}, {
// Class methods
});
return app;
}(Parse));