Spaces:
Runtime error
Runtime error
| generator client { | |
| provider = "prisma-client-js" | |
| } | |
| datasource db { | |
| provider = "postgresql" | |
| url = env("DATABASE_URL") | |
| } | |
| enum CustomerGender { | |
| MALE | |
| FEMALE | |
| } | |
| enum CaseType { | |
| CIVIL | |
| CRIMINAL | |
| PERSONAL_STATUS | |
| } | |
| enum CaseStatus { | |
| OPEN | |
| CLOSED | |
| } | |
| enum CaseFileRagStatus { | |
| PENDING | |
| PROCESSING | |
| READY | |
| FAILED | |
| SKIPPED | |
| } | |
| model User { | |
| id String | |
| firstName String | |
| lastName String | |
| email String | |
| passwordHash String | |
| sessions Session[] | |
| customers Customer[] | |
| cases Case[] | |
| caseFiles CaseFile[] | |
| courtSessions CourtSession[] | |
| chatTurns CaseChatTurn[] | |
| createdAt DateTime | |
| updatedAt DateTime | |
| @ | |
| } | |
| model Session { | |
| id String | |
| userId String | |
| tokenHash String | |
| expiresAt DateTime | |
| user User | |
| createdAt DateTime | |
| updatedAt DateTime | |
| @ | |
| @ | |
| } | |
| model Customer { | |
| id String | |
| ownerId String | |
| firstName String | |
| middleName String? | |
| lastName String | |
| gender CustomerGender | |
| phone String | |
| owner User | |
| cases Case[] | |
| caseFiles CaseFile[] | |
| chatTurns CaseChatTurn[] | |
| courtSessions CourtSession[] | |
| createdAt DateTime | |
| updatedAt DateTime | |
| @ | |
| @ | |
| @ | |
| } | |
| model Case { | |
| id String | |
| customerId String | |
| ownerId String | |
| caseName String | |
| publicId String | |
| type CaseType | |
| subType String? | |
| opponentFullName String | |
| description String? | |
| status CaseStatus | |
| closedAt DateTime? | |
| customer Customer | |
| owner User | |
| files CaseFile[] | |
| courtSessions CourtSession[] | |
| chatTurns CaseChatTurn[] | |
| createdAt DateTime | |
| updatedAt DateTime | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| } | |
| model CaseFile { | |
| id String | |
| ownerId String | |
| customerId String | |
| caseId String | |
| displayName String | |
| description String? | |
| originalFileName String | |
| mimeType String | |
| sizeBytes Int | |
| storageBucket String | |
| storageKey String | |
| ragStatus CaseFileRagStatus | |
| ragError String? | |
| ragSyncedAt DateTime? | |
| customer Customer | |
| case Case | |
| owner User | |
| createdAt DateTime | |
| updatedAt DateTime | |
| @ | |
| @ | |
| @ | |
| @ | |
| } | |
| model CourtSession { | |
| id String | |
| ownerId String | |
| customerId String | |
| caseId String | |
| governorate String | |
| courtName String | |
| courtLocation String | |
| locationDetails String? | |
| scheduledAt DateTime | |
| owner User | |
| customer Customer | |
| case Case | |
| createdAt DateTime | |
| updatedAt DateTime | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| } | |
| model CaseChatTurn { | |
| id String | |
| ownerId String | |
| customerId String | |
| caseId String | |
| question String | |
| answer String | |
| sources Json? | |
| owner User | |
| customer Customer | |
| case Case | |
| createdAt DateTime | |
| updatedAt DateTime | |
| @ | |
| @ | |
| } | |