-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_setup.json
62 lines (53 loc) · 1.33 KB
/
model_setup.json
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
User: {
"gh_username": "chrisdickinson",
"name": "Chris",
"gravatar_id": "",
"email": ""
}
QUESTION_CHOICES = [
["strict", "Strictly Equal"],
["set", "Contained In Set"],
["float", "Float (to 6 decimal places"],
]
Question: {
"description": "Given a string as input, return the string in reverse.",
"reference": "function main(input) { return [].slice.call(input).reverse(); }",
"input": "sirhc ih",
"output": "hi chris",
"comparison_type": "strict", (Choice)
"created_by": 1, (FK)
"created_on": "1314418690.157881"
}
COMPETITION_TYPE = [
"multiplayer",
"ghost",
"timetrial"
]
Competition: {
"started_by": 1, (FK)
"created_on": "1314418690.157881",
"started_on": "1314418690.157881",
"ended_on": "1314418690.157881",
"type": "multiplayer",
"competitors": ManyToManyField(User),
"answers": ManyToManyField(Answer),
"won_by": 1 (FK)
}
Answer: {
"competitor": 1, (FK)
"question": 1, (FK)
"order": 6, (Int)
"solution": "function main(input) { return [].slice.call(input).reverse(); }",
"time_taken": 32.567433, (Float)
"ended_on": "1314418690.157881",
}
OUTCOME_CHOICES = [
["won", "Won"],
["lost", "Lost"],
["quit", "Quit"]
]
Outcome: {
"user": 1, (FK)
"status": "won", (Choice)
"ended_on": "1314418690.157881"
}