feat: doctor visit log, schedule prediction, chart PDF, natural digest

- Doctor notes: add doctorName, reason, prescriptions, nextAppointmentAt fields (schema + API + UI)
- Dashboard: baby schedule prediction widget (avg nap/bedtime/first-feed over 14 days)
- Growth PDF: embed weight chart as image (SVG→Canvas capture) before data table
- Weekly digest: natural language push notification instead of bullet stats

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 22:46:22 +02:00
parent f470120add
commit f5e0f581af
9 changed files with 336 additions and 36 deletions
@@ -0,0 +1,5 @@
-- AlterTable
ALTER TABLE "DoctorNote" ADD COLUMN "doctorName" TEXT,
ADD COLUMN "nextAppointmentAt" TIMESTAMP(3),
ADD COLUMN "prescriptions" TEXT,
ADD COLUMN "reason" TEXT;
+12 -8
View File
@@ -184,14 +184,18 @@ model GrowthLog {
}
model DoctorNote {
id String @id @default(cuid())
babyId String
baby Baby @relation(fields: [babyId], references: [id], onDelete: Cascade)
userId String
user User @relation(fields: [userId], references: [id])
content String
date DateTime @default(now())
createdAt DateTime @default(now())
id String @id @default(cuid())
babyId String
baby Baby @relation(fields: [babyId], references: [id], onDelete: Cascade)
userId String
user User @relation(fields: [userId], references: [id])
content String
doctorName String?
reason String?
prescriptions String?
nextAppointmentAt DateTime?
date DateTime @default(now())
createdAt DateTime @default(now())
}
model JournalNote {