| 1 | // Prisma Next contract source. The Vite plugin and `bun run emit` generate |
| 2 | // `contract.json` and `contract.d.ts` next to this file. |
| 3 | |
| 4 | model User { |
| 5 | id String @id @default(uuid()) |
| 6 | email String |
| 7 | name String |
| 8 | createdAt DateTime @default(now()) |
| 9 | posts Post[] |
| 10 | |
| 11 | @@map("user") |
| 12 | } |
| 13 | |
| 14 | model Post { |
| 15 | id String @id @default(uuid()) |
| 16 | title String |
| 17 | excerpt String |
| 18 | userId String |
| 19 | createdAt DateTime @default(now()) |
| 20 | |
| 21 | user User @relation(fields: [userId], references: [id]) |
| 22 | |
| 23 | @@map("post") |
| 24 | } |