
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * WARNING: This is an internal file that is subject to change!
 *
 * 🛑 Under no circumstances should you import this file directly! 🛑
 *
 * Please import the `PrismaClient` class from the `client.ts` file instead.
 */

import * as runtime from "@prisma/client/runtime/client"
import type * as Prisma from "./prismaNamespace"


const config: runtime.GetPrismaClientConfig = {
  "previewFeatures": [],
  "clientVersion": "7.7.0",
  "engineVersion": "75cbdc1eb7150937890ad5465d861175c6624711",
  "activeProvider": "postgresql",
  "inlineSchema": "generator client {\n  provider = \"prisma-client\"\n  output   = \"../lib/generated/prisma\"\n}\n\ndatasource db {\n  provider = \"postgresql\"\n}\n\nmodel User {\n  id           String        @id @default(uuid(7))\n  name         String\n  email        String        @unique\n  password     String\n  banned       Boolean       @default(false)\n  createdAt    DateTime      @default(now())\n  games        Game[]\n  dailyResults DailyResult[]\n}\n\nmodel Game {\n  id            String   @id @default(uuid(7))\n  userId        String\n  user          User     @relation(fields: [userId], references: [id], onDelete: Cascade)\n  mode          String // \"solo\" | \"multi\" | \"daily\" | \"blitz\"\n  startArticle  String\n  targetArticle String\n  path          String // JSON array de titres\n  clicks        Int\n  timeSeconds   Float\n  won           Boolean  @default(true)\n  playedAt      DateTime @default(now())\n\n  @@index([userId])\n}\n\nmodel DailyPuzzle {\n  id            String        @id @default(uuid(7))\n  date          String        @unique // \"YYYY-MM-DD\"\n  startArticle  String\n  targetArticle String\n  results       DailyResult[]\n}\n\nmodel Room {\n  code           String   @id\n  players        Json     @default(\"[]\")\n  phase          String   @default(\"waiting\")\n  round          Int      @default(0)\n  totalRounds    Int      @default(3)\n  maxPlayers     Int      @default(16)\n  gameMode       String   @default(\"race\")\n  searchAllowed  Boolean  @default(false)\n  timeLimit      Int      @default(0)\n  startArticle   String   @default(\"\")\n  targetArticle  String   @default(\"\")\n  roundWinner    String?\n  countdownStart BigInt?\n  roundStart     BigInt?\n  createdAt      BigInt\n  updatedAt      DateTime @updatedAt\n}\n\nmodel DailyResult {\n  id          String      @id @default(uuid(7))\n  puzzleId    String\n  puzzle      DailyPuzzle @relation(fields: [puzzleId], references: [id], onDelete: Cascade)\n  userId      String\n  user        User        @relation(fields: [userId], references: [id], onDelete: Cascade)\n  path        String // JSON\n  clicks      Int\n  timeSeconds Float\n  won         Boolean\n  playedAt    DateTime    @default(now())\n\n  @@unique([puzzleId, userId])\n  @@index([puzzleId])\n}\n",
  "runtimeDataModel": {
    "models": {},
    "enums": {},
    "types": {}
  },
  "parameterizationSchema": {
    "strings": [],
    "graph": ""
  }
}

config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"banned\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"games\",\"kind\":\"object\",\"type\":\"Game\",\"relationName\":\"GameToUser\"},{\"name\":\"dailyResults\",\"kind\":\"object\",\"type\":\"DailyResult\",\"relationName\":\"DailyResultToUser\"}],\"dbName\":null},\"Game\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"GameToUser\"},{\"name\":\"mode\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"startArticle\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"targetArticle\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"path\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"clicks\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timeSeconds\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"won\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"playedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"DailyPuzzle\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"startArticle\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"targetArticle\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"results\",\"kind\":\"object\",\"type\":\"DailyResult\",\"relationName\":\"DailyPuzzleToDailyResult\"}],\"dbName\":null},\"Room\":{\"fields\":[{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"players\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"phase\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"round\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"totalRounds\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"maxPlayers\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"gameMode\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"searchAllowed\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"timeLimit\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"startArticle\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"targetArticle\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"roundWinner\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"countdownStart\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"roundStart\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"BigInt\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"DailyResult\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"puzzleId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"puzzle\",\"kind\":\"object\",\"type\":\"DailyPuzzle\",\"relationName\":\"DailyPuzzleToDailyResult\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"DailyResultToUser\"},{\"name\":\"path\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"clicks\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"timeSeconds\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"won\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"playedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}")
config.parameterizationSchema = {
  strings: JSON.parse("[\"where\",\"orderBy\",\"cursor\",\"user\",\"games\",\"results\",\"_count\",\"puzzle\",\"dailyResults\",\"User.findUnique\",\"User.findUniqueOrThrow\",\"User.findFirst\",\"User.findFirstOrThrow\",\"User.findMany\",\"data\",\"User.createOne\",\"User.createMany\",\"User.createManyAndReturn\",\"User.updateOne\",\"User.updateMany\",\"User.updateManyAndReturn\",\"create\",\"update\",\"User.upsertOne\",\"User.deleteOne\",\"User.deleteMany\",\"having\",\"_min\",\"_max\",\"User.groupBy\",\"User.aggregate\",\"Game.findUnique\",\"Game.findUniqueOrThrow\",\"Game.findFirst\",\"Game.findFirstOrThrow\",\"Game.findMany\",\"Game.createOne\",\"Game.createMany\",\"Game.createManyAndReturn\",\"Game.updateOne\",\"Game.updateMany\",\"Game.updateManyAndReturn\",\"Game.upsertOne\",\"Game.deleteOne\",\"Game.deleteMany\",\"_avg\",\"_sum\",\"Game.groupBy\",\"Game.aggregate\",\"DailyPuzzle.findUnique\",\"DailyPuzzle.findUniqueOrThrow\",\"DailyPuzzle.findFirst\",\"DailyPuzzle.findFirstOrThrow\",\"DailyPuzzle.findMany\",\"DailyPuzzle.createOne\",\"DailyPuzzle.createMany\",\"DailyPuzzle.createManyAndReturn\",\"DailyPuzzle.updateOne\",\"DailyPuzzle.updateMany\",\"DailyPuzzle.updateManyAndReturn\",\"DailyPuzzle.upsertOne\",\"DailyPuzzle.deleteOne\",\"DailyPuzzle.deleteMany\",\"DailyPuzzle.groupBy\",\"DailyPuzzle.aggregate\",\"Room.findUnique\",\"Room.findUniqueOrThrow\",\"Room.findFirst\",\"Room.findFirstOrThrow\",\"Room.findMany\",\"Room.createOne\",\"Room.createMany\",\"Room.createManyAndReturn\",\"Room.updateOne\",\"Room.updateMany\",\"Room.updateManyAndReturn\",\"Room.upsertOne\",\"Room.deleteOne\",\"Room.deleteMany\",\"Room.groupBy\",\"Room.aggregate\",\"DailyResult.findUnique\",\"DailyResult.findUniqueOrThrow\",\"DailyResult.findFirst\",\"DailyResult.findFirstOrThrow\",\"DailyResult.findMany\",\"DailyResult.createOne\",\"DailyResult.createMany\",\"DailyResult.createManyAndReturn\",\"DailyResult.updateOne\",\"DailyResult.updateMany\",\"DailyResult.updateManyAndReturn\",\"DailyResult.upsertOne\",\"DailyResult.deleteOne\",\"DailyResult.deleteMany\",\"DailyResult.groupBy\",\"DailyResult.aggregate\",\"AND\",\"OR\",\"NOT\",\"id\",\"puzzleId\",\"userId\",\"path\",\"clicks\",\"timeSeconds\",\"won\",\"playedAt\",\"equals\",\"in\",\"notIn\",\"lt\",\"lte\",\"gt\",\"gte\",\"not\",\"contains\",\"startsWith\",\"endsWith\",\"code\",\"players\",\"phase\",\"round\",\"totalRounds\",\"maxPlayers\",\"gameMode\",\"searchAllowed\",\"timeLimit\",\"startArticle\",\"targetArticle\",\"roundWinner\",\"countdownStart\",\"roundStart\",\"createdAt\",\"updatedAt\",\"string_contains\",\"string_starts_with\",\"string_ends_with\",\"array_starts_with\",\"array_ends_with\",\"array_contains\",\"date\",\"every\",\"some\",\"none\",\"mode\",\"name\",\"email\",\"password\",\"banned\",\"puzzleId_userId\",\"is\",\"isNot\",\"connectOrCreate\",\"upsert\",\"createMany\",\"set\",\"disconnect\",\"delete\",\"connect\",\"updateMany\",\"deleteMany\",\"increment\",\"decrement\",\"multiply\",\"divide\"]"),
  graph: " "
}

async function decodeBase64AsWasm(wasmBase64: string): Promise<WebAssembly.Module> {
  const { Buffer } = await import('node:buffer')
  const wasmArray = Buffer.from(wasmBase64, 'base64')
  return new WebAssembly.Module(wasmArray)
}

config.compilerWasm = {
  getRuntime: async () => await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.mjs"),

  getQueryCompilerWasmModule: async () => {
    const { wasm } = await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.wasm-base64.mjs")
    return await decodeBase64AsWasm(wasm)
  },

  importName: "./query_compiler_fast_bg.js"
}



export type LogOptions<ClientOptions extends Prisma.PrismaClientOptions> =
  'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never

export interface PrismaClientConstructor {
    /**
   * ## Prisma Client
   * 
   * Type-safe database client for TypeScript
   * @example
   * ```
   * const prisma = new PrismaClient({
   *   adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
   * })
   * // Fetch zero or more Users
   * const users = await prisma.user.findMany()
   * ```
   * 
   * Read more in our [docs](https://pris.ly/d/client).
   */

  new <
    Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
    LogOpts extends LogOptions<Options> = LogOptions<Options>,
    OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'],
    ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
  >(options: Prisma.Subset<Options, Prisma.PrismaClientOptions> ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
}

/**
 * ## Prisma Client
 * 
 * Type-safe database client for TypeScript
 * @example
 * ```
 * const prisma = new PrismaClient({
 *   adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
 * })
 * // Fetch zero or more Users
 * const users = await prisma.user.findMany()
 * ```
 * 
 * Read more in our [docs](https://pris.ly/d/client).
 */

export interface PrismaClient<
  in LogOpts extends Prisma.LogLevel = never,
  in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = undefined,
  in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
> {
  [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }

  $on<V extends LogOpts>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;

  /**
   * Connect with the database
   */
  $connect(): runtime.Types.Utils.JsPromise<void>;

  /**
   * Disconnect from the database
   */
  $disconnect(): runtime.Types.Utils.JsPromise<void>;

/**
   * Executes a prepared raw query and returns the number of affected rows.
   * @example
   * ```
   * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
   * ```
   *
   * Read more in our [docs](https://pris.ly/d/raw-queries).
   */
  $executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;

  /**
   * Executes a raw query and returns the number of affected rows.
   * Susceptible to SQL injections, see documentation.
   * @example
   * ```
   * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
   * ```
   *
   * Read more in our [docs](https://pris.ly/d/raw-queries).
   */
  $executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;

  /**
   * Performs a prepared raw query and returns the `SELECT` data.
   * @example
   * ```
   * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
   * ```
   *
   * Read more in our [docs](https://pris.ly/d/raw-queries).
   */
  $queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;

  /**
   * Performs a raw query and returns the `SELECT` data.
   * Susceptible to SQL injections, see documentation.
   * @example
   * ```
   * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
   * ```
   *
   * Read more in our [docs](https://pris.ly/d/raw-queries).
   */
  $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;


  /**
   * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
   * @example
   * ```
   * const [george, bob, alice] = await prisma.$transaction([
   *   prisma.user.create({ data: { name: 'George' } }),
   *   prisma.user.create({ data: { name: 'Bob' } }),
   *   prisma.user.create({ data: { name: 'Alice' } }),
   * ])
   * ```
   * 
   * Read more in our [docs](https://www.prisma.io/docs/orm/prisma-client/queries/transactions).
   */
  $transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>

  $transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => runtime.Types.Utils.JsPromise<R>, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<R>

  $extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<OmitOpts>, ExtArgs, runtime.Types.Utils.Call<Prisma.TypeMapCb<OmitOpts>, {
    extArgs: ExtArgs
  }>>

      /**
   * `prisma.user`: Exposes CRUD operations for the **User** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Users
    * const users = await prisma.user.findMany()
    * ```
    */
  get user(): Prisma.UserDelegate<ExtArgs, { omit: OmitOpts }>;

  /**
   * `prisma.game`: Exposes CRUD operations for the **Game** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Games
    * const games = await prisma.game.findMany()
    * ```
    */
  get game(): Prisma.GameDelegate<ExtArgs, { omit: OmitOpts }>;

  /**
   * `prisma.dailyPuzzle`: Exposes CRUD operations for the **DailyPuzzle** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more DailyPuzzles
    * const dailyPuzzles = await prisma.dailyPuzzle.findMany()
    * ```
    */
  get dailyPuzzle(): Prisma.DailyPuzzleDelegate<ExtArgs, { omit: OmitOpts }>;

  /**
   * `prisma.room`: Exposes CRUD operations for the **Room** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Rooms
    * const rooms = await prisma.room.findMany()
    * ```
    */
  get room(): Prisma.RoomDelegate<ExtArgs, { omit: OmitOpts }>;

  /**
   * `prisma.dailyResult`: Exposes CRUD operations for the **DailyResult** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more DailyResults
    * const dailyResults = await prisma.dailyResult.findMany()
    * ```
    */
  get dailyResult(): Prisma.DailyResultDelegate<ExtArgs, { omit: OmitOpts }>;
}

export function getPrismaClientClass(): PrismaClientConstructor {
  return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor
}
