mirror of
https://github.com/DerTyp7/explainegy-nextjs.git
synced 2025-10-29 12:52:13 +01:00
30 lines
819 B
Plaintext
30 lines
819 B
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model Article {
|
|
id Int @id @default(autoincrement())
|
|
name String @unique
|
|
title String @unique
|
|
markdown String
|
|
contentTableEntries ContentTableEntry[]
|
|
dateCreated DateTime @default(now())
|
|
dateUpdated DateTime @default(now())
|
|
}
|
|
|
|
model ContentTableEntry {
|
|
id Int @id @default(autoincrement())
|
|
title String
|
|
anchor String
|
|
orderIndex Int
|
|
articleId Int
|
|
article Article @relation(fields: [articleId], references: [id])
|
|
dateCreated DateTime @default(now())
|
|
dateUpdated DateTime @default(now())
|
|
}
|