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

generator client {
  provider = "prisma-client-js"
  // output   = "./generated/client"
}

model User {
  id          String   @id @default(cuid())
  username    String   @unique
  password    String
  displayName String
  createdAt   DateTime @default(now())
  updatedAt   DateTime @updatedAt

  Session     Session[]
}

model Session {
  id        String    @id
  userId    String
  expiresAt DateTime

  user      User      @relation(references: [id], fields: [userId], onDelete: Cascade)

  @@index([userId])
}