TypeScript
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
posts Post[]
@@map("user")
}
model Post {
id Int @id @default(autoincrement())
title String
authorId Int
author User @relation(fields: [authorId], references: [id])
@@index([authorId])
@@map("post")
}