1 parent 56f38f8 commit a265464Copy full SHA for a265464
1 file changed
prisma/schema.prisma
@@ -196,6 +196,30 @@ model AssessmentSession {
196
createdAt DateTime @default(now())
197
}
198
199
+enum WhatsAppIntent {
200
+ NONE
201
+ REMINDER
202
+ MEDICATION
203
+ ASSESSMENT
204
+}
205
+
206
+model WhatsAppConversation {
207
+ id String @id @default(cuid())
208
+ fromPhone String @unique
209
+ caregiverPhone String?
210
+ caregiverId String?
211
+ elderlyProfileId String?
212
+ intent WhatsAppIntent @default(NONE)
213
+ state Json?
214
+ lastUserMessage String?
215
+ lastAssistantMessage String?
216
+ createdAt DateTime @default(now())
217
+ updatedAt DateTime @updatedAt
218
219
+ @@index([caregiverId])
220
+ @@index([elderlyProfileId])
221
222
223
model TelegramConversation {
224
id String @id @default(cuid())
225
telegramChatId String @unique
0 commit comments