Files
XRayPDF/client/prisma/schema.prisma
T
Aryan Singh 41186abc57 Add XRayPDF client app with OCR routes
Introduce a new Next.js `client` app for XRayPDF: adds frontend pages (dashboard, upload, layout, Navbar, globals) and API routes for documents (upload, OCR, pixel processing, delete, list). Include Tesseract traineddata (eng.traineddata), update next.config.ts to allow native server packages and remote images, update package.json to add dependencies (canvas, sharp, tesseract.js, pdfjs-dist, multer, uuid), and update Prisma schema. Also add .gitignore entries for user uploads/results and a README describing the project and architecture.
2026-02-25 22:39:42 -06:00

41 lines
1.1 KiB
Plaintext

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
generator client {
provider = "prisma-client"
output = "../src/generated/prisma"
}
datasource db {
provider = "postgresql"
}
model user {
id String @id @default(uuid())
email String @unique
name String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
documents pdfDocument[]
}
model pdfDocument {
id String @id @default(uuid())
userId String
user user @relation(fields: [userId], references: [id], onDelete: Cascade)
originalName String
filePath String
pixelResultDir String?
ocrResultDir String?
ocrRan Boolean @default(false)
fileSize Int
pageCount Int @default(1)
pixelPageCount Int @default(0)
ocrPageCount Int @default(0)
createdAt DateTime @default(now())
@@index([userId])
}