forked from SmartTeachCN/pycses
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcses_schema.json
More file actions
221 lines (221 loc) · 5.12 KB
/
cses_schema.json
File metadata and controls
221 lines (221 loc) · 5.12 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"definitions": {
"class": {
"title": "课程安排",
"description": "由课程名、开始时间、结束时间组成的课程安排对象。",
"type": "object",
"properties": {
"subject": {
"title": "课程名",
"type": "string",
"description": "subjects 中任一 subject 的 name 字段。",
"examples": [
"数学",
"语文"
]
},
"start_time": {
"title": "开始时间",
"description": "课程开始时间,格式为 HH:MM:SS",
"type": "string",
"pattern": "([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d)",
"examples": [
"08:00:00",
"13:30:00"
]
},
"end_time": {
"title": "结束时间",
"description": "课程结束时间,格式为 HH:MM:SS",
"type": "string",
"pattern": "([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d)",
"examples": [
"08:40:00",
"14:10:00"
]
}
},
"required": [
"subject",
"start_time",
"end_time"
]
},
"schedule": {
"title": "课程表",
"description": "CSES 日课程表",
"type": "object",
"properties": {
"name": {
"title": "名称",
"type": "string",
"description": "课程表的名称",
"examples": [
"all-mon"
]
},
"enable_day": {
"title": "启用日",
"type": "integer",
"description": "启用的日数,1-7 表示周一到周日",
"enum": [
1,
2,
3,
4,
5,
6,
7
]
},
"weeks": {
"title": "周数",
"type": "string",
"description": "周数,all 表示全周,odd 表示单周,even 表示双周",
"enum": [
"all",
"odd",
"even"
]
},
"classes": {
"title": "课程",
"type": "array",
"items": {
"$ref": "#/definitions/class"
},
"description": "课程安排数组",
"examples": [
[
{
"subject": "数学",
"start_time": "08:00:00",
"end_time": "08:40:00"
},
{
"subject": "语文",
"start_time": "13:30:00",
"end_time": "14:10:00"
}
]
]
}
},
"required": [
"name",
"enable_day",
"weeks",
"classes"
]
},
"subject": {
"title": "课程",
"description": "课程对象",
"type": "object",
"properties": {
"name": {
"title": "名称",
"type": "string",
"description": "课程名称",
"examples": [
"数学",
"语文"
]
},
"teacher": {
"title": "教师",
"type": "string",
"description": "任课教师",
"examples": [
"张三",
"李四"
]
},
"room": {
"title": "教室",
"type": "string",
"description": "上课教室",
"examples": [
"101",
"102"
]
},
"simplified_name": {
"title": "简称",
"type": "string",
"description": "课程简称",
"examples": [
"数",
"语"
]
}
},
"required": [
"name"
]
}
},
"properties": {
"version": {
"const": 1,
"type": "integer",
"title": "Version",
"description": "CSES 的版本号"
},
"subjects": {
"title": "课程列表",
"type": "array",
"items": {
"$ref": "#/definitions/subject"
},
"description": "课程列表",
"examples": [
[
{
"name": "数学",
"teacher": "张三",
"room": "101",
"simplified_name": "数"
},
{
"name": "语文",
"teacher": "李四",
"room": "102",
"simplified_name": "语"
}
]
]
},
"schedules": {
"title": "课程表列表",
"type": "array",
"items": {
"$ref": "#/definitions/schedule"
},
"description": "课程表列表",
"examples": [
[
{
"name": "all-mon",
"enable_day": 1,
"weeks": "all",
"classes": [
{
"subject": "数学",
"start_time": "08:50:00",
"end_time": "08:40:00"
},
{
"subject": "语文",
"start_time": "13:30:00",
"end_time": "14:10:00"
}
]
}
]
]
}
}
}