Enhance dashboard functionality by integrating child selection and displaying related measurements, vaccinations, and toothing data. Update Prisma schema to use UUIDs for IDs and add new API endpoint to fetch child details by ID.
This commit is contained in:
@@ -22,7 +22,7 @@ model User {
|
||||
}
|
||||
|
||||
model Child {
|
||||
id Int @id @default(autoincrement())
|
||||
id String @id @default(uuid())
|
||||
name String
|
||||
birthDate DateTime
|
||||
gender String? // can be "male", "female", "diverse", or "unknown"
|
||||
@@ -35,26 +35,27 @@ model Child {
|
||||
}
|
||||
|
||||
model Measurement {
|
||||
id Int @id @default(autoincrement())
|
||||
childId Int
|
||||
id String @id @default(uuid())
|
||||
childId String
|
||||
child Child @relation(fields: [childId], references: [id])
|
||||
date DateTime
|
||||
weightKg Float?
|
||||
heightCm Float?
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
model ToothStatus {
|
||||
id Int @id @default(autoincrement())
|
||||
childId Int
|
||||
id String @id @default(uuid())
|
||||
childId String
|
||||
child Child @relation(fields: [childId], references: [id])
|
||||
toothLabel String // z. B. "oben links 1" oder "Zahn 61"
|
||||
toothLabel String // z. B. "oben links 1" oder "Zahn 61"
|
||||
date DateTime
|
||||
status String // z. B. "durchgebrochen", "locker", "fehlend"
|
||||
status String // z. B. "durchgebrochen", "locker", "fehlend"
|
||||
}
|
||||
|
||||
model Vaccine {
|
||||
id Int @id @default(autoincrement())
|
||||
childId Int
|
||||
id String @id @default(uuid())
|
||||
childId String
|
||||
child Child @relation(fields: [childId], references: [id])
|
||||
name String
|
||||
date DateTime
|
||||
|
||||
Reference in New Issue
Block a user