2024-06-11 13:35:56 +00:00
|
|
|
// This is your Prisma schema file,
|
|
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
|
|
|
|
generator client {
|
|
|
|
provider = "prisma-client-js"
|
|
|
|
}
|
|
|
|
|
|
|
|
datasource db {
|
|
|
|
provider = "sqlite"
|
|
|
|
url = "file:./dev.db"
|
|
|
|
}
|
|
|
|
|
2024-09-13 10:21:45 +00:00
|
|
|
model User {
|
|
|
|
id Int @id @default(autoincrement())
|
|
|
|
email String
|
|
|
|
password String
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2024-06-11 13:35:56 +00:00
|
|
|
model Story {
|
|
|
|
id Int @id @default(autoincrement())
|
|
|
|
word_count Int
|
|
|
|
title String
|
|
|
|
subs Sub[]
|
|
|
|
genres Genre[]
|
|
|
|
}
|
|
|
|
|
|
|
|
model Pub {
|
|
|
|
id Int @id @default(autoincrement())
|
|
|
|
title String
|
|
|
|
link String @default("")
|
|
|
|
query_after_days Int
|
|
|
|
subs Sub[]
|
|
|
|
genres Genre[]
|
|
|
|
}
|
|
|
|
|
|
|
|
model Genre {
|
|
|
|
id Int @id @default(autoincrement())
|
|
|
|
name String @unique
|
|
|
|
stories Story[]
|
|
|
|
pubs Pub[]
|
|
|
|
}
|
|
|
|
|
|
|
|
model Response {
|
|
|
|
id Int @id @default(autoincrement())
|
|
|
|
response String
|
|
|
|
subs Sub[]
|
|
|
|
}
|
|
|
|
|
|
|
|
model Sub {
|
|
|
|
id Int @id @default(autoincrement())
|
2024-06-19 16:01:42 +00:00
|
|
|
story Story? @relation(fields: [storyId], references: [id])
|
|
|
|
storyId Int?
|
|
|
|
pub Pub? @relation(fields: [pubId], references: [id])
|
|
|
|
pubId Int?
|
2024-06-11 13:35:56 +00:00
|
|
|
submitted String
|
2024-06-19 16:01:42 +00:00
|
|
|
responded String?
|
|
|
|
response Response? @relation(fields: [responseId], references: [id])
|
|
|
|
responseId Int?
|
2024-06-11 13:35:56 +00:00
|
|
|
}
|