// 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 = env("DATABASE_URL") } model Thread { id Int @id @default(autoincrement()) title String post String imageName String posts Post[] createdAt DateTime @default(now()) updatedAt DateTime @updatedAt } model Post { id Int @id @default(autoincrement()) comment String imageName String? replyingTo Int? Reply Post? @relation("d", fields: [replyingTo], references: [id]) replies Post[] @relation("d") post Thread @relation(fields: [postId], references: [id]) postId Int createdAt DateTime @default(now()) updatedAt DateTime @updatedAt }