From 4cf94d1b0990057f5da8fb3a642eca83370c9bdc Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Sat, 26 Sep 2026 14:32:28 +0800 Subject: [PATCH 1/3] fix(workspace): list every subscribed exam by default --- internal/auth/auth.go | 1 + internal/auth/auth_test.go | 2 +- internal/cmd/workspace/exam.go | 94 +++++++++++++ internal/cmd/workspace/exam_test.go | 205 ++++++++++++++++++++++++++++ internal/cmd/workspace/workspace.go | 23 ---- 5 files changed, 301 insertions(+), 24 deletions(-) create mode 100644 internal/cmd/workspace/exam.go create mode 100644 internal/cmd/workspace/exam_test.go diff --git a/internal/auth/auth.go b/internal/auth/auth.go index 9e7398f..89d61a0 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -105,6 +105,7 @@ var cliOAuthScopes = []string{ "workspace.bus-preferences:write", "workspace.calendar:read", "workspace.calendar-feed:read", + "workspace.exam:read", "workspace.homework:write", "workspace.link-pin:write", "workspace.overview:read", diff --git a/internal/auth/auth_test.go b/internal/auth/auth_test.go index 5fe8e2e..3ace6e2 100644 --- a/internal/auth/auth_test.go +++ b/internal/auth/auth_test.go @@ -137,7 +137,7 @@ func TestOAuthScopesFromMetadata(t *testing.T) { } func TestOAuthScopesFromMetadataRequiresCommandScopes(t *testing.T) { - for _, missing := range []string{"email", "workspace.calendar-feed:read", "account.client-activity:read"} { + for _, missing := range []string{"email", "workspace.calendar-feed:read", "workspace.exam:read", "account.client-activity:read"} { t.Run(missing, func(t *testing.T) { advertised := make([]any, 0, len(cliOAuthScopes)-1) for _, scope := range cliOAuthScopes { diff --git a/internal/cmd/workspace/exam.go b/internal/cmd/workspace/exam.go new file mode 100644 index 0000000..835f95a --- /dev/null +++ b/internal/cmd/workspace/exam.go @@ -0,0 +1,94 @@ +package workspace + +import ( + "fmt" + "net/url" + "strconv" + "strings" + + "github.com/spf13/cobra" + + "github.com/Life-USTC/CLI/internal/api" + "github.com/Life-USTC/CLI/internal/cmd/cmdutil" + "github.com/Life-USTC/CLI/internal/cmd/youngutil" + "github.com/Life-USTC/CLI/internal/output" +) + +type examOpts struct { + dateFrom, dateTo string + semesterID, page, pageSize int + includeDateUnknown bool +} + +func newCmdExam() *cobra.Command { + opts := examOpts{includeDateUnknown: true} + cmd := &cobra.Command{ + Use: "exam", + Short: "List exams from your subscribed sections", + Long: "List all exams from your subscribed sections across semesters, including past and unknown-date exams. By default every page is fetched. Use --page or --limit to request one page.", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + if cmd.Flags().Changed("semester-id") && opts.semesterID == 0 { + return fmt.Errorf("--semester-id must be positive") + } + if cmd.Flags().Changed("page") && opts.page == 0 { + return fmt.Errorf("--page must be positive") + } + if cmd.Flags().Changed("limit") && opts.pageSize == 0 { + return fmt.Errorf("--limit must be positive") + } + params, err := buildExamParams(opts) + if err != nil { + return err + } + client, err := api.NewClient(cmdutil.ServerFromCmd(cmd), true) + if err != nil { + return err + } + data, err := youngutil.FetchAllIfUnpaged(cmd.Context(), client, "/api/workspace/exams", params, "data", 100, "id") + if err != nil { + return err + } + list := cmdutil.NewListResult(data, "data") + return output.OutputList(list.Raw, list.Rows, []output.Column{ + {Header: "Course", Key: "section.course.namePrimary"}, + {Header: "Semester", Key: "section.semester.nameCn"}, + {Header: "Date", Key: "examDate"}, + {Header: "Start", Key: "startTime"}, + {Header: "End", Key: "endTime"}, + {Header: "Mode", Key: "examMode"}, + }, list.Total, list.Page) + }, + } + cmd.Flags().StringVar(&opts.dateFrom, "date-from", "", "Inclusive Shanghai calendar-date start") + cmd.Flags().StringVar(&opts.dateTo, "date-to", "", "Inclusive Shanghai calendar-date end") + cmd.Flags().IntVar(&opts.semesterID, "semester-id", 0, "Filter by semester ID") + cmd.Flags().BoolVar(&opts.includeDateUnknown, "include-date-unknown", true, "Include exams whose dates are unknown") + cmd.Flags().IntVarP(&opts.page, "page", "p", 0, "Fetch only this page") + cmd.Flags().IntVarP(&opts.pageSize, "limit", "L", 0, "Fetch one page with this many exams (maximum 100)") + return cmd +} + +func buildExamParams(opts examOpts) (url.Values, error) { + params, err := youngutil.PageParams(opts.page, opts.pageSize) + if err != nil { + return nil, err + } + if opts.pageSize > 100 { + return nil, fmt.Errorf("--limit must not exceed 100") + } + if opts.semesterID < 0 { + return nil, fmt.Errorf("--semester-id must be positive") + } + if opts.semesterID > 0 { + params.Set("semesterId", strconv.Itoa(opts.semesterID)) + } + if value := strings.TrimSpace(opts.dateFrom); value != "" { + params.Set("dateFrom", value) + } + if value := strings.TrimSpace(opts.dateTo); value != "" { + params.Set("dateTo", value) + } + params.Set("includeDateUnknown", strconv.FormatBool(opts.includeDateUnknown)) + return params, nil +} diff --git a/internal/cmd/workspace/exam_test.go b/internal/cmd/workspace/exam_test.go new file mode 100644 index 0000000..10f4741 --- /dev/null +++ b/internal/cmd/workspace/exam_test.go @@ -0,0 +1,205 @@ +package workspace + +import ( + "encoding/json" + "fmt" + "io" + "net/http" + "net/http/httptest" + "os" + "strconv" + "strings" + "sync" + "testing" + "time" + + "github.com/Life-USTC/CLI/internal/config" + "github.com/Life-USTC/CLI/internal/output" + "github.com/spf13/cobra" +) + +func executeExam(t *testing.T, serverURL, format string, args ...string) (string, error) { + t.Helper() + t.Setenv("LIFE_USTC_CONFIG_DIR", t.TempDir()) + if err := config.SaveCredentials(serverURL, &config.Credential{ + AccessToken: "exam-token", ExpiresAt: float64(time.Now().Add(time.Hour).Unix()), + }); err != nil { + t.Fatal(err) + } + previousOutput, previousStdout := output.Current, os.Stdout + output.Current.Format = format + reader, writer, err := os.Pipe() + if err != nil { + t.Fatal(err) + } + os.Stdout = writer + done := make(chan string) + go func() { data, _ := io.ReadAll(reader); done <- string(data) }() + root := &cobra.Command{Use: "test", SilenceErrors: true, SilenceUsage: true} + root.PersistentFlags().String("server", serverURL, "") + root.AddCommand(newCmdExam()) + root.SetArgs(append([]string{"exam"}, args...)) + execErr := root.Execute() + _ = writer.Close() + os.Stdout, output.Current = previousStdout, previousOutput + result := <-done + _ = reader.Close() + return result, execErr +} + +func examPage(total, page, pageSize int) map[string]any { + rows := []map[string]any{} + for i := (page - 1) * pageSize; i < page*pageSize && i < total; i++ { + rows = append(rows, map[string]any{ + "id": i + 1, "examDate": "2026-09-15T08:00:00+08:00", + "section": map[string]any{ + "course": map[string]any{"namePrimary": fmt.Sprintf("Course %d", i+1)}, + "semester": map[string]any{"nameCn": "2026 Fall"}, + }, + }) + } + return map[string]any{"data": rows, "pagination": map[string]any{ + "page": page, "pageSize": pageSize, "total": total, "totalPages": (total + pageSize - 1) / pageSize, + }} +} + +func TestExamReadsEveryPageAndPreservesTotal(t *testing.T) { + var mu sync.Mutex + pages := []int{} + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path != "/api/workspace/exams" || r.Method != http.MethodGet { + t.Errorf("unexpected request %s %s", r.Method, r.URL.Path) + http.NotFound(w, r) + return + } + if r.Header.Get("Authorization") != "Bearer exam-token" { + t.Error("missing exam bearer") + } + if r.URL.Query().Get("pageSize") != "100" { + t.Error("unexpected page size") + } + if r.URL.Query().Get("includeDateUnknown") != "true" { + t.Error("unknown dates must be included by default") + } + page, _ := strconv.Atoi(r.URL.Query().Get("page")) + mu.Lock() + pages = append(pages, page) + mu.Unlock() + w.Header().Set("Content-Type", "application/json") + _ = json.NewEncoder(w).Encode(examPage(104, page, 100)) + })) + defer server.Close() + text, err := executeExam(t, server.URL, "json") + if err != nil { + t.Fatal(err) + } + var payload struct { + Data []map[string]any + Pagination struct { + Total int + PageSize int + } + } + if err := json.Unmarshal([]byte(text), &payload); err != nil { + t.Fatal(err) + } + if len(payload.Data) != 104 || payload.Pagination.Total != 104 || payload.Pagination.PageSize != 104 { + t.Fatalf("incomplete result: %d rows, pagination %+v", len(payload.Data), payload.Pagination) + } + if payload.Data[103]["id"] != float64(104) { + t.Fatal("last page missing") + } + mu.Lock() + defer mu.Unlock() + if fmt.Sprint(pages) != "[1 2]" { + t.Fatalf("pages = %v", pages) + } +} + +func TestExamExplicitPaginationAndFilters(t *testing.T) { + for _, tc := range []struct { + name string + args []string + page, pageSize, total int + }{ + {"page", []string{"--page", "2"}, 2, 20, 24}, + {"limit", []string{"--limit", "2"}, 1, 2, 4}, + {"both", []string{"--page", "2", "--limit", "2"}, 2, 2, 4}, + } { + t.Run(tc.name, func(t *testing.T) { + requests := 0 + var mu sync.Mutex + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + mu.Lock() + requests++ + mu.Unlock() + if r.URL.Path != "/api/workspace/exams" { + t.Error("exam list used the wrong endpoint") + } + for key, want := range map[string]string{"semesterId": "7", "dateFrom": "2026-09-01", "dateTo": "2026-09-30", "includeDateUnknown": "false"} { + if r.URL.Query().Get(key) != want { + t.Errorf("%s = %q", key, r.URL.Query().Get(key)) + } + } + page, _ := strconv.Atoi(r.URL.Query().Get("page")) + if page == 0 { + page = 1 + } + size, _ := strconv.Atoi(r.URL.Query().Get("pageSize")) + if size == 0 { + size = 20 + } + if page != tc.page || size != tc.pageSize { + t.Errorf("page/size = %d/%d", page, size) + } + w.Header().Set("Content-Type", "application/json") + _ = json.NewEncoder(w).Encode(examPage(tc.total, page, size)) + })) + defer server.Close() + args := append(tc.args, "--semester-id", "7", "--date-from", "2026-09-01", "--date-to", "2026-09-30", "--include-date-unknown=false") + text, err := executeExam(t, server.URL, "table", args...) + if err != nil { + t.Fatal(err) + } + if !strings.Contains(text, "2026 Fall") || !strings.Contains(text, fmt.Sprintf("of %d", tc.total)) { + t.Fatalf("missing semester or true total in %q", text) + } + mu.Lock() + defer mu.Unlock() + if requests != 1 { + t.Fatalf("explicit pagination made %d requests", requests) + } + }) + } +} + +func TestExamLaterPageFailureDoesNotPrintPartialSuccess(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json") + if r.URL.Query().Get("page") == "1" { + _ = json.NewEncoder(w).Encode(examPage(104, 1, 100)) + return + } + w.WriteHeader(http.StatusForbidden) + _, _ = io.WriteString(w, `{"error":"exam access revoked"}`) + })) + defer server.Close() + text, err := executeExam(t, server.URL, "json") + if err == nil { + t.Fatal("later page failure was ignored") + } + if strings.TrimSpace(text) != "" { + t.Fatalf("partial output printed: %s", text) + } +} + +func TestExamRejectsInvalidExplicitPaginationAndSemester(t *testing.T) { + for _, args := range [][]string{{"--page", "0"}, {"--limit", "0"}, {"--semester-id", "0"}, {"--page", "-1"}, {"--limit", "101"}, {"--semester-id", "-1"}} { + cmd := newCmdExam() + cmd.SilenceErrors, cmd.SilenceUsage = true, true + cmd.SetArgs(args) + if err := cmd.Execute(); err == nil { + t.Fatalf("invalid args accepted: %v", args) + } + } +} diff --git a/internal/cmd/workspace/workspace.go b/internal/cmd/workspace/workspace.go index f9c530f..98dd9e3 100644 --- a/internal/cmd/workspace/workspace.go +++ b/internal/cmd/workspace/workspace.go @@ -178,29 +178,6 @@ another inclusive range.`, return cmd } -func newCmdExam() *cobra.Command { - return &cobra.Command{ - Use: "exam", - Short: "List your upcoming exams", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - data, err := getOverview(cmd) - if err != nil { - return err - } - exams := cmdutil.AsMap(cmdutil.AsMap(data)["exams"]) - rows := cmdutil.RowsFromAny(exams["items"]) - return output.OutputList(exams, rows, []output.Column{ - {Header: "Course", Key: "section.course.namePrimary"}, - {Header: "Date", Key: "examDate"}, - {Header: "Start", Key: "startTime"}, - {Header: "End", Key: "endTime"}, - {Header: "Mode", Key: "examMode"}, - }, len(rows), 1) - }, - } -} - func getOverview(cmd *cobra.Command) (any, error) { c, err := api.NewTypedClient(cmdutil.ServerFromCmd(cmd), true) if err != nil { From 8c1677645b339d729367a6627935e11e213bd282 Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Sat, 26 Sep 2026 14:40:56 +0800 Subject: [PATCH 2/3] docs: explain complete exam listing and required authorization --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 32d4f26..78487ea 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ life-ustc catalog young-event --active true --limit 20 life-ustc catalog young-organizer list --search 学生会 life-ustc catalog young-event date week 2026-09-15 life-ustc workspace calendar events --date-from 2026-09-01 --date-to 2026-09-30 +life-ustc workspace exam --date-from 2026-09-01 --date-to 2026-09-30 life-ustc workspace young-event-subscription set --subscribed true --remind-start true life-ustc catalog weather --location-key ustc-main life-ustc catalog room map @@ -46,11 +47,14 @@ life-ustc account client activity --limit 20 life-ustc community user get ``` -当前客户端活动需要 `account.client-activity:read` 权限。旧版本登录的用户需运行 +客户端活动需要 `account.client-activity:read`,考试列表需要 `workspace.exam:read`。旧版本登录的用户需运行 `life-ustc account login` 重新授权,刷新旧 token 不会增加权限。 `workspace calendar events` 使用完整个人日历 REST 接口,默认读取当前上海日期起的 七天窗口;使用成对的 `--date-from` / `--date-to` 查询其它包含端点的日期范围。 +`workspace exam` 默认遍历所有分页,包含已订阅教学班的历史、跨学期及日期未知考试; +可用 `--semester-id`、`--date-from`、`--date-to` 筛选,或用 +`--include-date-unknown=false` 排除日期未知考试。显式传入 `--page` 或 `--limit` 只取一页。 Young 活动的 `catalog young-event date day|week|month` 会遍历该范围的所有分页。 要订阅 iCal 日历,请使用 `workspace calendar feed`,并将返回的 URL 导入日历应用。 From c3e8a4a44c46bf55f515d8f5b8b2fbcbaf1b0444 Mon Sep 17 00:00:00 2001 From: Tiankai Ma Date: Sat, 26 Sep 2026 14:50:22 +0800 Subject: [PATCH 3/3] chore(api): sync merged subscribed exam contract --- api/openapi.json | 1857 +++++++++++++++++++++++++- api/openapi.provenance.json | 4 +- internal/cmd/apicmd/api_paths_gen.go | 1 + internal/openapi/client.gen.go | 853 ++++++++++-- 4 files changed, 2590 insertions(+), 125 deletions(-) diff --git a/api/openapi.json b/api/openapi.json index d1f7686..e582b25 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -124,6 +124,10 @@ "name": "workspace.calendar", "description": "workspace.calendar operations" }, + { + "name": "workspace.exam", + "description": "workspace.exam operations" + }, { "name": "workspace.homework", "description": "workspace.homework operations" @@ -188,6 +192,7 @@ "tags": [ "workspace.bus-preferences", "workspace.calendar", + "workspace.exam", "workspace.homework", "workspace.link-pin", "workspace.overview", @@ -3424,6 +3429,136 @@ } } }, + "/api/workspace/exams": { + "get": { + "operationId": "workspace_exam_list", + "summary": "List exams across the current user's subscribed sections and semesters", + "tags": [ + "workspace.exam" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "dateFrom", + "schema": { + "type": "string", + "minLength": 1, + "description": "Inclusive Asia/Shanghai calendar date; accepts YYYY-MM-DD or ISO date/time." + } + }, + { + "in": "query", + "name": "dateTo", + "schema": { + "type": "string", + "minLength": 1, + "description": "Inclusive Asia/Shanghai calendar date; accepts YYYY-MM-DD or ISO date/time." + } + }, + { + "in": "query", + "name": "includeDateUnknown", + "schema": { + "type": "string", + "enum": [ + "true", + "false" + ] + } + }, + { + "in": "query", + "name": "semesterId", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1 + } + }, + { + "in": "query", + "name": "page", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100000 + } + }, + { + "in": "query", + "name": "pageSize", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100 + } + }, + { + "in": "query", + "name": "locale", + "schema": { + "type": "string", + "enum": [ + "en-us", + "zh-cn" + ] + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscribedExamsResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, "/api/workspace/homeworks": { "get": { "operationId": "getSubscribedHomeworks", @@ -6904,7 +7039,7 @@ }, "delete": { "operationId": "community_section_homework_delete", - "summary": "Soft delete one shared section homework", + "summary": "Soft delete a shared section homework as its unsuspended creator", "tags": [ "community.section-homework" ], @@ -14534,6 +14669,121 @@ "additionalProperties": false } }, + "teacherParticipations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "teacher": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + }, + "department": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "personId", + "code", + "nameCn", + "nameEn", + "namePrimary", + "nameSecondary", + "department" + ], + "additionalProperties": false + }, + "periods": { + "nullable": true, + "type": "number" + }, + "exerciseClass": { + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "teacher", + "periods", + "exerciseClass" + ], + "additionalProperties": false + } + }, "section": { "type": "object", "properties": { @@ -14572,6 +14822,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -14803,6 +15080,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -14908,6 +15187,7 @@ "scheduleGroupId", "room", "teachers", + "teacherParticipations", "section", "scheduleGroup" ], @@ -17457,6 +17737,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -17688,6 +17995,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -18423,6 +18732,569 @@ ], "additionalProperties": false }, + "subscribedExamsResponseSchema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examType": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "startTime": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "endTime": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examDate": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "examTakeCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examMode": { + "nullable": true, + "type": "string" + }, + "grades": { + "nullable": true, + "type": "string" + }, + "adminClassNames": { + "nullable": true, + "type": "string" + }, + "monitors": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "nullable": true, + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "jwId", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, + "examBatchId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examBatch": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "examRooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "room": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "room", + "count", + "examId" + ], + "additionalProperties": false + } + }, + "section": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "retiredAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, + "periodsPerWeek": { + "nullable": true, + "type": "number" + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "number" + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + } + }, + "required": [ + "id", + "jwId", + "retiredAt", + "code", + "bizTypeId", + "credits", + "period", + "requiredWeeks", + "catalogAdminClasses", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "examType", + "startTime", + "endTime", + "examDate", + "examTakeCount", + "examMode", + "grades", + "adminClassNames", + "monitors", + "examBatchId", + "sectionId", + "examBatch", + "examRooms", + "section" + ], + "additionalProperties": false + } + }, + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "pageSize": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "total": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalPages": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "page", + "pageSize", + "total", + "totalPages" + ], + "additionalProperties": false + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + }, "subscribedHomeworksResponseSchema": { "type": "object", "properties": { @@ -18535,6 +19407,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -18766,6 +19665,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -19625,6 +20526,121 @@ "additionalProperties": false } }, + "teacherParticipations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "teacher": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + }, + "department": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "personId", + "code", + "nameCn", + "nameEn", + "namePrimary", + "nameSecondary", + "department" + ], + "additionalProperties": false + }, + "periods": { + "nullable": true, + "type": "number" + }, + "exerciseClass": { + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "teacher", + "periods", + "exerciseClass" + ], + "additionalProperties": false + } + }, "section": { "type": "object", "properties": { @@ -19663,6 +20679,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -19894,6 +20937,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -19999,6 +21044,7 @@ "scheduleGroupId", "room", "teachers", + "teacherParticipations", "section", "scheduleGroup" ], @@ -20276,6 +21322,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -20507,6 +21580,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -20803,6 +21878,42 @@ "nullable": true, "type": "string" }, + "grades": { + "nullable": true, + "type": "string" + }, + "adminClassNames": { + "nullable": true, + "type": "string" + }, + "monitors": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "nullable": true, + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "jwId", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "examBatchId": { "nullable": true, "type": "integer", @@ -20924,6 +22035,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -21155,6 +22293,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -21198,6 +22338,9 @@ "examDate", "examTakeCount", "examMode", + "grades", + "adminClassNames", + "monitors", "examBatchId", "sectionId", "examBatch", @@ -21692,6 +22835,185 @@ "additionalProperties": false } }, + "teacherParticipations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "teacher": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + }, + "department": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "teacherTitle": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + }, + "enabled": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "enabled", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "_count": { + "type": "object", + "properties": { + "sections": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "sections" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "personId", + "code", + "nameCn", + "nameEn", + "namePrimary", + "nameSecondary", + "department", + "teacherTitle", + "_count" + ], + "additionalProperties": false + }, + "periods": { + "nullable": true, + "type": "number" + }, + "exerciseClass": { + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "teacher", + "periods", + "exerciseClass" + ], + "additionalProperties": false + } + }, "section": { "type": "object", "properties": { @@ -21730,6 +23052,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -21961,6 +23310,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -22066,6 +23417,7 @@ "scheduleGroupId", "room", "teachers", + "teacherParticipations", "section", "scheduleGroup" ], @@ -22146,6 +23498,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -22735,6 +24114,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -22870,6 +24251,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -23459,6 +24867,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -26201,6 +27611,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -26445,6 +27882,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -26558,6 +27997,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -27696,6 +29162,42 @@ "nullable": true, "type": "string" }, + "grades": { + "nullable": true, + "type": "string" + }, + "adminClassNames": { + "nullable": true, + "type": "string" + }, + "monitors": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "nullable": true, + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "jwId", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "examBatchId": { "nullable": true, "type": "integer", @@ -27789,6 +29291,9 @@ "examDate", "examTakeCount", "examMode", + "grades", + "adminClassNames", + "monitors", "examBatchId", "sectionId", "examBatch", @@ -27877,6 +29382,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -28039,6 +29546,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -28620,6 +30154,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -28868,6 +30404,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -29303,6 +30866,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -30206,6 +31771,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -30437,6 +32029,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -30932,6 +32526,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -31163,6 +32784,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -32529,6 +34152,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -33110,6 +34760,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -33221,6 +34873,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -33810,6 +35489,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -33927,6 +35608,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -34516,6 +36224,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -34672,6 +36382,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -35253,6 +36990,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -35335,6 +37074,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -35916,6 +37682,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -35998,6 +37766,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -36579,6 +38374,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -36663,6 +38460,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -37252,6 +39076,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", @@ -37456,6 +39282,33 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "requiredWeeks": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "catalogAdminClasses": { + "nullable": true, + "type": "array", + "items": { + "type": "object", + "properties": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, "periodsPerWeek": { "nullable": true, "type": "number" @@ -38037,6 +39890,8 @@ "bizTypeId", "credits", "period", + "requiredWeeks", + "catalogAdminClasses", "periodsPerWeek", "timesPerWeek", "stdCount", diff --git a/api/openapi.provenance.json b/api/openapi.provenance.json index 4c0af82..e612f9e 100644 --- a/api/openapi.provenance.json +++ b/api/openapi.provenance.json @@ -1,5 +1,5 @@ { "repository": "Life-USTC/server", - "commit": "ab9b081321c23c2538686f05c11c9a7520160396", - "sha256": "fef8a123d58ad2a1a22bf1eb13cbff9a764408e59a1c6a65495157ffd60b4701" + "commit": "81c65596e36385a13c7634bba5ac614ac8b11de5", + "sha256": "8d950ea56513f216bc7852d973af95251e2aec24e5f37048a16cabb6044d2d5b" } diff --git a/internal/cmd/apicmd/api_paths_gen.go b/internal/cmd/apicmd/api_paths_gen.go index 236b83d..8af9b68 100644 --- a/internal/cmd/apicmd/api_paths_gen.go +++ b/internal/cmd/apicmd/api_paths_gen.go @@ -82,6 +82,7 @@ var generatedAPIPaths = []string{ "/api/search", "/api/workspace/bus-preferences", "/api/workspace/calendar/events", + "/api/workspace/exams", "/api/workspace/homeworks", "/api/workspace/homeworks/completions", "/api/workspace/homeworks/{id}/completion", diff --git a/internal/openapi/client.gen.go b/internal/openapi/client.gen.go index cbb85f5..6bfc884 100644 --- a/internal/openapi/client.gen.go +++ b/internal/openapi/client.gen.go @@ -2636,6 +2636,42 @@ func (e CommunitySectionHomeworkListParamsIncludeDeleted) Valid() bool { } } +// Defines values for WorkspaceExamListParamsIncludeDateUnknown. +const ( + WorkspaceExamListParamsIncludeDateUnknownFalse WorkspaceExamListParamsIncludeDateUnknown = "false" + WorkspaceExamListParamsIncludeDateUnknownTrue WorkspaceExamListParamsIncludeDateUnknown = "true" +) + +// Valid indicates whether the value is a known member of the WorkspaceExamListParamsIncludeDateUnknown enum. +func (e WorkspaceExamListParamsIncludeDateUnknown) Valid() bool { + switch e { + case WorkspaceExamListParamsIncludeDateUnknownFalse: + return true + case WorkspaceExamListParamsIncludeDateUnknownTrue: + return true + default: + return false + } +} + +// Defines values for WorkspaceExamListParamsLocale. +const ( + WorkspaceExamListParamsLocaleEnUs WorkspaceExamListParamsLocale = "en-us" + WorkspaceExamListParamsLocaleZhCn WorkspaceExamListParamsLocale = "zh-cn" +) + +// Valid indicates whether the value is a known member of the WorkspaceExamListParamsLocale enum. +func (e WorkspaceExamListParamsLocale) Valid() bool { + switch e { + case WorkspaceExamListParamsLocaleEnUs: + return true + case WorkspaceExamListParamsLocaleZhCn: + return true + default: + return false + } +} + // Defines values for WorkspaceOverviewGetParamsLocale. const ( WorkspaceOverviewGetParamsLocaleEnUs WorkspaceOverviewGetParamsLocale = "en-us" @@ -2656,16 +2692,16 @@ func (e WorkspaceOverviewGetParamsLocale) Valid() bool { // Defines values for WorkspaceScheduleListParamsLocale. const ( - WorkspaceScheduleListParamsLocaleEnUs WorkspaceScheduleListParamsLocale = "en-us" - WorkspaceScheduleListParamsLocaleZhCn WorkspaceScheduleListParamsLocale = "zh-cn" + EnUs WorkspaceScheduleListParamsLocale = "en-us" + ZhCn WorkspaceScheduleListParamsLocale = "zh-cn" ) // Valid indicates whether the value is a known member of the WorkspaceScheduleListParamsLocale enum. func (e WorkspaceScheduleListParamsLocale) Valid() bool { switch e { - case WorkspaceScheduleListParamsLocaleEnUs: + case EnUs: return true - case WorkspaceScheduleListParamsLocaleZhCn: + case ZhCn: return true default: return false @@ -2749,16 +2785,16 @@ func (e GetApiWorkspaceYoungNotificationsParamsUnread) Valid() bool { // Defines values for GetApiWorkspaceYoungOrganizerSubscriptionsParamsUnread. const ( - False GetApiWorkspaceYoungOrganizerSubscriptionsParamsUnread = "false" - True GetApiWorkspaceYoungOrganizerSubscriptionsParamsUnread = "true" + GetApiWorkspaceYoungOrganizerSubscriptionsParamsUnreadFalse GetApiWorkspaceYoungOrganizerSubscriptionsParamsUnread = "false" + GetApiWorkspaceYoungOrganizerSubscriptionsParamsUnreadTrue GetApiWorkspaceYoungOrganizerSubscriptionsParamsUnread = "true" ) // Valid indicates whether the value is a known member of the GetApiWorkspaceYoungOrganizerSubscriptionsParamsUnread enum. func (e GetApiWorkspaceYoungOrganizerSubscriptionsParamsUnread) Valid() bool { switch e { - case False: + case GetApiWorkspaceYoungOrganizerSubscriptionsParamsUnreadFalse: return true - case True: + case GetApiWorkspaceYoungOrganizerSubscriptionsParamsUnreadTrue: return true default: return false @@ -3588,9 +3624,13 @@ type CalendarSubscriptionAppendResponseSchema struct { NamePrimary string `json:"namePrimary"` NameSecondary *string `json:"nameSecondary"` } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { Category *struct { Id int `json:"id"` NameCn string `json:"nameCn"` @@ -3675,6 +3715,7 @@ type CalendarSubscriptionAppendResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -3749,9 +3790,13 @@ type CalendarSubscriptionBatchResponseSchema struct { NamePrimary string `json:"namePrimary"` NameSecondary *string `json:"nameSecondary"` } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { Category *struct { Id int `json:"id"` NameCn string `json:"nameCn"` @@ -3835,6 +3880,7 @@ type CalendarSubscriptionBatchResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -3880,9 +3926,13 @@ type CalendarSubscriptionBatchResponseSchema struct { NamePrimary string `json:"namePrimary"` NameSecondary *string `json:"nameSecondary"` } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { Category *struct { Id int `json:"id"` NameCn string `json:"nameCn"` @@ -3967,6 +4017,7 @@ type CalendarSubscriptionBatchResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -4023,9 +4074,13 @@ type CalendarSubscriptionImportResponseSchema struct { NamePrimary string `json:"namePrimary"` NameSecondary *string `json:"nameSecondary"` } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { Category *struct { Id int `json:"id"` NameCn string `json:"nameCn"` @@ -4109,6 +4164,7 @@ type CalendarSubscriptionImportResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -4148,9 +4204,13 @@ type CalendarSubscriptionImportResponseSchema struct { NamePrimary string `json:"namePrimary"` NameSecondary *string `json:"nameSecondary"` } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { Category *struct { Id int `json:"id"` NameCn string `json:"nameCn"` @@ -4234,6 +4294,7 @@ type CalendarSubscriptionImportResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -4274,9 +4335,13 @@ type CalendarSubscriptionImportResponseSchema struct { NamePrimary string `json:"namePrimary"` NameSecondary *string `json:"nameSecondary"` } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { Category *struct { Id int `json:"id"` NameCn string `json:"nameCn"` @@ -4360,6 +4425,7 @@ type CalendarSubscriptionImportResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -4405,9 +4471,13 @@ type CalendarSubscriptionImportResponseSchema struct { NamePrimary string `json:"namePrimary"` NameSecondary *string `json:"nameSecondary"` } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { Category *struct { Id int `json:"id"` NameCn string `json:"nameCn"` @@ -4492,6 +4562,7 @@ type CalendarSubscriptionImportResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -4561,9 +4632,13 @@ type CalendarSubscriptionQueryResponseSchema struct { NamePrimary string `json:"namePrimary"` NameSecondary *string `json:"nameSecondary"` } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { Category *struct { Id int `json:"id"` NameCn string `json:"nameCn"` @@ -4647,6 +4722,7 @@ type CalendarSubscriptionQueryResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -4705,9 +4781,13 @@ type CalendarSubscriptionRemoveResponseSchema struct { NamePrimary string `json:"namePrimary"` NameSecondary *string `json:"nameSecondary"` } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { Category *struct { Id int `json:"id"` NameCn string `json:"nameCn"` @@ -4792,6 +4872,7 @@ type CalendarSubscriptionRemoveResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -5165,8 +5246,9 @@ type CompactOverviewResponseSchema struct { } `json:"dueTodos"` Exams struct { Items []struct { - EndTime *int `json:"endTime"` - ExamBatch *struct { + AdminClassNames *string `json:"adminClassNames"` + EndTime *int `json:"endTime"` + ExamBatch *struct { Id int `json:"id"` JwId int `json:"jwId"` NameCn string `json:"nameCn"` @@ -5183,16 +5265,26 @@ type CompactOverviewResponseSchema struct { Id int `json:"id"` Room string `json:"room"` } `json:"examRooms"` - ExamTakeCount *int `json:"examTakeCount"` - ExamType *int `json:"examType"` - Id int `json:"id"` - JwId int `json:"jwId"` - Section struct { - ActualPeriods *float32 `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + ExamTakeCount *int `json:"examTakeCount"` + ExamType *int `json:"examType"` + Grades *string `json:"grades"` + Id int `json:"id"` + JwId int `json:"jwId"` + Monitors *[]struct { + JwId int `json:"jwId"` + NameCn *string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"monitors"` + Section struct { + ActualPeriods *float32 `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { CategoryId *int `json:"categoryId"` ClassTypeId *int `json:"classTypeId"` ClassifyId *int `json:"classifyId"` @@ -5224,6 +5316,7 @@ type CompactOverviewResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -5285,11 +5378,15 @@ type CompactOverviewResponseSchema struct { PublishedAt *time.Time `json:"publishedAt"` RequiresTeam bool `json:"requiresTeam"` Section struct { - ActualPeriods *float32 `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + ActualPeriods *float32 `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { CategoryId *int `json:"categoryId"` ClassTypeId *int `json:"classTypeId"` ClassifyId *int `json:"classifyId"` @@ -5321,6 +5418,7 @@ type CompactOverviewResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -5420,11 +5518,15 @@ type CompactOverviewResponseSchema struct { } `json:"scheduleGroup"` ScheduleGroupId int `json:"scheduleGroupId"` Section struct { - ActualPeriods *float32 `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + ActualPeriods *float32 `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { CategoryId *int `json:"categoryId"` ClassTypeId *int `json:"classTypeId"` ClassifyId *int `json:"classifyId"` @@ -5456,6 +5558,7 @@ type CompactOverviewResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -5472,10 +5575,33 @@ type CompactOverviewResponseSchema struct { TheoryPeriods *float32 `json:"theoryPeriods"` TimesPerWeek *int `json:"timesPerWeek"` } `json:"section"` - SectionId int `json:"sectionId"` - StartTime string `json:"startTime"` - StartUnit int `json:"startUnit"` - Teachers []struct { + SectionId int `json:"sectionId"` + StartTime string `json:"startTime"` + StartUnit int `json:"startUnit"` + TeacherParticipations []struct { + ExerciseClass *bool `json:"exerciseClass"` + Periods *float32 `json:"periods"` + Teacher struct { + Code *string `json:"code"` + Department *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"department"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + } `json:"teacher"` + } `json:"teacherParticipations"` + Teachers []struct { Code *string `json:"code"` Department *struct { Code string `json:"code"` @@ -5594,7 +5720,11 @@ type CourseDetailSchema struct { NamePrimary string `json:"namePrimary"` NameSecondary *string `json:"nameSecondary"` } `json:"campus"` - CampusId *int `json:"campusId"` + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` Code string `json:"code"` CourseId int `json:"courseId"` Credits *float32 `json:"credits"` @@ -5613,6 +5743,7 @@ type CourseDetailSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -5670,9 +5801,13 @@ type CurrentCalendarSubscriptionResponseSchema struct { NamePrimary string `json:"namePrimary"` NameSecondary *string `json:"nameSecondary"` } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { Category *struct { Id int `json:"id"` NameCn string `json:"nameCn"` @@ -5757,6 +5892,7 @@ type CurrentCalendarSubscriptionResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -6190,11 +6326,15 @@ type HomeworkCreateResponseSchema struct { PublishedAt *time.Time `json:"publishedAt"` RequiresTeam bool `json:"requiresTeam"` Section struct { - ActualPeriods *float32 `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + ActualPeriods *float32 `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { CategoryId *int `json:"categoryId"` ClassTypeId *int `json:"classTypeId"` ClassifyId *int `json:"classifyId"` @@ -6226,6 +6366,7 @@ type HomeworkCreateResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -6314,11 +6455,15 @@ type HomeworkDetailResponseSchema struct { PublishedAt *time.Time `json:"publishedAt"` RequiresTeam bool `json:"requiresTeam"` Section struct { - ActualPeriods *float32 `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + ActualPeriods *float32 `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { CategoryId *int `json:"categoryId"` ClassTypeId *int `json:"classTypeId"` ClassifyId *int `json:"classifyId"` @@ -6350,6 +6495,7 @@ type HomeworkDetailResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -6469,11 +6615,15 @@ type HomeworkUpdateResponseSchema struct { PublishedAt *time.Time `json:"publishedAt"` RequiresTeam bool `json:"requiresTeam"` Section struct { - ActualPeriods *float32 `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + ActualPeriods *float32 `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { CategoryId *int `json:"categoryId"` ClassTypeId *int `json:"classTypeId"` ClassifyId *int `json:"classifyId"` @@ -6505,6 +6655,7 @@ type HomeworkUpdateResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -6623,9 +6774,13 @@ type MatchSectionCodesResponseSchema struct { NamePrimary string `json:"namePrimary"` NameSecondary *string `json:"nameSecondary"` } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { Category *struct { Id int `json:"id"` NameCn string `json:"nameCn"` @@ -6709,6 +6864,7 @@ type MatchSectionCodesResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -7065,11 +7221,15 @@ type PaginatedScheduleResponseSchema struct { } `json:"scheduleGroup"` ScheduleGroupId int `json:"scheduleGroupId"` Section struct { - ActualPeriods *float32 `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + ActualPeriods *float32 `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { CategoryId *int `json:"categoryId"` ClassTypeId *int `json:"classTypeId"` ClassifyId *int `json:"classifyId"` @@ -7101,6 +7261,7 @@ type PaginatedScheduleResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -7117,10 +7278,33 @@ type PaginatedScheduleResponseSchema struct { TheoryPeriods *float32 `json:"theoryPeriods"` TimesPerWeek *int `json:"timesPerWeek"` } `json:"section"` - SectionId int `json:"sectionId"` - StartTime string `json:"startTime"` - StartUnit int `json:"startUnit"` - Teachers []struct { + SectionId int `json:"sectionId"` + StartTime string `json:"startTime"` + StartUnit int `json:"startUnit"` + TeacherParticipations []struct { + ExerciseClass *bool `json:"exerciseClass"` + Periods *float32 `json:"periods"` + Teacher struct { + Code *string `json:"code"` + Department *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"department"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + } `json:"teacher"` + } `json:"teacherParticipations"` + Teachers []struct { Code *string `json:"code"` Department *struct { Code string `json:"code"` @@ -7765,9 +7949,13 @@ type SectionDetailSchema struct { NamePrimary string `json:"namePrimary"` NameSecondary *string `json:"nameSecondary"` } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { Category *struct { Id int `json:"id"` NameCn string `json:"nameCn"` @@ -7838,8 +8026,9 @@ type SectionDetailSchema struct { } `json:"examMode"` ExamModeId *int `json:"examModeId"` Exams []struct { - EndTime *int `json:"endTime"` - ExamBatch *struct { + AdminClassNames *string `json:"adminClassNames"` + EndTime *int `json:"endTime"` + ExamBatch *struct { Id int `json:"id"` JwId int `json:"jwId"` NameCn string `json:"nameCn"` @@ -7856,12 +8045,18 @@ type SectionDetailSchema struct { Id int `json:"id"` Room string `json:"room"` } `json:"examRooms"` - ExamTakeCount *int `json:"examTakeCount"` - ExamType *int `json:"examType"` - Id int `json:"id"` - JwId int `json:"jwId"` - SectionId int `json:"sectionId"` - StartTime *int `json:"startTime"` + ExamTakeCount *int `json:"examTakeCount"` + ExamType *int `json:"examType"` + Grades *string `json:"grades"` + Id int `json:"id"` + JwId int `json:"jwId"` + Monitors *[]struct { + JwId int `json:"jwId"` + NameCn *string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"monitors"` + SectionId int `json:"sectionId"` + StartTime *int `json:"startTime"` } `json:"exams"` ExperimentPeriods *float32 `json:"experimentPeriods"` GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` @@ -7884,6 +8079,7 @@ type SectionDetailSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomType *struct { Code string `json:"code"` @@ -8014,6 +8210,107 @@ type SemesterSchema struct { StartDate *time.Time `json:"startDate"` } +// SubscribedExamsResponseSchema defines model for subscribedExamsResponseSchema. +type SubscribedExamsResponseSchema struct { + Data []struct { + AdminClassNames *string `json:"adminClassNames"` + EndTime *int `json:"endTime"` + ExamBatch *struct { + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"examBatch"` + ExamBatchId *int `json:"examBatchId"` + ExamDate *time.Time `json:"examDate"` + ExamMode *string `json:"examMode"` + ExamRooms []struct { + Count int `json:"count"` + ExamId int `json:"examId"` + Id int `json:"id"` + Room string `json:"room"` + } `json:"examRooms"` + ExamTakeCount *int `json:"examTakeCount"` + ExamType *int `json:"examType"` + Grades *string `json:"grades"` + Id int `json:"id"` + JwId int `json:"jwId"` + Monitors *[]struct { + JwId int `json:"jwId"` + NameCn *string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"monitors"` + Section struct { + ActualPeriods *float32 `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { + CategoryId *int `json:"categoryId"` + ClassTypeId *int `json:"classTypeId"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevelId *int `json:"educationLevelId"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *float32 `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` + RetiredAt *time.Time `json:"retiredAt"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"section"` + SectionId int `json:"sectionId"` + StartTime *int `json:"startTime"` + } `json:"data"` + Pagination struct { + Page int `json:"page"` + PageSize int `json:"pageSize"` + Total int `json:"total"` + TotalPages int `json:"totalPages"` + } `json:"pagination"` +} + // SubscribedHomeworksResponseSchema defines model for subscribedHomeworksResponseSchema. type SubscribedHomeworksResponseSchema struct { Data []struct { @@ -8055,11 +8352,15 @@ type SubscribedHomeworksResponseSchema struct { PublishedAt *time.Time `json:"publishedAt"` RequiresTeam bool `json:"requiresTeam"` Section struct { - ActualPeriods *float32 `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + ActualPeriods *float32 `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { CategoryId *int `json:"categoryId"` ClassTypeId *int `json:"classTypeId"` ClassifyId *int `json:"classifyId"` @@ -8091,6 +8392,7 @@ type SubscribedHomeworksResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -8197,11 +8499,15 @@ type SubscribedSchedulesResponseSchema struct { } `json:"scheduleGroup"` ScheduleGroupId int `json:"scheduleGroupId"` Section struct { - ActualPeriods *float32 `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + ActualPeriods *float32 `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { CategoryId *int `json:"categoryId"` ClassTypeId *int `json:"classTypeId"` ClassifyId *int `json:"classifyId"` @@ -8233,6 +8539,7 @@ type SubscribedSchedulesResponseSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -8249,10 +8556,46 @@ type SubscribedSchedulesResponseSchema struct { TheoryPeriods *float32 `json:"theoryPeriods"` TimesPerWeek *int `json:"timesPerWeek"` } `json:"section"` - SectionId int `json:"sectionId"` - StartTime string `json:"startTime"` - StartUnit int `json:"startUnit"` - Teachers []struct { + SectionId int `json:"sectionId"` + StartTime string `json:"startTime"` + StartUnit int `json:"startUnit"` + TeacherParticipations []struct { + ExerciseClass *bool `json:"exerciseClass"` + Periods *float32 `json:"periods"` + Teacher struct { + UnderscoreCount struct { + Sections int `json:"sections"` + } `json:"_count"` + Code *string `json:"code"` + Department *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"department"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + TeacherTitle *struct { + Code string `json:"code"` + Enabled *bool `json:"enabled"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"teacherTitle"` + } `json:"teacher"` + } `json:"teacherParticipations"` + Teachers []struct { UnderscoreCount struct { Sections int `json:"sections"` } `json:"_count"` @@ -8338,11 +8681,15 @@ type TeacherDetailSchema struct { NameSecondary *string `json:"nameSecondary"` PersonId *int `json:"personId"` Sections []struct { - ActualPeriods *float32 `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { + ActualPeriods *float32 `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + CatalogAdminClasses *[]struct { + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"catalogAdminClasses"` + Code string `json:"code"` + Course struct { Category *struct { Id int `json:"id"` NameCn string `json:"nameCn"` @@ -8416,6 +8763,7 @@ type TeacherDetailSchema struct { PeriodsPerWeek *float32 `json:"periodsPerWeek"` PracticePeriods *float32 `json:"practicePeriods"` Remark *string `json:"remark"` + RequiredWeeks *int `json:"requiredWeeks"` RetiredAt *time.Time `json:"retiredAt"` RoomTypeId *int `json:"roomTypeId"` ScheduleJsonParams interface{} `json:"scheduleJsonParams"` @@ -9458,6 +9806,23 @@ type GetApiWorkspaceCalendarEventsParams struct { DateTo *string `form:"dateTo,omitempty" json:"dateTo,omitempty"` } +// WorkspaceExamListParams defines parameters for WorkspaceExamList. +type WorkspaceExamListParams struct { + DateFrom *string `form:"dateFrom,omitempty" json:"dateFrom,omitempty"` + DateTo *string `form:"dateTo,omitempty" json:"dateTo,omitempty"` + IncludeDateUnknown *WorkspaceExamListParamsIncludeDateUnknown `form:"includeDateUnknown,omitempty" json:"includeDateUnknown,omitempty"` + SemesterId *int64 `form:"semesterId,omitempty" json:"semesterId,omitempty"` + Page *int64 `form:"page,omitempty" json:"page,omitempty"` + PageSize *int64 `form:"pageSize,omitempty" json:"pageSize,omitempty"` + Locale *WorkspaceExamListParamsLocale `form:"locale,omitempty" json:"locale,omitempty"` +} + +// WorkspaceExamListParamsIncludeDateUnknown defines parameters for WorkspaceExamList. +type WorkspaceExamListParamsIncludeDateUnknown string + +// WorkspaceExamListParamsLocale defines parameters for WorkspaceExamList. +type WorkspaceExamListParamsLocale string + // GetSubscribedHomeworksParams defines parameters for GetSubscribedHomeworks. type GetSubscribedHomeworksParams struct { Page *int64 `form:"page,omitempty" json:"page,omitempty"` @@ -12767,6 +13132,9 @@ type ClientInterface interface { // GetApiWorkspaceCalendarEvents request GetApiWorkspaceCalendarEvents(ctx context.Context, params *GetApiWorkspaceCalendarEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // WorkspaceExamList request + WorkspaceExamList(ctx context.Context, params *WorkspaceExamListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetSubscribedHomeworks request GetSubscribedHomeworks(ctx context.Context, params *GetSubscribedHomeworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -13862,6 +14230,18 @@ func (c *Client) GetApiWorkspaceCalendarEvents(ctx context.Context, params *GetA return c.Client.Do(req) } +func (c *Client) WorkspaceExamList(ctx context.Context, params *WorkspaceExamListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewWorkspaceExamListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetSubscribedHomeworks(ctx context.Context, params *GetSubscribedHomeworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetSubscribedHomeworksRequest(c.Server, params) if err != nil { @@ -19120,6 +19500,151 @@ func NewGetApiWorkspaceCalendarEventsRequest(server string, params *GetApiWorksp return req, nil } +// NewWorkspaceExamListRequest generates requests for WorkspaceExamList +func NewWorkspaceExamListRequest(server string, params *WorkspaceExamListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/workspace/exams") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DateFrom != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dateFrom", *params.DateFrom, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DateTo != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dateTo", *params.DateTo, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludeDateUnknown != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "includeDateUnknown", *params.IncludeDateUnknown, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SemesterId != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "semesterId", *params.SemesterId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "pageSize", *params.PageSize, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Locale != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "locale", *params.Locale, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewGetSubscribedHomeworksRequest generates requests for GetSubscribedHomeworks func NewGetSubscribedHomeworksRequest(server string, params *GetSubscribedHomeworksParams) (*http.Request, error) { var err error @@ -21205,6 +21730,9 @@ type ClientWithResponsesInterface interface { // GetApiWorkspaceCalendarEventsWithResponse request GetApiWorkspaceCalendarEventsWithResponse(ctx context.Context, params *GetApiWorkspaceCalendarEventsParams, reqEditors ...RequestEditorFn) (*GetApiWorkspaceCalendarEventsResponse, error) + // WorkspaceExamListWithResponse request + WorkspaceExamListWithResponse(ctx context.Context, params *WorkspaceExamListParams, reqEditors ...RequestEditorFn) (*WorkspaceExamListResponse, error) + // GetSubscribedHomeworksWithResponse request GetSubscribedHomeworksWithResponse(ctx context.Context, params *GetSubscribedHomeworksParams, reqEditors ...RequestEditorFn) (*GetSubscribedHomeworksResponse, error) @@ -22948,6 +23476,31 @@ func (r GetApiWorkspaceCalendarEventsResponse) StatusCode() int { return 0 } +type WorkspaceExamListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SubscribedExamsResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema +} + +// Status returns HTTPResponse.Status +func (r WorkspaceExamListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r WorkspaceExamListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetSubscribedHomeworksResponse struct { Body []byte HTTPResponse *http.Response @@ -24571,6 +25124,15 @@ func (c *ClientWithResponses) GetApiWorkspaceCalendarEventsWithResponse(ctx cont return ParseGetApiWorkspaceCalendarEventsResponse(rsp) } +// WorkspaceExamListWithResponse request returning *WorkspaceExamListResponse +func (c *ClientWithResponses) WorkspaceExamListWithResponse(ctx context.Context, params *WorkspaceExamListParams, reqEditors ...RequestEditorFn) (*WorkspaceExamListResponse, error) { + rsp, err := c.WorkspaceExamList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseWorkspaceExamListResponse(rsp) +} + // GetSubscribedHomeworksWithResponse request returning *GetSubscribedHomeworksResponse func (c *ClientWithResponses) GetSubscribedHomeworksWithResponse(ctx context.Context, params *GetSubscribedHomeworksParams, reqEditors ...RequestEditorFn) (*GetSubscribedHomeworksResponse, error) { rsp, err := c.GetSubscribedHomeworks(ctx, params, reqEditors...) @@ -27896,6 +28458,53 @@ func ParseGetApiWorkspaceCalendarEventsResponse(rsp *http.Response) (*GetApiWork return response, nil } +// ParseWorkspaceExamListResponse parses an HTTP response from a WorkspaceExamListWithResponse call +func ParseWorkspaceExamListResponse(rsp *http.Response) (*WorkspaceExamListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &WorkspaceExamListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SubscribedExamsResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + } + + return response, nil +} + // ParseGetSubscribedHomeworksResponse parses an HTTP response from a GetSubscribedHomeworksWithResponse call func ParseGetSubscribedHomeworksResponse(rsp *http.Response) (*GetSubscribedHomeworksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body)