// 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 User {
  uuid      String  @id @default(uuid()) @db.Uuid
  isBlocked Boolean @default(false)

  devices UserDevice[] @relation("userDevice")
}

model UserDevice {
  fingerprint Bytes   @id @db.ByteA
  name        String  @db.VarChar(100)
  userUuid    String  @db.Uuid
  isBlocked   Boolean @default(false)

  user User @relation("userDevice", fields: [userUuid], references: [uuid])
}
