generator client { provider = "prisma-client-js" } datasource db { provider = "mysql" url = env("DATABASE_URL") } model List { id String @id @default(cuid()) title String color String @default("#3B82F6") createdAt DateTime @default(now()) updatedAt DateTime @updatedAt items Item[] } model Item { id String @id @default(cuid()) title String description String? completed Boolean @default(false) priority String @default("medium") // low, medium, high dueDate DateTime? tags Json @default("[]") notes String? @db.Text createdAt DateTime @default(now()) updatedAt DateTime @updatedAt listId String list List @relation(fields: [listId], references: [id], onDelete: Cascade) @@index([listId]) @@index([completed]) @@index([priority]) @@index([dueDate]) @@index([createdAt]) @@index([listId, completed]) @@index([listId, priority]) }