Skip to content
Jens Schlegel edited this page Nov 17, 2021 · 2 revisions

Database Schema

User

name type restrictions
id int pk
name string 100 not null
email string unique
password string not null
superuser boolean std: false
createdAt timestamp

Competition

name type restrictions
id int pk
title string 150 not null
description text not null
userId int fk: user
startDate date not null
endDate date not null
createdAt timestamp

Submission

name type restrictions
id int pk
description text not null
userId int fk: user
competitionId int fk: competition
createdAt timestamp

Rating

name type restrictions
id int pk
userId int fk: user
submissionId int fk: submission
rating int 1-5

Clone this wiki locally