Browse Source

feat: Add specific dates to a lecture series

Sean Blackburn 1 năm trước cách đây
mục cha
commit
521cee80b4
1 tập tin đã thay đổi với 24 bổ sung4 xóa
  1. 24 4
      src/components/schemas/api/lecture-series.yaml

+ 24 - 4
src/components/schemas/api/lecture-series.yaml

@@ -1,6 +1,9 @@
 type: object
 description: Single lecture series definition of a specific revision
 properties:
+  pk:
+    description: A unique ID for this module and the time it is taught
+    type: string
   weekday:
     description: The weekday the module took place on
     $ref: ../../enums/weekday.yaml
@@ -46,9 +49,27 @@ properties:
     type: array
     items:
       type: string
-  pk:
-    description: A unique ID for this module and the time it is taught
-    type: string
+  dates:
+    description: |
+      List of specific dates, when the lectures are held. This is used for
+      block lectures and not regular lectures.
+    type:
+      - array
+      - "null"
+    items:
+      type: object
+      properties:
+        starts:
+          description: When the lecture starts (Unix Timestamp in seconds)
+          type: integer
+          format: u64
+        ends:
+          description: When the lecture ends (Unix Timestamp in seconds)
+          type: integer
+          format: u64
+      required:
+        - start
+        - end
 required:
   - weekday
   - from
@@ -62,4 +83,3 @@ required:
   - pages
   - course
   - part_of_other_classes
-  - pk