| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- // 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[]
- 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")
- }
|