Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | int8 | 19 | √ | null |
|
|
|||||
| public_id | varchar | 10 | null |
|
|
||||||
| clinic_id | int8 | 19 | null |
|
|
||||||
| status | status_session | 2147483647 | null |
|
|
||||||
| evolution | varchar | 2147483647 | √ | null |
|
|
|||||
| debt | numeric | 12,2 | 0 |
|
|
||||||
| payment_id | int8 | 19 | √ | null |
|
|
|||||
| patient_id | int8 | 19 | null |
|
|
||||||
| clinic_service_id | int8 | 19 | √ | null |
|
|
|||||
| treatment_id | int8 | 19 | null |
|
|
||||||
| created_at | timestamptz | 35,6 | now() |
|
|
||||||
| updated_at | timestamptz | 35,6 | now() |
|
|
||||||
| appointment | int8 | 19 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| session_pkey | Primary key | Asc | id |
| idx_session_clinic_id | Performance | Asc | clinic_id |
| idx_session_clinic_service_id | Performance | Asc | clinic_service_id |
| idx_session_patient_id | Performance | Asc | patient_id |
| idx_session_payment_id | Performance | Asc | payment_id |
| idx_session_treatment_id | Performance | Asc | treatment_id |
| session_public_id_key | Must be unique | Asc | public_id |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| session_debt_check | ((debt >= (0)::numeric)) |

