From 552bb17c155816a78de96085cb5247d57294d941 Mon Sep 17 00:00:00 2001 From: jessy-david-dev Date: Sat, 11 Apr 2026 17:37:56 +0200 Subject: [PATCH] feat(rooms): migrate multiplayer room storage from memory to PostgreSQL --- .gitignore | 1 + app/api/rooms/[code]/route.ts | 83 +- app/api/rooms/route.ts | 130 +- lib/generated/prisma/browser.ts | 5 + lib/generated/prisma/client.ts | 5 + lib/generated/prisma/commonInputTypes.ts | 274 ++++ lib/generated/prisma/internal/class.ts | 18 +- .../prisma/internal/prismaNamespace.ts | 149 +- .../prisma/internal/prismaNamespaceBrowser.ts | 44 + lib/generated/prisma/models.ts | 1 + lib/generated/prisma/models/Room.ts | 1461 +++++++++++++++++ prisma/schema.prisma | 16 + 12 files changed, 2103 insertions(+), 84 deletions(-) create mode 100644 lib/generated/prisma/models/Room.ts diff --git a/.gitignore b/.gitignore index 98e8a28..c075dd9 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ next-env.d.ts .claude/ *.db +*.sql diff --git a/app/api/rooms/[code]/route.ts b/app/api/rooms/[code]/route.ts index b41430a..5d8d83d 100644 --- a/app/api/rooms/[code]/route.ts +++ b/app/api/rooms/[code]/route.ts @@ -3,18 +3,36 @@ import { NextRequest } from "next/server"; import type { Room, Player } from "../route"; +import { prisma } from "../../../../lib/prisma"; -// Acces au singleton - -declare global { - var __wikirooms: Map | undefined; -} - -function getRooms(): Map { - if (!global.__wikirooms) { - global.__wikirooms = new Map(); - } - return global.__wikirooms; +function dbToRoom(row: { + code: string; + players: unknown; + phase: string; + round: number; + totalRounds: number; + maxPlayers: number; + startArticle: string; + targetArticle: string; + roundWinner: string | null; + countdownStart: bigint | null; + roundStart: bigint | null; + createdAt: bigint; +}): Room { + return { + code: row.code, + players: row.players as Player[], + phase: row.phase as Room["phase"], + round: row.round, + totalRounds: row.totalRounds, + maxPlayers: row.maxPlayers, + startArticle: row.startArticle, + targetArticle: row.targetArticle, + roundWinner: row.roundWinner, + countdownStart: row.countdownStart !== null ? Number(row.countdownStart) : null, + roundStart: row.roundStart !== null ? Number(row.roundStart) : null, + createdAt: Number(row.createdAt), + }; } function generatePlayerId(): string { @@ -24,11 +42,9 @@ function generatePlayerId(): string { // Timeout joueur inactif : 15s const PLAYER_TIMEOUT_MS = 15_000; -function prunePlayers(room: Room) { +function prunePlayers(players: Player[]): Player[] { const now = Date.now(); - room.players = room.players.filter( - (p) => now - p.lastSeen < PLAYER_TIMEOUT_MS, - ); + return players.filter((p) => now - p.lastSeen < PLAYER_TIMEOUT_MS); } // PATCH /api/rooms/[code] @@ -37,13 +53,14 @@ export async function PATCH( { params }: { params: Promise<{ code: string }> }, ) { const { code } = await params; - const rooms = getRooms(); - const room = rooms.get(code.toUpperCase()); + const row = await prisma.room.findUnique({ where: { code: code.toUpperCase() } }); - if (!room) { + if (!row) { return Response.json({ error: "Room introuvable" }, { status: 404 }); } + const room = dbToRoom(row); + const body = await request.json(); const { action, playerId, playerName, article, startArticle, targetArticle } = body as { @@ -56,7 +73,7 @@ export async function PATCH( }; // Nettoyer les joueurs inactifs avant chaque action - prunePlayers(room); + room.players = prunePlayers(room.players); switch (action) { // Rejoindre @@ -92,6 +109,7 @@ export async function PATCH( lastSeen: Date.now(), }; room.players.push(player); + await saveRoom(room); return Response.json({ room, playerId: newId }); } @@ -101,6 +119,7 @@ export async function PATCH( if (player) { player.lastSeen = Date.now(); } + await saveRoom(room); return Response.json({ room }); } @@ -144,6 +163,7 @@ export async function PATCH( p.hasWon = false; } + await saveRoom(room); return Response.json({ room }); } @@ -152,11 +172,11 @@ export async function PATCH( if (room.phase !== "countdown") { return Response.json({ room }); } - // On laisse les clients gerer le timing - le 1er qui appelle play apres 3s active const elapsed = Date.now() - (room.countdownStart ?? 0); if (elapsed >= 3000) { room.phase = "playing"; room.roundStart = Date.now(); + await saveRoom(room); } return Response.json({ room }); } @@ -177,7 +197,6 @@ export async function PATCH( player.currentArticle = article; player.lastSeen = Date.now(); - // Verifier si le joueur a atteint la cible const normalize = (s: string) => decodeURIComponent(s).replace(/_/g, " ").toLowerCase().trim(); @@ -187,7 +206,6 @@ export async function PATCH( ) { player.hasWon = true; - // 1er joueur a gagner = +10 points const alreadyWon = room.players.some( (p) => p.hasWon && p.id !== player.id, ); @@ -198,6 +216,7 @@ export async function PATCH( } } + await saveRoom(room); return Response.json({ room }); } @@ -218,6 +237,7 @@ export async function PATCH( p.hasWon = false; p.currentArticle = ""; } + await saveRoom(room); return Response.json({ room }); } @@ -240,6 +260,7 @@ export async function PATCH( p.hasWon = false; p.currentArticle = ""; } + await saveRoom(room); return Response.json({ room }); } @@ -247,3 +268,21 @@ export async function PATCH( return Response.json({ error: "Action inconnue" }, { status: 400 }); } } + +async function saveRoom(room: Room) { + await prisma.room.update({ + where: { code: room.code }, + data: { + players: room.players as object[], + phase: room.phase, + round: room.round, + totalRounds: room.totalRounds, + maxPlayers: room.maxPlayers, + startArticle: room.startArticle, + targetArticle: room.targetArticle, + roundWinner: room.roundWinner, + countdownStart: room.countdownStart !== null ? BigInt(room.countdownStart) : null, + roundStart: room.roundStart !== null ? BigInt(room.roundStart) : null, + }, + }); +} diff --git a/app/api/rooms/route.ts b/app/api/rooms/route.ts index 0376e4f..1b18ff5 100644 --- a/app/api/rooms/route.ts +++ b/app/api/rooms/route.ts @@ -2,6 +2,7 @@ // GET /api/rooms?code=XXXX - recuperer l'etat d'une room import { NextRequest } from "next/server"; +import { prisma } from "../../../lib/prisma"; // Types @@ -24,25 +25,12 @@ export type Room = { maxPlayers: number; startArticle: string; targetArticle: string; - roundWinner: string | null; // player id - countdownStart: number | null; // timestamp ms - roundStart: number | null; // timestamp ms + roundWinner: string | null; + countdownStart: number | null; + roundStart: number | null; createdAt: number; }; -// Stockage en memoire (singleton Node.js) - -declare global { - var __wikirooms: Map | undefined; -} - -function getRooms(): Map { - if (!global.__wikirooms) { - global.__wikirooms = new Map(); - } - return global.__wikirooms; -} - // Helpers function generateCode(): string { @@ -58,17 +46,41 @@ function generatePlayerId(): string { return crypto.randomUUID(); } -// Nettoie les rooms inactives depuis plus de 2h -function pruneOldRooms(rooms: Map) { - const now = Date.now(); - for (const [code, room] of rooms) { - if (now - room.createdAt > 2 * 60 * 60 * 1000) { - rooms.delete(code); - } - } +function dbToRoom(row: { + code: string; + players: unknown; + phase: string; + round: number; + totalRounds: number; + maxPlayers: number; + startArticle: string; + targetArticle: string; + roundWinner: string | null; + countdownStart: bigint | null; + roundStart: bigint | null; + createdAt: bigint; +}): Room { + return { + code: row.code, + players: row.players as Player[], + phase: row.phase as Room["phase"], + round: row.round, + totalRounds: row.totalRounds, + maxPlayers: row.maxPlayers, + startArticle: row.startArticle, + targetArticle: row.targetArticle, + roundWinner: row.roundWinner, + countdownStart: row.countdownStart !== null ? Number(row.countdownStart) : null, + roundStart: row.roundStart !== null ? Number(row.roundStart) : null, + createdAt: Number(row.createdAt), + }; } -// Handlers +// Nettoie les rooms inactives depuis plus de 2h +async function pruneOldRooms() { + const cutoff = BigInt(Date.now() - 2 * 60 * 60 * 1000); + await prisma.room.deleteMany({ where: { createdAt: { lt: cutoff } } }); +} // POST /api/rooms // Body: { playerName: string } @@ -98,46 +110,51 @@ export async function POST(request: NextRequest) { 10, ); - const rooms = getRooms(); - pruneOldRooms(rooms); + await pruneOldRooms(); // Generer un code unique let code = generateCode(); let attempts = 0; - while (rooms.has(code) && attempts < 20) { + while (attempts < 20) { + const existing = await prisma.room.findUnique({ where: { code } }); + if (!existing) break; code = generateCode(); attempts++; } const playerId = generatePlayerId(); + const now = BigInt(Date.now()); - const room: Room = { - code, - players: [ - { - id: playerId, - name: playerName.trim().slice(0, 20), - score: 0, - currentArticle: "", - hasWon: false, - isHost: true, - lastSeen: Date.now(), - }, - ], - phase: "waiting", - round: 0, - totalRounds: clampedRounds, - maxPlayers: clampedMax, - startArticle: "", - targetArticle: "", - roundWinner: null, - countdownStart: null, - roundStart: null, - createdAt: Date.now(), - }; + const players: Player[] = [ + { + id: playerId, + name: playerName.trim().slice(0, 20), + score: 0, + currentArticle: "", + hasWon: false, + isHost: true, + lastSeen: Date.now(), + }, + ]; - rooms.set(code, room); + const row = await prisma.room.create({ + data: { + code, + players: players as object[], + phase: "waiting", + round: 0, + totalRounds: clampedRounds, + maxPlayers: clampedMax, + startArticle: "", + targetArticle: "", + roundWinner: null, + countdownStart: null, + roundStart: null, + createdAt: now, + }, + }); + const room = dbToRoom(row); return Response.json({ room, playerId }); } @@ -150,12 +167,11 @@ export async function GET(request: NextRequest) { return Response.json({ error: "Code manquant" }, { status: 400 }); } - const rooms = getRooms(); - const room = rooms.get(code.toUpperCase()); + const row = await prisma.room.findUnique({ where: { code: code.toUpperCase() } }); - if (!room) { + if (!row) { return Response.json({ error: "Room introuvable" }, { status: 404 }); } - return Response.json({ room }); + return Response.json({ room: dbToRoom(row) }); } diff --git a/lib/generated/prisma/browser.ts b/lib/generated/prisma/browser.ts index e76e7ba..3562847 100644 --- a/lib/generated/prisma/browser.ts +++ b/lib/generated/prisma/browser.ts @@ -32,6 +32,11 @@ export type Game = Prisma.GameModel * */ export type DailyPuzzle = Prisma.DailyPuzzleModel +/** + * Model Room + * + */ +export type Room = Prisma.RoomModel /** * Model DailyResult * diff --git a/lib/generated/prisma/client.ts b/lib/generated/prisma/client.ts index 009bb85..83e1d98 100644 --- a/lib/generated/prisma/client.ts +++ b/lib/generated/prisma/client.ts @@ -56,6 +56,11 @@ export type Game = Prisma.GameModel * */ export type DailyPuzzle = Prisma.DailyPuzzleModel +/** + * Model Room + * + */ +export type Room = Prisma.RoomModel /** * Model DailyResult * diff --git a/lib/generated/prisma/commonInputTypes.ts b/lib/generated/prisma/commonInputTypes.ts index 716d3d6..fbd6ee9 100644 --- a/lib/generated/prisma/commonInputTypes.ts +++ b/lib/generated/prisma/commonInputTypes.ts @@ -139,6 +139,149 @@ export type FloatWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedFloatFilter<$PrismaModel> } +export type JsonFilter<$PrismaModel = never> = +| Prisma.PatchUndefined< + Prisma.Either>, Exclude>, 'path'>>, + Required> + > +| Prisma.OptionalFlat>, 'path'>> + +export type JsonFilterBase<$PrismaModel = never> = { + equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter + path?: string[] + mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel> + string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + lt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + lte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + gt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + gte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter +} + +export type StringNullableFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + mode?: Prisma.QueryMode + not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null +} + +export type BigIntNullableFilter<$PrismaModel = never> = { + equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> | null + in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> | null + notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> | null + lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + not?: Prisma.NestedBigIntNullableFilter<$PrismaModel> | bigint | number | null +} + +export type BigIntFilter<$PrismaModel = never> = { + equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> + notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> + lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + not?: Prisma.NestedBigIntFilter<$PrismaModel> | bigint | number +} + +export type SortOrderInput = { + sort: Prisma.SortOrder + nulls?: Prisma.NullsOrder +} + +export type JsonWithAggregatesFilter<$PrismaModel = never> = +| Prisma.PatchUndefined< + Prisma.Either>, Exclude>, 'path'>>, + Required> + > +| Prisma.OptionalFlat>, 'path'>> + +export type JsonWithAggregatesFilterBase<$PrismaModel = never> = { + equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter + path?: string[] + mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel> + string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + lt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + lte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + gt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + gte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedJsonFilter<$PrismaModel> + _max?: Prisma.NestedJsonFilter<$PrismaModel> +} + +export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + mode?: Prisma.QueryMode + not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedStringNullableFilter<$PrismaModel> + _max?: Prisma.NestedStringNullableFilter<$PrismaModel> +} + +export type BigIntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> | null + in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> | null + notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> | null + lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + not?: Prisma.NestedBigIntNullableWithAggregatesFilter<$PrismaModel> | bigint | number | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _avg?: Prisma.NestedFloatNullableFilter<$PrismaModel> + _sum?: Prisma.NestedBigIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedBigIntNullableFilter<$PrismaModel> + _max?: Prisma.NestedBigIntNullableFilter<$PrismaModel> +} + +export type BigIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> + notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> + lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + not?: Prisma.NestedBigIntWithAggregatesFilter<$PrismaModel> | bigint | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedBigIntFilter<$PrismaModel> + _min?: Prisma.NestedBigIntFilter<$PrismaModel> + _max?: Prisma.NestedBigIntFilter<$PrismaModel> +} + export type NestedStringFilter<$PrismaModel = never> = { equals?: string | Prisma.StringFieldRefInput<$PrismaModel> in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> @@ -262,4 +405,135 @@ export type NestedFloatWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedFloatFilter<$PrismaModel> } +export type NestedStringNullableFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null +} + +export type NestedBigIntNullableFilter<$PrismaModel = never> = { + equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> | null + in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> | null + notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> | null + lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + not?: Prisma.NestedBigIntNullableFilter<$PrismaModel> | bigint | number | null +} + +export type NestedBigIntFilter<$PrismaModel = never> = { + equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> + notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> + lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + not?: Prisma.NestedBigIntFilter<$PrismaModel> | bigint | number +} + +export type NestedJsonFilter<$PrismaModel = never> = +| Prisma.PatchUndefined< + Prisma.Either>, Exclude>, 'path'>>, + Required> + > +| Prisma.OptionalFlat>, 'path'>> + +export type NestedJsonFilterBase<$PrismaModel = never> = { + equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter + path?: string[] + mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel> + string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + lt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + lte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + gt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + gte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter +} + +export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedStringNullableFilter<$PrismaModel> + _max?: Prisma.NestedStringNullableFilter<$PrismaModel> +} + +export type NestedIntNullableFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null +} + +export type NestedBigIntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> | null + in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> | null + notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> | null + lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + not?: Prisma.NestedBigIntNullableWithAggregatesFilter<$PrismaModel> | bigint | number | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _avg?: Prisma.NestedFloatNullableFilter<$PrismaModel> + _sum?: Prisma.NestedBigIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedBigIntNullableFilter<$PrismaModel> + _max?: Prisma.NestedBigIntNullableFilter<$PrismaModel> +} + +export type NestedFloatNullableFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> | null + in?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> | null + notIn?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> | null + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatNullableFilter<$PrismaModel> | number | null +} + +export type NestedBigIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + in?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> + notIn?: bigint[] | number[] | Prisma.ListBigIntFieldRefInput<$PrismaModel> + lt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + lte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gt?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + gte?: bigint | number | Prisma.BigIntFieldRefInput<$PrismaModel> + not?: Prisma.NestedBigIntWithAggregatesFilter<$PrismaModel> | bigint | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedBigIntFilter<$PrismaModel> + _min?: Prisma.NestedBigIntFilter<$PrismaModel> + _max?: Prisma.NestedBigIntFilter<$PrismaModel> +} + diff --git a/lib/generated/prisma/internal/class.ts b/lib/generated/prisma/internal/class.ts index 4a513ad..f58ea89 100644 --- a/lib/generated/prisma/internal/class.ts +++ b/lib/generated/prisma/internal/class.ts @@ -20,7 +20,7 @@ const config: runtime.GetPrismaClientConfig = { "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 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", + "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 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": {}, @@ -32,10 +32,10 @@ const config: runtime.GetPrismaClientConfig = { } } -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},\"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.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\":\"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\",\"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\",\"date\",\"startArticle\",\"targetArticle\",\"every\",\"some\",\"none\",\"mode\",\"name\",\"email\",\"password\",\"banned\",\"createdAt\",\"puzzleId_userId\",\"is\",\"isNot\",\"connectOrCreate\",\"upsert\",\"createMany\",\"set\",\"disconnect\",\"delete\",\"connect\",\"updateMany\",\"deleteMany\",\"increment\",\"decrement\",\"multiply\",\"divide\"]"), - graph: "4wEnQAsEAACEAQAgCAAAfgAgUQAAgQEAMFIAABAAEFMAAIEBADBUAQAAAAFuAQB9ACFvAQAAAAFwAQB9ACFxIACCAQAhckAAgwEAIQEAAAABACAOAwAAigEAIFEAAIsBADBSAAADABBTAACLAQAwVAEAfQAhVgEAfQAhVwEAfQAhWAIAhwEAIVkIAIgBACFaIACCAQAhW0AAgwEAIWgBAH0AIWkBAH0AIW0BAH0AIQEDAADRAQAgDgMAAIoBACBRAACLAQAwUgAAAwAQUwAAiwEAMFQBAAAAAVYBAH0AIVcBAH0AIVgCAIcBACFZCACIAQAhWiAAggEAIVtAAIMBACFoAQB9ACFpAQB9ACFtAQB9ACEDAAAAAwAgAQAABAAwAgAABQAgDQMAAIoBACAHAACJAQAgUQAAhgEAMFIAAAcAEFMAAIYBADBUAQB9ACFVAQB9ACFWAQB9ACFXAQB9ACFYAgCHAQAhWQgAiAEAIVogAIIBACFbQACDAQAhAgMAANEBACAHAADQAQAgDgMAAIoBACAHAACJAQAgUQAAhgEAMFIAAAcAEFMAAIYBADBUAQAAAAFVAQB9ACFWAQB9ACFXAQB9ACFYAgCHAQAhWQgAiAEAIVogAIIBACFbQACDAQAhcwAAhQEAIAMAAAAHACABAAAIADACAAAJACADAAAABwAgAQAACAAwAgAACQAgAQAAAAcAIAEAAAADACABAAAABwAgAQAAAAEAIAsEAACEAQAgCAAAfgAgUQAAgQEAMFIAAB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bwEAkQEAIXABAJEBACFxIACUAQAhckAAlQEAIQMAAAA_ACAVAADcAQAgFgAA4wEAIAYAAAA_ACAOAADjAQAgVAEAkQEAIWcBAJEBACFoAQCRAQAhaQEAkQEAIQRUAQCRAQAhZwEAkQEAIWgBAJEBACFpAQCRAQAhAwQGAgYABggKAwEDAAECAwABBwAEAgULAwYABQEFDAACBA0ACA4AAAAAAwYACxsADBwADQAAAAMGAAsbAAwcAA0BAwABAQMAAQUGABIbABUcABYtABMuABQAAAAAAAUGABIbABUcABYtABMuABQAAAMGABsbABwcAB0AAAADBgAbGwAcHAAdAgMAAQcABAIDAAEHAAQFBgAiGwAlHAAmLQAjLgAkAAAAAAAFBgAiGwAlHAAmLQAjLgAkCQIBCg8BCxIBDBMBDRQBDxYBEBgHERkIEhsBEx0HFB4JFx8BGCABGSEHHSQKHiUOHyYCICcCISgCIikCIyoCJCwCJS4HJi8PJzECKDMHKTQQKjUCKzYCLDcHLzoRMDsXMT0EMj4EM0EENEIENUMENkUEN0cHOEgYOUoEOkwHO00ZPE4EPU8EPlAHP1MaQFQeQVUDQlYDQ1cDRFgDRVkDRlsDR10HSF4fSWADSmIHS2MgTGQDTWUDTmYHT2khUGon" + 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\",\"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: "mAIxUAsEAACxAQAgCAAArAEAIGEAAK8BADBiAAAQABBjAACvAQAwZAEAAAABggFAAKkBACGPAQEAowEAIZABAQAAAAGRAQEAowEAIZIBIACwAQAhAQAAAAEAIA4DAAC2AQAgYQAAtwEAMGIAAAMAEGMAALcBADBkAQCjAQAhZgEAowEAIWcBAKMBACFoAgClAQAhaQgAtAEAIWogALABACFrQACpAQAhfQEAowEAIX4BAKMBACGOAQEAowEAIQEDAACGAgAgDgMAALYBACBhAAC3AQAwYgAAAwAQYwAAtwEAMGQBAAAAAWYBAKMBACFnAQCjAQAhaAIApQEAIWkIALQBACFqIACwAQAha0AAqQEAIX0BAKMBACF-AQCjAQAhjgEBAKMBACEDAAAAAwAgAQAABAAwAgAABQAgDQMAALYBACAHAAC1AQAgYQAAswEAMGIAAAcAEGMAALMBADBkAQCjAQAhZQEAowEAIWYBAKMBACFnAQCjAQAhaAIApQEAIWkIALQBACFqIACwAQAha0AAqQEAIQIDAACGAgAgBwAAhQIAIA4DAAC2AQAgBwAAtQEAIGEAALMBADBiAAAHABBjAACzAQAwZAEAAAABZQEAowEAIWYBAKMBACFnAQCjAQAhaAIApQEAIWkIALQBACFqIACwAQAha0AAqQEAIZMBAACyAQAgAwAAAAcAIAEAAAgAMAIAAAkAIAMAAAAHACABAAAIADACAAAJACABAAAABwAgAQAAAAMAIAEAAAAHACABAAAAAQAgCwQAALEBACAIAACsAQAgYQAArwEAMGIAABAAEGMAAK8BADBkAQCjAQAh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ETA7FzE9BDI-BDNBBDRCBDVDBDZFBDdHBzhIGDlKBDpMBztNGTxOBD1PBD5QBz9TGkBUHkFWH0JXH0NaH0RbH0VcH0ZeH0dgB0hhIEljH0plB0tmIUxnH01oH05pB09sIlBtKFFuA1JvA1NwA1RxA1VyA1Z0A1d2B1h3KVl5A1p7B1t8Klx9A11-A15_B1-CAStggwEx" } async function decodeBase64AsWasm(wasmBase64: string): Promise { @@ -218,6 +218,16 @@ export interface PrismaClient< */ get dailyPuzzle(): Prisma.DailyPuzzleDelegate; + /** + * `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; + /** * `prisma.dailyResult`: Exposes CRUD operations for the **DailyResult** model. * Example usage: diff --git a/lib/generated/prisma/internal/prismaNamespace.ts b/lib/generated/prisma/internal/prismaNamespace.ts index 16cdc39..b1045c0 100644 --- a/lib/generated/prisma/internal/prismaNamespace.ts +++ b/lib/generated/prisma/internal/prismaNamespace.ts @@ -387,6 +387,7 @@ export const ModelName = { User: 'User', Game: 'Game', DailyPuzzle: 'DailyPuzzle', + Room: 'Room', DailyResult: 'DailyResult' } as const @@ -403,7 +404,7 @@ export type TypeMap + fields: Prisma.RoomFieldRefs + operations: { + findUnique: { + args: Prisma.RoomFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.RoomFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.RoomFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.RoomFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.RoomFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.RoomCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.RoomCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.RoomCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.RoomDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.RoomUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.RoomDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.RoomUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.RoomUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.RoomUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.RoomAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.RoomGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.RoomCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } DailyResult: { payload: Prisma.$DailyResultPayload fields: Prisma.DailyResultFieldRefs @@ -780,6 +855,25 @@ export const DailyPuzzleScalarFieldEnum = { export type DailyPuzzleScalarFieldEnum = (typeof DailyPuzzleScalarFieldEnum)[keyof typeof DailyPuzzleScalarFieldEnum] +export const RoomScalarFieldEnum = { + code: 'code', + players: 'players', + phase: 'phase', + round: 'round', + totalRounds: 'totalRounds', + maxPlayers: 'maxPlayers', + startArticle: 'startArticle', + targetArticle: 'targetArticle', + roundWinner: 'roundWinner', + countdownStart: 'countdownStart', + roundStart: 'roundStart', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type RoomScalarFieldEnum = (typeof RoomScalarFieldEnum)[keyof typeof RoomScalarFieldEnum] + + export const DailyResultScalarFieldEnum = { id: 'id', puzzleId: 'puzzleId', @@ -802,6 +896,13 @@ export const SortOrder = { export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] +export const JsonNullValueInput = { + JsonNull: JsonNull +} as const + +export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput] + + export const QueryMode = { default: 'default', insensitive: 'insensitive' @@ -810,6 +911,23 @@ export const QueryMode = { export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] +export const JsonNullValueFilter = { + DbNull: DbNull, + JsonNull: JsonNull, + AnyNull: AnyNull +} as const + +export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter] + + +export const NullsOrder = { + first: 'first', + last: 'last' +} as const + +export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + /** * Field references @@ -878,6 +996,34 @@ export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, ' export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> + +/** + * Reference to a field of type 'Json' + */ +export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'> + + + +/** + * Reference to a field of type 'QueryMode' + */ +export type EnumQueryModeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'QueryMode'> + + + +/** + * Reference to a field of type 'BigInt' + */ +export type BigIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'BigInt'> + + + +/** + * Reference to a field of type 'BigInt[]' + */ +export type ListBigIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'BigInt[]'> + + /** * Batch Payload for updateMany & deleteMany & createMany */ @@ -976,6 +1122,7 @@ export type GlobalOmitConfig = { user?: Prisma.UserOmit game?: Prisma.GameOmit dailyPuzzle?: Prisma.DailyPuzzleOmit + room?: Prisma.RoomOmit dailyResult?: Prisma.DailyResultOmit } diff --git a/lib/generated/prisma/internal/prismaNamespaceBrowser.ts b/lib/generated/prisma/internal/prismaNamespaceBrowser.ts index 5eee5e5..f189461 100644 --- a/lib/generated/prisma/internal/prismaNamespaceBrowser.ts +++ b/lib/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -54,6 +54,7 @@ export const ModelName = { User: 'User', Game: 'Game', DailyPuzzle: 'DailyPuzzle', + Room: 'Room', DailyResult: 'DailyResult' } as const @@ -111,6 +112,25 @@ export const DailyPuzzleScalarFieldEnum = { export type DailyPuzzleScalarFieldEnum = (typeof DailyPuzzleScalarFieldEnum)[keyof typeof DailyPuzzleScalarFieldEnum] +export const RoomScalarFieldEnum = { + code: 'code', + players: 'players', + phase: 'phase', + round: 'round', + totalRounds: 'totalRounds', + maxPlayers: 'maxPlayers', + startArticle: 'startArticle', + targetArticle: 'targetArticle', + roundWinner: 'roundWinner', + countdownStart: 'countdownStart', + roundStart: 'roundStart', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type RoomScalarFieldEnum = (typeof RoomScalarFieldEnum)[keyof typeof RoomScalarFieldEnum] + + export const DailyResultScalarFieldEnum = { id: 'id', puzzleId: 'puzzleId', @@ -133,6 +153,13 @@ export const SortOrder = { export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] +export const JsonNullValueInput = { + JsonNull: JsonNull +} as const + +export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput] + + export const QueryMode = { default: 'default', insensitive: 'insensitive' @@ -140,3 +167,20 @@ export const QueryMode = { export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + +export const JsonNullValueFilter = { + DbNull: DbNull, + JsonNull: JsonNull, + AnyNull: AnyNull +} as const + +export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter] + + +export const NullsOrder = { + first: 'first', + last: 'last' +} as const + +export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + diff --git a/lib/generated/prisma/models.ts b/lib/generated/prisma/models.ts index 0d11a74..b5e6135 100644 --- a/lib/generated/prisma/models.ts +++ b/lib/generated/prisma/models.ts @@ -11,5 +11,6 @@ export type * from './models/User' export type * from './models/Game' export type * from './models/DailyPuzzle' +export type * from './models/Room' export type * from './models/DailyResult' export type * from './commonInputTypes' \ No newline at end of file diff --git a/lib/generated/prisma/models/Room.ts b/lib/generated/prisma/models/Room.ts new file mode 100644 index 0000000..7150a69 --- /dev/null +++ b/lib/generated/prisma/models/Room.ts @@ -0,0 +1,1461 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Room` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Room + * + */ +export type RoomModel = runtime.Types.Result.DefaultSelection + +export type AggregateRoom = { + _count: RoomCountAggregateOutputType | null + _avg: RoomAvgAggregateOutputType | null + _sum: RoomSumAggregateOutputType | null + _min: RoomMinAggregateOutputType | null + _max: RoomMaxAggregateOutputType | null +} + +export type RoomAvgAggregateOutputType = { + round: number | null + totalRounds: number | null + maxPlayers: number | null + countdownStart: number | null + roundStart: number | null + createdAt: number | null +} + +export type RoomSumAggregateOutputType = { + round: number | null + totalRounds: number | null + maxPlayers: number | null + countdownStart: bigint | null + roundStart: bigint | null + createdAt: bigint | null +} + +export type RoomMinAggregateOutputType = { + code: string | null + phase: string | null + round: number | null + totalRounds: number | null + maxPlayers: number | null + startArticle: string | null + targetArticle: string | null + roundWinner: string | null + countdownStart: bigint | null + roundStart: bigint | null + createdAt: bigint | null + updatedAt: Date | null +} + +export type RoomMaxAggregateOutputType = { + code: string | null + phase: string | null + round: number | null + totalRounds: number | null + maxPlayers: number | null + startArticle: string | null + targetArticle: string | null + roundWinner: string | null + countdownStart: bigint | null + roundStart: bigint | null + createdAt: bigint | null + updatedAt: Date | null +} + +export type RoomCountAggregateOutputType = { + code: number + players: number + phase: number + round: number + totalRounds: number + maxPlayers: number + startArticle: number + targetArticle: number + roundWinner: number + countdownStart: number + roundStart: number + createdAt: number + updatedAt: number + _all: number +} + + +export type RoomAvgAggregateInputType = { + round?: true + totalRounds?: true + maxPlayers?: true + countdownStart?: true + roundStart?: true + createdAt?: true +} + +export type RoomSumAggregateInputType = { + round?: true + totalRounds?: true + maxPlayers?: true + countdownStart?: true + roundStart?: true + createdAt?: true +} + +export type RoomMinAggregateInputType = { + code?: true + phase?: true + round?: true + totalRounds?: true + maxPlayers?: true + startArticle?: true + targetArticle?: true + roundWinner?: true + countdownStart?: true + roundStart?: true + createdAt?: true + updatedAt?: true +} + +export type RoomMaxAggregateInputType = { + code?: true + phase?: true + round?: true + totalRounds?: true + maxPlayers?: true + startArticle?: true + targetArticle?: true + roundWinner?: true + countdownStart?: true + roundStart?: true + createdAt?: true + updatedAt?: true +} + +export type RoomCountAggregateInputType = { + code?: true + players?: true + phase?: true + round?: true + totalRounds?: true + maxPlayers?: true + startArticle?: true + targetArticle?: true + roundWinner?: true + countdownStart?: true + roundStart?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type RoomAggregateArgs = { + /** + * Filter which Room to aggregate. + */ + where?: Prisma.RoomWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Rooms to fetch. + */ + orderBy?: Prisma.RoomOrderByWithRelationInput | Prisma.RoomOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.RoomWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Rooms from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Rooms. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Rooms + **/ + _count?: true | RoomCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: RoomAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: RoomSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: RoomMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: RoomMaxAggregateInputType +} + +export type GetRoomAggregateType = { + [P in keyof T & keyof AggregateRoom]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type RoomGroupByArgs = { + where?: Prisma.RoomWhereInput + orderBy?: Prisma.RoomOrderByWithAggregationInput | Prisma.RoomOrderByWithAggregationInput[] + by: Prisma.RoomScalarFieldEnum[] | Prisma.RoomScalarFieldEnum + having?: Prisma.RoomScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: RoomCountAggregateInputType | true + _avg?: RoomAvgAggregateInputType + _sum?: RoomSumAggregateInputType + _min?: RoomMinAggregateInputType + _max?: RoomMaxAggregateInputType +} + +export type RoomGroupByOutputType = { + code: string + players: runtime.JsonValue + phase: string + round: number + totalRounds: number + maxPlayers: number + startArticle: string + targetArticle: string + roundWinner: string | null + countdownStart: bigint | null + roundStart: bigint | null + createdAt: bigint + updatedAt: Date + _count: RoomCountAggregateOutputType | null + _avg: RoomAvgAggregateOutputType | null + _sum: RoomSumAggregateOutputType | null + _min: RoomMinAggregateOutputType | null + _max: RoomMaxAggregateOutputType | null +} + +export type GetRoomGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof RoomGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type RoomWhereInput = { + AND?: Prisma.RoomWhereInput | Prisma.RoomWhereInput[] + OR?: Prisma.RoomWhereInput[] + NOT?: Prisma.RoomWhereInput | Prisma.RoomWhereInput[] + code?: Prisma.StringFilter<"Room"> | string + players?: Prisma.JsonFilter<"Room"> + phase?: Prisma.StringFilter<"Room"> | string + round?: Prisma.IntFilter<"Room"> | number + totalRounds?: Prisma.IntFilter<"Room"> | number + maxPlayers?: Prisma.IntFilter<"Room"> | number + startArticle?: Prisma.StringFilter<"Room"> | string + targetArticle?: Prisma.StringFilter<"Room"> | string + roundWinner?: Prisma.StringNullableFilter<"Room"> | string | null + countdownStart?: Prisma.BigIntNullableFilter<"Room"> | bigint | number | null + roundStart?: Prisma.BigIntNullableFilter<"Room"> | bigint | number | null + createdAt?: Prisma.BigIntFilter<"Room"> | bigint | number + updatedAt?: Prisma.DateTimeFilter<"Room"> | Date | string +} + +export type RoomOrderByWithRelationInput = { + code?: Prisma.SortOrder + players?: Prisma.SortOrder + phase?: Prisma.SortOrder + round?: Prisma.SortOrder + totalRounds?: Prisma.SortOrder + maxPlayers?: Prisma.SortOrder + startArticle?: Prisma.SortOrder + targetArticle?: Prisma.SortOrder + roundWinner?: Prisma.SortOrderInput | Prisma.SortOrder + countdownStart?: Prisma.SortOrderInput | Prisma.SortOrder + roundStart?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type RoomWhereUniqueInput = Prisma.AtLeast<{ + code?: string + AND?: Prisma.RoomWhereInput | Prisma.RoomWhereInput[] + OR?: Prisma.RoomWhereInput[] + NOT?: Prisma.RoomWhereInput | Prisma.RoomWhereInput[] + players?: Prisma.JsonFilter<"Room"> + phase?: Prisma.StringFilter<"Room"> | string + round?: Prisma.IntFilter<"Room"> | number + totalRounds?: Prisma.IntFilter<"Room"> | number + maxPlayers?: Prisma.IntFilter<"Room"> | number + startArticle?: Prisma.StringFilter<"Room"> | string + targetArticle?: Prisma.StringFilter<"Room"> | string + roundWinner?: Prisma.StringNullableFilter<"Room"> | string | null + countdownStart?: Prisma.BigIntNullableFilter<"Room"> | bigint | number | null + roundStart?: Prisma.BigIntNullableFilter<"Room"> | bigint | number | null + createdAt?: Prisma.BigIntFilter<"Room"> | bigint | number + updatedAt?: Prisma.DateTimeFilter<"Room"> | Date | string +}, "code"> + +export type RoomOrderByWithAggregationInput = { + code?: Prisma.SortOrder + players?: Prisma.SortOrder + phase?: Prisma.SortOrder + round?: Prisma.SortOrder + totalRounds?: Prisma.SortOrder + maxPlayers?: Prisma.SortOrder + startArticle?: Prisma.SortOrder + targetArticle?: Prisma.SortOrder + roundWinner?: Prisma.SortOrderInput | Prisma.SortOrder + countdownStart?: Prisma.SortOrderInput | Prisma.SortOrder + roundStart?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.RoomCountOrderByAggregateInput + _avg?: Prisma.RoomAvgOrderByAggregateInput + _max?: Prisma.RoomMaxOrderByAggregateInput + _min?: Prisma.RoomMinOrderByAggregateInput + _sum?: Prisma.RoomSumOrderByAggregateInput +} + +export type RoomScalarWhereWithAggregatesInput = { + AND?: Prisma.RoomScalarWhereWithAggregatesInput | Prisma.RoomScalarWhereWithAggregatesInput[] + OR?: Prisma.RoomScalarWhereWithAggregatesInput[] + NOT?: Prisma.RoomScalarWhereWithAggregatesInput | Prisma.RoomScalarWhereWithAggregatesInput[] + code?: Prisma.StringWithAggregatesFilter<"Room"> | string + players?: Prisma.JsonWithAggregatesFilter<"Room"> + phase?: Prisma.StringWithAggregatesFilter<"Room"> | string + round?: Prisma.IntWithAggregatesFilter<"Room"> | number + totalRounds?: Prisma.IntWithAggregatesFilter<"Room"> | number + maxPlayers?: Prisma.IntWithAggregatesFilter<"Room"> | number + startArticle?: Prisma.StringWithAggregatesFilter<"Room"> | string + targetArticle?: Prisma.StringWithAggregatesFilter<"Room"> | string + roundWinner?: Prisma.StringNullableWithAggregatesFilter<"Room"> | string | null + countdownStart?: Prisma.BigIntNullableWithAggregatesFilter<"Room"> | bigint | number | null + roundStart?: Prisma.BigIntNullableWithAggregatesFilter<"Room"> | bigint | number | null + createdAt?: Prisma.BigIntWithAggregatesFilter<"Room"> | bigint | number + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Room"> | Date | string +} + +export type RoomCreateInput = { + code: string + players?: Prisma.JsonNullValueInput | runtime.InputJsonValue + phase?: string + round?: number + totalRounds?: number + maxPlayers?: number + startArticle?: string + targetArticle?: string + roundWinner?: string | null + countdownStart?: bigint | number | null + roundStart?: bigint | number | null + createdAt: bigint | number + updatedAt?: Date | string +} + +export type RoomUncheckedCreateInput = { + code: string + players?: Prisma.JsonNullValueInput | runtime.InputJsonValue + phase?: string + round?: number + totalRounds?: number + maxPlayers?: number + startArticle?: string + targetArticle?: string + roundWinner?: string | null + countdownStart?: bigint | number | null + roundStart?: bigint | number | null + createdAt: bigint | number + updatedAt?: Date | string +} + +export type RoomUpdateInput = { + code?: Prisma.StringFieldUpdateOperationsInput | string + players?: Prisma.JsonNullValueInput | runtime.InputJsonValue + phase?: Prisma.StringFieldUpdateOperationsInput | string + round?: Prisma.IntFieldUpdateOperationsInput | number + totalRounds?: Prisma.IntFieldUpdateOperationsInput | number + maxPlayers?: Prisma.IntFieldUpdateOperationsInput | number + startArticle?: Prisma.StringFieldUpdateOperationsInput | string + targetArticle?: Prisma.StringFieldUpdateOperationsInput | string + roundWinner?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + countdownStart?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null + roundStart?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null + createdAt?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type RoomUncheckedUpdateInput = { + code?: Prisma.StringFieldUpdateOperationsInput | string + players?: Prisma.JsonNullValueInput | runtime.InputJsonValue + phase?: Prisma.StringFieldUpdateOperationsInput | string + round?: Prisma.IntFieldUpdateOperationsInput | number + totalRounds?: Prisma.IntFieldUpdateOperationsInput | number + maxPlayers?: Prisma.IntFieldUpdateOperationsInput | number + startArticle?: Prisma.StringFieldUpdateOperationsInput | string + targetArticle?: Prisma.StringFieldUpdateOperationsInput | string + roundWinner?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + countdownStart?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null + roundStart?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null + createdAt?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type RoomCreateManyInput = { + code: string + players?: Prisma.JsonNullValueInput | runtime.InputJsonValue + phase?: string + round?: number + totalRounds?: number + maxPlayers?: number + startArticle?: string + targetArticle?: string + roundWinner?: string | null + countdownStart?: bigint | number | null + roundStart?: bigint | number | null + createdAt: bigint | number + updatedAt?: Date | string +} + +export type RoomUpdateManyMutationInput = { + code?: Prisma.StringFieldUpdateOperationsInput | string + players?: Prisma.JsonNullValueInput | runtime.InputJsonValue + phase?: Prisma.StringFieldUpdateOperationsInput | string + round?: Prisma.IntFieldUpdateOperationsInput | number + totalRounds?: Prisma.IntFieldUpdateOperationsInput | number + maxPlayers?: Prisma.IntFieldUpdateOperationsInput | number + startArticle?: Prisma.StringFieldUpdateOperationsInput | string + targetArticle?: Prisma.StringFieldUpdateOperationsInput | string + roundWinner?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + countdownStart?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null + roundStart?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null + createdAt?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type RoomUncheckedUpdateManyInput = { + code?: Prisma.StringFieldUpdateOperationsInput | string + players?: Prisma.JsonNullValueInput | runtime.InputJsonValue + phase?: Prisma.StringFieldUpdateOperationsInput | string + round?: Prisma.IntFieldUpdateOperationsInput | number + totalRounds?: Prisma.IntFieldUpdateOperationsInput | number + maxPlayers?: Prisma.IntFieldUpdateOperationsInput | number + startArticle?: Prisma.StringFieldUpdateOperationsInput | string + targetArticle?: Prisma.StringFieldUpdateOperationsInput | string + roundWinner?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + countdownStart?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null + roundStart?: Prisma.NullableBigIntFieldUpdateOperationsInput | bigint | number | null + createdAt?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type RoomCountOrderByAggregateInput = { + code?: Prisma.SortOrder + players?: Prisma.SortOrder + phase?: Prisma.SortOrder + round?: Prisma.SortOrder + totalRounds?: Prisma.SortOrder + maxPlayers?: Prisma.SortOrder + startArticle?: Prisma.SortOrder + targetArticle?: Prisma.SortOrder + roundWinner?: Prisma.SortOrder + countdownStart?: Prisma.SortOrder + roundStart?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type RoomAvgOrderByAggregateInput = { + round?: Prisma.SortOrder + totalRounds?: Prisma.SortOrder + maxPlayers?: Prisma.SortOrder + countdownStart?: Prisma.SortOrder + roundStart?: Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type RoomMaxOrderByAggregateInput = { + code?: Prisma.SortOrder + phase?: Prisma.SortOrder + round?: Prisma.SortOrder + totalRounds?: Prisma.SortOrder + maxPlayers?: Prisma.SortOrder + startArticle?: Prisma.SortOrder + targetArticle?: Prisma.SortOrder + roundWinner?: Prisma.SortOrder + countdownStart?: Prisma.SortOrder + roundStart?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type RoomMinOrderByAggregateInput = { + code?: Prisma.SortOrder + phase?: Prisma.SortOrder + round?: Prisma.SortOrder + totalRounds?: Prisma.SortOrder + maxPlayers?: Prisma.SortOrder + startArticle?: Prisma.SortOrder + targetArticle?: Prisma.SortOrder + roundWinner?: Prisma.SortOrder + countdownStart?: Prisma.SortOrder + roundStart?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type RoomSumOrderByAggregateInput = { + round?: Prisma.SortOrder + totalRounds?: Prisma.SortOrder + maxPlayers?: Prisma.SortOrder + countdownStart?: Prisma.SortOrder + roundStart?: Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type NullableStringFieldUpdateOperationsInput = { + set?: string | null +} + +export type NullableBigIntFieldUpdateOperationsInput = { + set?: bigint | number | null + increment?: bigint | number + decrement?: bigint | number + multiply?: bigint | number + divide?: bigint | number +} + +export type BigIntFieldUpdateOperationsInput = { + set?: bigint | number + increment?: bigint | number + decrement?: bigint | number + multiply?: bigint | number + divide?: bigint | number +} + + + +export type RoomSelect = runtime.Types.Extensions.GetSelect<{ + code?: boolean + players?: boolean + phase?: boolean + round?: boolean + totalRounds?: boolean + maxPlayers?: boolean + startArticle?: boolean + targetArticle?: boolean + roundWinner?: boolean + countdownStart?: boolean + roundStart?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["room"]> + +export type RoomSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + code?: boolean + players?: boolean + phase?: boolean + round?: boolean + totalRounds?: boolean + maxPlayers?: boolean + startArticle?: boolean + targetArticle?: boolean + roundWinner?: boolean + countdownStart?: boolean + roundStart?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["room"]> + +export type RoomSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + code?: boolean + players?: boolean + phase?: boolean + round?: boolean + totalRounds?: boolean + maxPlayers?: boolean + startArticle?: boolean + targetArticle?: boolean + roundWinner?: boolean + countdownStart?: boolean + roundStart?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["room"]> + +export type RoomSelectScalar = { + code?: boolean + players?: boolean + phase?: boolean + round?: boolean + totalRounds?: boolean + maxPlayers?: boolean + startArticle?: boolean + targetArticle?: boolean + roundWinner?: boolean + countdownStart?: boolean + roundStart?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type RoomOmit = runtime.Types.Extensions.GetOmit<"code" | "players" | "phase" | "round" | "totalRounds" | "maxPlayers" | "startArticle" | "targetArticle" | "roundWinner" | "countdownStart" | "roundStart" | "createdAt" | "updatedAt", ExtArgs["result"]["room"]> + +export type $RoomPayload = { + name: "Room" + objects: {} + scalars: runtime.Types.Extensions.GetPayloadResult<{ + code: string + players: runtime.JsonValue + phase: string + round: number + totalRounds: number + maxPlayers: number + startArticle: string + targetArticle: string + roundWinner: string | null + countdownStart: bigint | null + roundStart: bigint | null + createdAt: bigint + updatedAt: Date + }, ExtArgs["result"]["room"]> + composites: {} +} + +export type RoomGetPayload = runtime.Types.Result.GetResult + +export type RoomCountArgs = + Omit & { + select?: RoomCountAggregateInputType | true + } + +export interface RoomDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Room'], meta: { name: 'Room' } } + /** + * Find zero or one Room that matches the filter. + * @param {RoomFindUniqueArgs} args - Arguments to find a Room + * @example + * // Get one Room + * const room = await prisma.room.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__RoomClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Room that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {RoomFindUniqueOrThrowArgs} args - Arguments to find a Room + * @example + * // Get one Room + * const room = await prisma.room.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__RoomClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Room that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {RoomFindFirstArgs} args - Arguments to find a Room + * @example + * // Get one Room + * const room = await prisma.room.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__RoomClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Room that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {RoomFindFirstOrThrowArgs} args - Arguments to find a Room + * @example + * // Get one Room + * const room = await prisma.room.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__RoomClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Rooms that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {RoomFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Rooms + * const rooms = await prisma.room.findMany() + * + * // Get first 10 Rooms + * const rooms = await prisma.room.findMany({ take: 10 }) + * + * // Only select the `code` + * const roomWithCodeOnly = await prisma.room.findMany({ select: { code: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Room. + * @param {RoomCreateArgs} args - Arguments to create a Room. + * @example + * // Create one Room + * const Room = await prisma.room.create({ + * data: { + * // ... data to create a Room + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__RoomClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Rooms. + * @param {RoomCreateManyArgs} args - Arguments to create many Rooms. + * @example + * // Create many Rooms + * const room = await prisma.room.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Rooms and returns the data saved in the database. + * @param {RoomCreateManyAndReturnArgs} args - Arguments to create many Rooms. + * @example + * // Create many Rooms + * const room = await prisma.room.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Rooms and only return the `code` + * const roomWithCodeOnly = await prisma.room.createManyAndReturn({ + * select: { code: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Room. + * @param {RoomDeleteArgs} args - Arguments to delete one Room. + * @example + * // Delete one Room + * const Room = await prisma.room.delete({ + * where: { + * // ... filter to delete one Room + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__RoomClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Room. + * @param {RoomUpdateArgs} args - Arguments to update one Room. + * @example + * // Update one Room + * const room = await prisma.room.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__RoomClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Rooms. + * @param {RoomDeleteManyArgs} args - Arguments to filter Rooms to delete. + * @example + * // Delete a few Rooms + * const { count } = await prisma.room.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Rooms. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {RoomUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Rooms + * const room = await prisma.room.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Rooms and returns the data updated in the database. + * @param {RoomUpdateManyAndReturnArgs} args - Arguments to update many Rooms. + * @example + * // Update many Rooms + * const room = await prisma.room.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Rooms and only return the `code` + * const roomWithCodeOnly = await prisma.room.updateManyAndReturn({ + * select: { code: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Room. + * @param {RoomUpsertArgs} args - Arguments to update or create a Room. + * @example + * // Update or create a Room + * const room = await prisma.room.upsert({ + * create: { + * // ... data to create a Room + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Room we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__RoomClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Rooms. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {RoomCountArgs} args - Arguments to filter Rooms to count. + * @example + * // Count the number of Rooms + * const count = await prisma.room.count({ + * where: { + * // ... the filter for the Rooms we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Room. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {RoomAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Room. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {RoomGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends RoomGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: RoomGroupByArgs['orderBy'] } + : { orderBy?: RoomGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetRoomGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Room model + */ +readonly fields: RoomFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Room. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ +export interface Prisma__RoomClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Room model + */ +export interface RoomFieldRefs { + readonly code: Prisma.FieldRef<"Room", 'String'> + readonly players: Prisma.FieldRef<"Room", 'Json'> + readonly phase: Prisma.FieldRef<"Room", 'String'> + readonly round: Prisma.FieldRef<"Room", 'Int'> + readonly totalRounds: Prisma.FieldRef<"Room", 'Int'> + readonly maxPlayers: Prisma.FieldRef<"Room", 'Int'> + readonly startArticle: Prisma.FieldRef<"Room", 'String'> + readonly targetArticle: Prisma.FieldRef<"Room", 'String'> + readonly roundWinner: Prisma.FieldRef<"Room", 'String'> + readonly countdownStart: Prisma.FieldRef<"Room", 'BigInt'> + readonly roundStart: Prisma.FieldRef<"Room", 'BigInt'> + readonly createdAt: Prisma.FieldRef<"Room", 'BigInt'> + readonly updatedAt: Prisma.FieldRef<"Room", 'DateTime'> +} + + +// Custom InputTypes +/** + * Room findUnique + */ +export type RoomFindUniqueArgs = { + /** + * Select specific fields to fetch from the Room + */ + select?: Prisma.RoomSelect | null + /** + * Omit specific fields from the Room + */ + omit?: Prisma.RoomOmit | null + /** + * Filter, which Room to fetch. + */ + where: Prisma.RoomWhereUniqueInput +} + +/** + * Room findUniqueOrThrow + */ +export type RoomFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Room + */ + select?: Prisma.RoomSelect | null + /** + * Omit specific fields from the Room + */ + omit?: Prisma.RoomOmit | null + /** + * Filter, which Room to fetch. + */ + where: Prisma.RoomWhereUniqueInput +} + +/** + * Room findFirst + */ +export type RoomFindFirstArgs = { + /** + * Select specific fields to fetch from the Room + */ + select?: Prisma.RoomSelect | null + /** + * Omit specific fields from the Room + */ + omit?: Prisma.RoomOmit | null + /** + * Filter, which Room to fetch. + */ + where?: Prisma.RoomWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Rooms to fetch. + */ + orderBy?: Prisma.RoomOrderByWithRelationInput | Prisma.RoomOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Rooms. + */ + cursor?: Prisma.RoomWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Rooms from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Rooms. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Rooms. + */ + distinct?: Prisma.RoomScalarFieldEnum | Prisma.RoomScalarFieldEnum[] +} + +/** + * Room findFirstOrThrow + */ +export type RoomFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Room + */ + select?: Prisma.RoomSelect | null + /** + * Omit specific fields from the Room + */ + omit?: Prisma.RoomOmit | null + /** + * Filter, which Room to fetch. + */ + where?: Prisma.RoomWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Rooms to fetch. + */ + orderBy?: Prisma.RoomOrderByWithRelationInput | Prisma.RoomOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Rooms. + */ + cursor?: Prisma.RoomWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Rooms from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Rooms. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Rooms. + */ + distinct?: Prisma.RoomScalarFieldEnum | Prisma.RoomScalarFieldEnum[] +} + +/** + * Room findMany + */ +export type RoomFindManyArgs = { + /** + * Select specific fields to fetch from the Room + */ + select?: Prisma.RoomSelect | null + /** + * Omit specific fields from the Room + */ + omit?: Prisma.RoomOmit | null + /** + * Filter, which Rooms to fetch. + */ + where?: Prisma.RoomWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Rooms to fetch. + */ + orderBy?: Prisma.RoomOrderByWithRelationInput | Prisma.RoomOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Rooms. + */ + cursor?: Prisma.RoomWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Rooms from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Rooms. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Rooms. + */ + distinct?: Prisma.RoomScalarFieldEnum | Prisma.RoomScalarFieldEnum[] +} + +/** + * Room create + */ +export type RoomCreateArgs = { + /** + * Select specific fields to fetch from the Room + */ + select?: Prisma.RoomSelect | null + /** + * Omit specific fields from the Room + */ + omit?: Prisma.RoomOmit | null + /** + * The data needed to create a Room. + */ + data: Prisma.XOR +} + +/** + * Room createMany + */ +export type RoomCreateManyArgs = { + /** + * The data used to create many Rooms. + */ + data: Prisma.RoomCreateManyInput | Prisma.RoomCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Room createManyAndReturn + */ +export type RoomCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Room + */ + select?: Prisma.RoomSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Room + */ + omit?: Prisma.RoomOmit | null + /** + * The data used to create many Rooms. + */ + data: Prisma.RoomCreateManyInput | Prisma.RoomCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Room update + */ +export type RoomUpdateArgs = { + /** + * Select specific fields to fetch from the Room + */ + select?: Prisma.RoomSelect | null + /** + * Omit specific fields from the Room + */ + omit?: Prisma.RoomOmit | null + /** + * The data needed to update a Room. + */ + data: Prisma.XOR + /** + * Choose, which Room to update. + */ + where: Prisma.RoomWhereUniqueInput +} + +/** + * Room updateMany + */ +export type RoomUpdateManyArgs = { + /** + * The data used to update Rooms. + */ + data: Prisma.XOR + /** + * Filter which Rooms to update + */ + where?: Prisma.RoomWhereInput + /** + * Limit how many Rooms to update. + */ + limit?: number +} + +/** + * Room updateManyAndReturn + */ +export type RoomUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Room + */ + select?: Prisma.RoomSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Room + */ + omit?: Prisma.RoomOmit | null + /** + * The data used to update Rooms. + */ + data: Prisma.XOR + /** + * Filter which Rooms to update + */ + where?: Prisma.RoomWhereInput + /** + * Limit how many Rooms to update. + */ + limit?: number +} + +/** + * Room upsert + */ +export type RoomUpsertArgs = { + /** + * Select specific fields to fetch from the Room + */ + select?: Prisma.RoomSelect | null + /** + * Omit specific fields from the Room + */ + omit?: Prisma.RoomOmit | null + /** + * The filter to search for the Room to update in case it exists. + */ + where: Prisma.RoomWhereUniqueInput + /** + * In case the Room found by the `where` argument doesn't exist, create a new Room with this data. + */ + create: Prisma.XOR + /** + * In case the Room was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Room delete + */ +export type RoomDeleteArgs = { + /** + * Select specific fields to fetch from the Room + */ + select?: Prisma.RoomSelect | null + /** + * Omit specific fields from the Room + */ + omit?: Prisma.RoomOmit | null + /** + * Filter which Room to delete. + */ + where: Prisma.RoomWhereUniqueInput +} + +/** + * Room deleteMany + */ +export type RoomDeleteManyArgs = { + /** + * Filter which Rooms to delete + */ + where?: Prisma.RoomWhereInput + /** + * Limit how many Rooms to delete. + */ + limit?: number +} + +/** + * Room without action + */ +export type RoomDefaultArgs = { + /** + * Select specific fields to fetch from the Room + */ + select?: Prisma.RoomSelect | null + /** + * Omit specific fields from the Room + */ + omit?: Prisma.RoomOmit | null +} diff --git a/prisma/schema.prisma b/prisma/schema.prisma index a90528a..d465d5e 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -42,6 +42,22 @@ model DailyPuzzle { results DailyResult[] } +model Room { + code String @id + players Json @default("[]") + phase String @default("waiting") + round Int @default(0) + totalRounds Int @default(3) + maxPlayers Int @default(16) + startArticle String @default("") + targetArticle String @default("") + roundWinner String? + countdownStart BigInt? + roundStart BigInt? + createdAt BigInt + updatedAt DateTime @updatedAt +} + model DailyResult { id String @id @default(uuid(7)) puzzleId String