mirror of
https://github.com/DerTyp7/explainegy-nextjs.git
synced 2025-10-29 12:52:13 +01:00
add prisma
This commit is contained in:
29
prisma/schema.prisma
Normal file
29
prisma/schema.prisma
Normal file
@@ -0,0 +1,29 @@
|
||||
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())
|
||||
}
|
||||
Reference in New Issue
Block a user