mirror of
https://github.com/Floriansylvain/ParisMuseesQuizz.git
synced 2026-08-19 19:53:22 +02:00
42 lines
1.0 KiB
Plaintext
42 lines
1.0 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "mysql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model User {
|
|
id Int @id @default(autoincrement())
|
|
email String @unique
|
|
password String
|
|
name String
|
|
created_at DateTime @default(now())
|
|
updated_at DateTime @updatedAt
|
|
}
|
|
|
|
model Author {
|
|
id Int @id @default(autoincrement())
|
|
fullname String
|
|
created_at DateTime @default(now())
|
|
updated_at DateTime @updatedAt
|
|
PaintingAuthor PaintingAuthor[]
|
|
}
|
|
|
|
model Painting {
|
|
id Int @id @default(autoincrement())
|
|
name String
|
|
image_url String
|
|
PaintingAuthor PaintingAuthor[]
|
|
}
|
|
|
|
model PaintingAuthor {
|
|
painting Painting @relation(fields: [painting_id], references: [id])
|
|
painting_id Int
|
|
author Author @relation(fields: [author_id], references: [id])
|
|
author_id Int
|
|
|
|
@@id([painting_id, author_id])
|
|
}
|