doctor_schedules table
The doctor_schedules table in the Hospital Management System Database Schema schema has 8 columns, keyed by id, with 2 foreign keys to staff and departments.
Recurring availability, not individual slots. weekday is 0-6. valid_to null means still in force.
Columns (8)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| staff_id | uuid | not null, references staff.id | |
| department_id | uuid | references departments.id | |
| weekday | smallint | not null | |
| starts_at | time | not null | |
| ends_at | time | not null | |
| valid_from | date | not null | |
| valid_to | date |
Indexes (1)
(staff_id, weekday)
Relationships
doctor_schedules.staff_idreferencesstaff.iddoctor_schedules.department_idreferencesdepartments.id