... | ... | @@ -75,7 +75,7 @@ TBD |
|
|
|
|
|
### Schemas
|
|
|
|
|
|
## Table User
|
|
|
# Table User
|
|
|
- `id` (uuid, primary key)
|
|
|
- `email` (text unique, not null)
|
|
|
- `password` (text not null)
|
... | ... | @@ -85,30 +85,30 @@ TBD |
|
|
- `profile_picture` (text)
|
|
|
- `is_anonymous` (boolean)
|
|
|
|
|
|
## Table Doctor
|
|
|
# Table Doctor
|
|
|
- `id` (uuid, unique, primary key)
|
|
|
- `crm` (text unique, not null)
|
|
|
- `uf` (text not null)
|
|
|
- `id` (uuid, foreign key referencing User)
|
|
|
|
|
|
## Table HealthPlan
|
|
|
# Table HealthPlan
|
|
|
- `id` (uuid, primary key)
|
|
|
- `name` (text not null)
|
|
|
- `health_plan_image` (text)
|
|
|
|
|
|
## Table DoctorHealthPlan
|
|
|
# Table DoctorHealthPlan
|
|
|
- `id` (uuid, primary key)
|
|
|
- `id_doctor` (uuid)
|
|
|
- `id_health_plan` (uuid)
|
|
|
- Foreign key (`id_doctor`) references Doctor (`id`)
|
|
|
- Foreign key (`id_health_plan`) references HealthPlan (`id`)
|
|
|
|
|
|
## Table Patient
|
|
|
# Table Patient
|
|
|
- `id` (uuid, unique, primary key)
|
|
|
- `cpf` (text)
|
|
|
- Foreign key (`id`) references User (`id`)
|
|
|
|
|
|
## Table Information
|
|
|
# Table Information
|
|
|
- `id` (uuid, primary key)
|
|
|
- `title` (text)
|
|
|
- `link` (text)
|
... | ... | @@ -117,14 +117,14 @@ TBD |
|
|
- `id_doctor` (uuid, not null)
|
|
|
- Foreign key (`id_doctor`) references Doctor (`id`)
|
|
|
|
|
|
## Table DoctorPatient
|
|
|
# Table DoctorPatient
|
|
|
- `id` (uuid, primary key)
|
|
|
- `id_doctor` (uuid)
|
|
|
- `id_patient` (uuid)
|
|
|
- Foreign key (`id_doctor`) references Doctor (`id`)
|
|
|
- Foreign key (`id_patient`) references Patient (`id`)
|
|
|
|
|
|
## Table Appointment
|
|
|
# Table Appointment
|
|
|
- `id` (uuid, primary key)
|
|
|
- `id_doctor` (uuid)
|
|
|
- `id_patient` (uuid)
|
... | ... | @@ -132,12 +132,12 @@ TBD |
|
|
- Foreign key (`id_doctor`) references Doctor (`id`)
|
|
|
- Foreign key (`id_patient`) references Patient (`id`)
|
|
|
|
|
|
## Table Medicine
|
|
|
# Table Medicine
|
|
|
- `id` (uuid, primary key)
|
|
|
- `name` (text not null)
|
|
|
- `leaflet` (text)
|
|
|
|
|
|
## Table Dosage
|
|
|
# Table Dosage
|
|
|
- `id` (uuid, primary key)
|
|
|
- `id_patient` (uuid)
|
|
|
- `id_medicine` (uuid)
|
... | ... | @@ -148,7 +148,7 @@ TBD |
|
|
- Foreign key (`id_patient`) references Patient (`id`)
|
|
|
- Foreign key (`id_medicine`) references Medicine (`id`)
|
|
|
|
|
|
## Table Incompatibility
|
|
|
# Table Incompatibility
|
|
|
- `id` (uuid, primary key)
|
|
|
- `id_medicine` (uuid)
|
|
|
- `id_medicine_inc` (uuid)
|
... | ... | @@ -157,7 +157,7 @@ TBD |
|
|
- Foreign key (`id_medicine`) references Medicine (`id`)
|
|
|
- Foreign key (`id_medicine_inc`) references Medicine (`id`)
|
|
|
|
|
|
## Table Exam
|
|
|
# Table Exam
|
|
|
- `id` (uuid, primary key)
|
|
|
- `description` (text)
|
|
|
- `exam_date` (timestamp not null)
|
... | ... | @@ -165,7 +165,7 @@ TBD |
|
|
- `id_patient` (uuid)
|
|
|
- Foreign key (`id_patient`) references Patient (`id`)
|
|
|
|
|
|
## Table Post
|
|
|
# Table Post
|
|
|
- `id` (uuid, primary key)
|
|
|
- `content` (text)
|
|
|
- `creation_date` (timestamp not null)
|
... | ... | @@ -175,7 +175,7 @@ TBD |
|
|
- Foreign key (`id_post`) references Post (`id`)
|
|
|
- Foreign key (`id_patient`) references Patient (`id`)
|
|
|
|
|
|
## Table Vote
|
|
|
# Table Vote
|
|
|
- `id` (uuid, primary key)
|
|
|
- `is_like` (boolean not null)
|
|
|
- `id_post` (uuid not null)
|
... | ... | |