// 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" } model Project { id String @id @default(cuid()) name String thumbnail String? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt // Design settings for handoff globalNotes String? // Global project notes fontPrimary String? // Primary font name fontSecondary String? // Secondary font name colorPalette String? // JSON array of colors designNotes String? // Additional design notes (WordPress specifics, etc.) nodes Node[] edges Edge[] } model Node { id String @id @default(cuid()) projectId String project Project @relation(fields: [projectId], references: [id], onDelete: Cascade) type String @default("page") title String @default("Nowa strona") content String? // Rich text content notes String? // Developer notes status String @default("draft") // draft, ready, review positionX Float @default(0) positionY Float @default(0) width Float? height Float? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt attachments Attachment[] links Link[] } model Edge { id String @id @default(cuid()) projectId String project Project @relation(fields: [projectId], references: [id], onDelete: Cascade) sourceId String targetId String type String @default("default") } model Attachment { id String @id @default(cuid()) nodeId String node Node @relation(fields: [nodeId], references: [id], onDelete: Cascade) filename String // Stored filename originalName String // Original upload name mimeType String size Int createdAt DateTime @default(now()) } model Link { id String @id @default(cuid()) nodeId String node Node @relation(fields: [nodeId], references: [id], onDelete: Cascade) url String label String? createdAt DateTime @default(now()) }