Showing
1 changed file
with
23 additions
and
0 deletions
back/prisma/schema.prisma
0 → 100644
| 1 | +generator client { | ||
| 2 | + provider = "prisma-client-js" | ||
| 3 | +} | ||
| 4 | + | ||
| 5 | +datasource db { | ||
| 6 | + provider = "mysql" | ||
| 7 | + url = env("DATABASE_URL") | ||
| 8 | +} | ||
| 9 | + | ||
| 10 | +model User { | ||
| 11 | + id Int @default(autoincrement()) @id | ||
| 12 | + createdAt DateTime @default(now()) | ||
| 13 | + email String @unique | ||
| 14 | + name String | ||
| 15 | + profile Profile? | ||
| 16 | +} | ||
| 17 | + | ||
| 18 | +model Profile { | ||
| 19 | + id Int @default(autoincrement()) @id | ||
| 20 | + bio String | ||
| 21 | + user User @relation(fields: [userId], references: [id]) | ||
| 22 | + userId Int | ||
| 23 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment