Data Schemas
Custom Types
A Code
type used in this documentation refers to a string
in format of /[A-Z]{4}[0-9]{4}/
, e.g. COMP1511
A YearTerm
type refers to a string in format of /[0-9]{2}T[0-3]/
, e.g. 21T1
Schema Definition
The schemas are defined in Typescript types in the
backend/src/api/schemas
We use the Zod library to define the Typescript types from the schema definition
Course
A course object contains all required metadata concerning the course. The format is as follows:
Key | Description | Type | Example |
---|---|---|---|
| Course code |
|
|
|
|
|
|
| A courses attributes (related to if it’s an introductory course, or general education course, etc.) |
| See Attributes |
| Denotes whether part of semester or trimester calendar. |
|
|
| Location of UNSW campus (includes |
|
|
| Description from Handbook |
|
|
| Required prerequisites. Empty string if none. |
|
|
| An object with equivalent courses as the key. Value is always 1. |
|
|
| An object with equivalent courses as the key. Value is always 1. |
|
|
| The faculty responsible for teaching the course. |
|
|
| Category of learning |
|
|
| A flag that indicates whether the course can be taken as a general education course |
|
|
| The first number of the course’s course code |
|
|
| An array of review ids submitted by our users. |
|
|
| The school responsible for teaching the course. A school is a subdivision of a faculty. This is an empty string if the responsible school could not be found (e.g. the faculty itself is responsible for the course) |
|
|
| Represents whether the course is for undergraduate or postgraduate students |
|
|
| An array representing the course availability per term. 0 represents Summer Term; 1 represents Term 1, etc. |
|
|
| Name of course |
|
|
| A course’s units of credit |
|
|
|
|
|
|
|
|
|
|
Review
Key | Description | Type | Example |
---|---|---|---|
|
|
|
|
| id for review |
|
|
| The course code |
|
|
|
|
|
|
| Author’s review |
|
|
|
|
|
|
| The term they took the course |
|
|
| Timestamp (unix timestamp) in milliseconds |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Their ratings for the course |
|
|
|
|
|
|
| A list of recommended courses |
|
|
|
|
|
|
User
Key | Type | Example |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Report
Key | Type | Example |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|