// 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 = "postgresql" url = env("DATABASE_URL") } model File { id String @id @default(cuid()) filename String mimetype String size Int data Bytes // PostgreSQL ByteA type for blob storage userId String? // Kinde user ID that uploaded the file createdAt DateTime @default(now()) updatedAt DateTime @updatedAt } model User { id Int @id @default(autoincrement()) name String username String email String createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@map("users") } model LayoutConfiguration { id Int @id @default(autoincrement()) name String sections LayoutSection[] imports Import[] createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@map("layout_configurations") } model LayoutSection { id Int @id @default(autoincrement()) configurationId Int name String type String sheetName String startingRow Int? endingRow Int? tableName String fields LayoutSectionField[] layoutConfiguration LayoutConfiguration @relation(fields: [configurationId], references: [id], onDelete: Cascade) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@map("layout_sections") } model LayoutSectionField { id Int @id @default(autoincrement()) layoutSectionId Int cellPosition String name String dataType String dataTypeFormat String? importTableColumnName String importColumnOrderNumber Int layoutSection LayoutSection @relation(fields: [layoutSectionId], references: [id], onDelete: Cascade) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@map("layout_section_fields") } model Import { id Int @id @default(autoincrement()) name String importDate DateTime @default(now()) layoutId Int layout LayoutConfiguration @relation(fields: [layoutId], references: [id]) fileId String? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt cintasSummaries CintasSummary[] cintasInstallCalendar CintasInstallCalendar[] @@map("imports") } model CintasSummary { id Int @id @default(autoincrement()) importId Int import Import @relation(fields: [importId], references: [id], onDelete: Cascade) week String trrTotal Int fourWkAverages Int trrPlus4Wk Int powerAdds Int weekId Int createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@map("cintas_intall_calendar_summary") } model CintasInstallCalendar { id Int @id @default(autoincrement()) importId Int import Import @relation(fields: [importId], references: [id], onDelete: Cascade) opportunityStatus String? @map("opportunity_status") @db.VarChar(4000) week String? @db.VarChar(4000) qtr String? @db.VarChar(4000) installDate String? @map("install_date") @db.VarChar(4000) accountName String? @map("account_name") @db.VarChar(4000) zipCode String? @map("zip_code") @db.VarChar(4000) soldToNumber String? @map("sold_to_number") @db.VarChar(4000) sortNumber String? @map("sort_number") @db.VarChar(4000) type String? @db.VarChar(4000) route String? @db.VarChar(4000) day String? @db.VarChar(4000) trr String? @db.VarChar(4000) paperChemWk1 String? @map("paper_chem_wk1") @db.VarChar(4000) paperChemWk2 String? @map("paper_chem_wk2") @db.VarChar(4000) paperChemWk3 String? @map("paper_chem_wk3") @db.VarChar(4000) paperChemWk4 String? @map("paper_chem_wk4") @db.VarChar(4000) sanis String? @db.VarChar(4000) powerAdd String? @map("power_add") @db.VarChar(4000) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@map("cintas_install_calendar") } model SiteInformation { id Int @id @default(autoincrement()) companyName String @map("company_name") @db.VarChar(1000) phoneNumber String @map("phone_number") @db.VarChar(1000) facilityName String @map("facility_name") @db.VarChar(1000) companyContact String @map("company_contact") @db.VarChar(1000) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@map("siteinfo_siteinformation") }