@@ -62,11 +62,60 @@ erDiagram
6262 timestamp updated_at
6363 }
6464
65+ children {
66+ uuid id PK
67+ uuid parent_id FK
68+ gender gender
69+ text first_name
70+ text last_name
71+ date dob
72+ text allergies
73+ text medical_conditions
74+ text medications
75+ timestamp created_at
76+ timestamp updated_at
77+ }
78+
79+ emergency_contacts {
80+ uuid id PK
81+ uuid child_id FK
82+ text full_name
83+ text email_address
84+ text phone_number
85+ text relationship
86+ timestamp created_at
87+ timestamp updated_at
88+ }
89+
90+ extra_questions {
91+ uuid id PK
92+ uuid service_id FK
93+ extra_question_type type
94+ text prompt
95+ jsonb options
96+ timestamp created_at
97+ timestamp updated_at
98+ }
99+
100+ extra_question_answers {
101+ uuid id PK
102+ uuid extra_question_id FK
103+ uuid child_id FK
104+ text answer "text[]"
105+ timestamp created_at
106+ timestamp updated_at
107+ }
108+
65109 profiles ||--o{ service_bookings : "books"
66110 services ||--o{ service_bookings : "booked via"
67111 profiles ||--o{ coaching_sessions : "coaches"
68112 profiles ||--o{ coaching_sessions : "attends"
69113 services ||--o{ coaching_sessions : "fulfilled by"
114+ profiles ||--o{ children : "parent of"
115+ children ||--o{ emergency_contacts : "has"
116+ services ||--o{ extra_questions : "defines"
117+ extra_questions ||--o{ extra_question_answers : "answered via"
118+ children ||--o{ extra_question_answers : "submits"
70119```
71120
72121## Enums
@@ -78,3 +127,5 @@ erDiagram
78127| ` booking_status ` | ` pending ` , ` confirmed ` , ` cancelled ` |
79128| ` webinar_tier ` | ` free ` , ` premium ` |
80129| ` session_status ` | ` pending ` , ` confirmed ` , ` cancelled ` , ` completed ` |
130+ | ` gender ` | ` male ` , ` female ` , ` prefer_not_to_say ` |
131+ | ` extra_question_type ` | ` text ` , ` multiple_choices ` , ` checkboxes ` , ` user_agreement ` |
0 commit comments