mirror of
https://github.com/ArthurDanjou/website.git
synced 2026-01-14 20:19:35 +01:00
70 lines
1.7 KiB
Plaintext
70 lines
1.7 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("POSTGRES_PRISMA_URL") // uses connection pooling
|
|
directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
|
|
}
|
|
|
|
model Maintenance {
|
|
id Int @id @default(autoincrement())
|
|
reason String
|
|
beginAt DateTime @default(now())
|
|
endAt DateTime @default(now())
|
|
createdAt DateTime @default(now())
|
|
}
|
|
|
|
model Announcement {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
content String
|
|
}
|
|
|
|
model Category {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
slug String
|
|
name String
|
|
talents CategoriesOnTalents[]
|
|
}
|
|
|
|
model Talent {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
logo String
|
|
name String @unique
|
|
website String
|
|
work String
|
|
favorite Boolean @default(false)
|
|
categories CategoriesOnTalents[]
|
|
}
|
|
|
|
model CategoriesOnTalents {
|
|
talent Talent @relation(fields: [talentId], references: [id])
|
|
talentId Int
|
|
category Category @relation(fields: [categoryId], references: [id])
|
|
categoryId Int
|
|
|
|
@@id([talentId, categoryId])
|
|
@@index([talentId])
|
|
@@index([categoryId])
|
|
}
|
|
|
|
model Post {
|
|
id Int @id @default(autoincrement())
|
|
slug String @unique
|
|
createdAt DateTime @default(now())
|
|
views Int @default(0)
|
|
likes Int @default(0)
|
|
}
|
|
|
|
model Form {
|
|
id Int @id @default(autoincrement())
|
|
name String
|
|
email String
|
|
content String
|
|
createdAt DateTime @default(now())
|
|
}
|