// This is your Prisma schema file, // learn more about it in the docs: https://pris.ly/d/prisma-schema datasource db { provider = "sqlite" url = "***" } generator client { provider = "prisma-client-js" } model User { id Int @id @default(autoincrement()) name String email String? createdAt DateTime @default(now()) polls Poll[] } model Poll { id Int @id @default(autoincrement()) User User? @relation(fields: [userId], references: [id]) userId Int? title String description String? slug String @unique questions Question[] createdAt DateTime @default(now()) } model Question { id Int @id @default(autoincrement()) Poll Poll? @relation(fields: [pollId], references: [id]) pollId Int? title String variants Variant[] } model Variant { id Int @id @default(autoincrement()) Question Question? @relation(fields: [questionId], references: [id]) questionId Int? text String count Int @default(0) }