| generator client { |
| provider = "prisma-client-js" |
| binaryTargets = ["native", "debian-openssl-3.0.x"] |
| } |
|
|
| datasource db { |
| provider = "sqlite" |
| url = "file:./dev.db" |
| } |
|
|
| model User { |
| id String @id @default(cuid()) |
| email String @unique |
| password String |
| name String? |
| role String @default("VIEWER") |
| tokenVersion Int @default(0) |
| createdAt DateTime @default(now()) |
| updatedAt DateTime @updatedAt |
|
|
| inquiries Inquiry[] |
| blogPosts BlogPost[] |
| portfolioItems PortfolioItem[] |
| } |
|
|
| model PortfolioItem { |
| id String @id @default(cuid()) |
| title String |
| slug String @unique |
| description String |
| technologies String? |
| imageUrl String? |
| clientName String? |
| industry String? |
| testimonials String? |
| createdAt DateTime @default(now()) |
| updatedAt DateTime @updatedAt |
| |
| authorId String? |
| author User? @relation(fields: [authorId], references: [id]) |
| } |
|
|
| model BlogPost { |
| id String @id @default(cuid()) |
| title String |
| slug String @unique |
| content String |
| excerpt String? |
| featuredImage String? |
| tags String? |
| status String @default("DRAFT") |
| publishedAt DateTime? |
| createdAt DateTime @default(now()) |
| updatedAt DateTime @updatedAt |
|
|
| authorId String |
| author User @relation(fields: [authorId], references: [id]) |
| } |
|
|
| model Inquiry { |
| id String @id @default(cuid()) |
| name String |
| email String |
| phone String? |
| company String? |
| projectType String? |
| budget String? |
| timeline String? |
| description String |
| attachments String? |
| status String @default("NEW") |
| notes String? |
| createdAt DateTime @default(now()) |
| updatedAt DateTime @updatedAt |
|
|
| managedById String? |
| managedBy User? @relation(fields: [managedById], references: [id]) |
| } |
|
|
| model Testimonial { |
| id String @id @default(cuid()) |
| clientName String |
| company String? |
| content String |
| rating Int |
| imageUrl String? |
| approved Boolean @default(false) |
| createdAt DateTime @default(now()) |
| } |
|
|
|
|
| model ServicePackage { |
| id String @id @default(cuid()) |
| name String |
| description String |
| features String |
| startingPrice Float |
| sortOrder Int @default(0) |
| isActive Boolean @default(true) |
| } |
|
|