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