documentation/database.dbml
rui hildt db4bee8fa1 Fix doxumentation
- update and fix examples
- fix typos
- streamline wording
2020-08-28 20:54:21 +02:00

71 lines
1.4 KiB
Plaintext

// DBML source code of the database
// Use https://dbdiagram.io to visualize it
Project meeting_planner {
database_type: 'PostgreSQL'
}
Table account as A {
id int [pk, unique, increment] // auto-increment, uuid
username string
email string
password string
timezone string
earliest_time string
latest_time string
created_at datetime [default: `now()`]
updated_at datetime [default: `now()`]
}
Table meeting as M {
id uuid [pk, unique]
title string
description string
start_time datetime
duration int
status status
password string
created_at datetime [default: `now()`]
updated_at datetime [default: `now()`]
}
Table participant as P {
id uuid [pk, unique]
email string
account_id int [ref: > A.id]
meeting_id uuid [ref: > M.id]
quorum boolean
mandatory boolean
host boolean
answered boolean
created_at datetime [default: `now()`]
updated_at datetime [default: `now()`]
}
Table possible_date as D {
id int [pk, increment, unique]
meeting_id string [ref: > M.id]
possible_date string
created_at datetime [default: `now()`]
}
Table availability {
id int [pk, increment, unique]
participant_id string [ref: > P.id]
possible_date_id int [ref: > D.id]
preference availability_preference
start_time datetime
end_time datetime
created_at datetime [default: `now()`]
}
Enum status {
0_proposed
1_confirmed
}
Enum availability_preference {
0_yes
1_ideal
}