-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tsp
65 lines (58 loc) · 1.14 KB
/
main.tsp
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
import "@typespec/http";
import "@typespec/rest";
import "@typespec/openapi3";
using TypeSpec.Http;
enum SubjectScheduleType {
Intensive: "intensive",
Fixed: "fixed",
Unknown: "unknown",
}
model SubjectScheduleFixed {
type: SubjectScheduleType.Fixed;
days: Array<{
date: int8;
hour: int8;
}>;
}
alias SubjectSchedule = SubjectScheduleFixed | {
type: SubjectScheduleType.Intensive | SubjectScheduleType.Unknown;
};
model SubjectCategory {
available: boolean;
year: string;
semester: string;
faculty: string;
field: string;
program: string;
category: string;
schedule: SubjectSchedule;
}
alias SubjectFlags =
| "internship"
| "igp"
| "al"
| "pbl"
| "pt"
| "univ3"
| "kyoto"
| "lottery";
model Subject {
id: uint32;
timetableId: string | null;
courseId: string | null;
credits: int8;
code: string | null;
class: string | null;
type: string;
flags: Array<SubjectFlags>;
title: string;
categories: Array<SubjectCategory>;
outline: string;
purpose: string;
requirement: string;
point: string;
textbook: string;
gradingPolicy: string;
remark: string;
researchPlan: string;
}