datasource db { provider = "postgresql" url = env("DATABASE_URL") } generator client { provider = "prisma-client-js" } model Thought { id Int @id @default(autoincrement()) textMarkdown String createdAt DateTime @default(now()) updatedAt DateTime @updatedAt tags Tag[] user User @relation(fields: [userId], references: [id]) userId Int } model Tag { id Int @id @default(autoincrement()) name String createdAt DateTime @default(now()) thoughts Thought[] user User @relation(fields: [userId], references: [id]) userId Int @@unique([name, userId]) } model User { id Int @id @default(autoincrement()) thoughts Thought[] tags Tag[] }