| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- // 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
- 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")
- }
|