mirror of
https://github.com/Floriansylvain/ParisMuseesQuizz.git
synced 2026-08-19 19:53:22 +02:00
Updated Models
This commit is contained in:
+13
-2
@@ -18,7 +18,7 @@ model User {
|
||||
|
||||
model Author {
|
||||
id Int @id @default(autoincrement())
|
||||
fullname String
|
||||
fullname String @unique
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
PaintingAuthor PaintingAuthor[]
|
||||
@@ -26,9 +26,12 @@ model Author {
|
||||
|
||||
model Painting {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
name String @unique
|
||||
image_url String
|
||||
link String
|
||||
PaintingAuthor PaintingAuthor[]
|
||||
Musuem Musuem? @relation(fields: [musuemId], references: [id])
|
||||
musuemId Int?
|
||||
}
|
||||
|
||||
model PaintingAuthor {
|
||||
@@ -39,3 +42,11 @@ model PaintingAuthor {
|
||||
|
||||
@@id([painting_id, author_id])
|
||||
}
|
||||
|
||||
model Musuem {
|
||||
id Int @id @default(autoincrement())
|
||||
name String @unique
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
Painting Painting[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user