2024-11-18 23:03:05 +00:00
|
|
|
generator client {
|
2024-12-27 15:41:39 +00:00
|
|
|
provider = "prisma-client-js"
|
2024-11-21 16:15:45 +00:00
|
|
|
previewFeatures = ["relationJoins"]
|
2024-11-18 23:03:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
datasource db {
|
|
|
|
provider = "postgresql"
|
|
|
|
url = env("DATABASE_URL")
|
|
|
|
}
|
|
|
|
|
2024-11-19 15:04:41 +00:00
|
|
|
model utilisateurice {
|
2024-12-27 15:41:39 +00:00
|
|
|
id String @id @default(uuid()) @db.Uuid
|
2024-11-19 15:04:41 +00:00
|
|
|
username String
|
|
|
|
password String
|
|
|
|
email String
|
|
|
|
admin Boolean @default(false)
|
2024-12-27 15:41:39 +00:00
|
|
|
deck deck[]
|
2024-11-19 15:04:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
model carte {
|
2024-12-27 15:41:39 +00:00
|
|
|
id String @id @default(uuid()) @db.Uuid
|
|
|
|
name String
|
|
|
|
sanitized_name String
|
|
|
|
released_at String
|
|
|
|
layout String
|
|
|
|
small_image String
|
|
|
|
small_image_back String?
|
|
|
|
normal_image String
|
|
|
|
normal_image_back String?
|
|
|
|
type_line String?
|
|
|
|
colors String[]
|
|
|
|
set set @relation(fields: [set_id], references: [id])
|
|
|
|
set_id String @db.Uuid
|
|
|
|
set_code String
|
|
|
|
rarity String
|
|
|
|
type String?
|
|
|
|
price String?
|
|
|
|
cardmarket_uri String?
|
|
|
|
decks cartes_dans_deck[]
|
|
|
|
decks_as_commander deck[]
|
|
|
|
}
|
|
|
|
|
|
|
|
model deck {
|
|
|
|
id String @id @default(uuid()) @db.Uuid
|
|
|
|
name String
|
|
|
|
utilisateurice_id String @db.Uuid
|
|
|
|
utilisateurice utilisateurice @relation(fields: [utilisateurice_id], references: [id])
|
|
|
|
cartes cartes_dans_deck[]
|
|
|
|
commander carte @relation(fields: [commander_id], references: [id])
|
|
|
|
commander_id String @db.Uuid
|
|
|
|
bset bset @relation(fields: [bset_id], references: [id])
|
|
|
|
bset_id String @db.Uuid
|
|
|
|
}
|
|
|
|
|
|
|
|
model cartes_dans_deck {
|
|
|
|
carte carte @relation(fields: [carte_id], references: [id])
|
|
|
|
carte_id String @db.Uuid
|
|
|
|
deck deck @relation(fields: [deck_id], references: [id])
|
|
|
|
deck_id String @db.Uuid
|
|
|
|
amount Int
|
|
|
|
|
|
|
|
@@id([carte_id, deck_id])
|
2024-11-21 16:15:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
model set {
|
2024-12-27 15:41:39 +00:00
|
|
|
id String @id @default(uuid()) @db.Uuid
|
|
|
|
name_en String
|
|
|
|
sanitized_name String
|
|
|
|
code String
|
|
|
|
set_type String
|
|
|
|
released_at String?
|
|
|
|
icon_svg_uri String
|
|
|
|
cards carte[]
|
|
|
|
bset bset? @relation(fields: [bset_id], references: [id])
|
|
|
|
bset_id String? @db.Uuid
|
2024-11-21 16:15:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
model bset {
|
2024-12-27 15:41:39 +00:00
|
|
|
id String @id @default(uuid()) @db.Uuid
|
2024-11-21 16:15:45 +00:00
|
|
|
name String
|
2024-12-05 16:08:50 +00:00
|
|
|
sanitized_name String
|
2024-11-21 16:15:45 +00:00
|
|
|
sets set[]
|
2024-12-27 15:41:39 +00:00
|
|
|
decks deck[]
|
2024-11-18 23:03:05 +00:00
|
|
|
}
|