| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- // 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])
- createdAt DateTime @default(now())
- updatedAt DateTime @updatedAt
- cintasSummaries CintasSummary[]
- @@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")
- }
|