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