/
Data Schemas

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

Key

Description

Type

Example

courseCode

Course code

string

'COMP2521'

archived

 

boolean

 

attributes

A courses attributes (related to if it’s an introductory course, or general education course, etc.)

string[]

See Attributes

calendar

Denotes whether part of semester or trimester calendar.

string

'3+'

campus

Location of UNSW campus (includes Sydney, Paddington and Canberra)

string

'Sydney'

description

Description from Handbook

string

'...'

enrolmentRules

Required prerequisites. Empty string if none.

string

'Prerequisite: COMP1511 or DPST1091 or COMP1911 or COMP1917'

equivalents

An object with equivalent courses as the key. Value is always 1.

string[]

{ DPST1092: 1}

exclusions

An object with equivalent courses as the key. Value is always 1.

string[]

{ DPST1092: 1}

faculty

The faculty responsible for teaching the course.

string

'Faculty of Engineering'

fieldOfEducation

Category of learning

string

'031305 Computer Engineering'

genEd

A flag that indicates whether the course can be taken as a general education course

boolean

true

level

The first number of the course’s course code

number

1

reviews

An array of review ids submitted by our users.

integer

 

school

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)

string

School of Computer Science and Engineering

studyLevel

Represents whether the course is for undergraduate or postgraduate students

string

Undergraduate

terms

An array representing the course availability per term.

0 represents Summer Term; 1 represents Term 1, etc.

[integers]

[0, 1, 2, 3]

title

Name of course

string

Data Structures & Algorithms

uoc

A course’s units of credit

integer

6

rating

 

float

 

reviews

 

reviews[]

 

Review

Key

Description

Type

Example

Key

Description

Type

Example

reviewId

 

string

 

zid

id for review

string

'abcd123'

courseCode

The course code

Code

COMP1511

authorName

 

string

 

description

Author’s review

string?

'...'

grade

 

integer?

 

termTaken

The term they took the course

YearTerm

'20T2'

createdTimestamp

Timestamp (unix timestamp) in milliseconds

datetime

1627211775000

updatedTimestamp

 

datetime

 

upvotes

 

string[]

 

manageability

 

float

 

usefulness

 

float

 

enjoyability

 

float

 

overallRating

Their ratings for the course

float

 

reports

 

reports[]

 

courses

A list of recommended courses

courses

[ ‘COMP2041’ ]

users

 

users

 

User

Key

Type

Example

Key

Type

Example

zid

string

 

bookmarkedReviews

string[]

 

bookmarkedCourses

string[]

 

isAdmin

boolean

 

reports

reports[]

 

reviews

reviews[]

 

Report

Key

Type

Example

Key

Type

Example

reportId

string

 

reviewId

string

 

zid

string

 

status

report_status

 

reason

string

 

createdTimestamp

datetime

 

updatedTimestamp

datetime

 

reviews

reviews

 

users

users

 

Related content