generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "sqlite"
  url      = env("DATABASE_URL")
}

model User {
  id           String   @id @default(cuid())
  email        String   @unique
  passwordHash String
  files        File[]
  createdAt    DateTime @default(now())
  updatedAt    DateTime @updatedAt
}

model File {
  id           String   @id @default(cuid())
  key          String   @unique
  name         String
  contentType  String
  sizeBytes    BigInt
  relativePath String
  user         User     @relation(fields: [userId], references: [id])
  userId       String
  createdAt    DateTime @default(now())
  updatedAt    DateTime @updatedAt
}

