Working state change to "running"

This commit is contained in:
aronmal 2023-06-13 23:02:29 +02:00
parent 0b8fb0a476
commit d9e0250b8c
Signed by: aronmal
GPG key ID: 816B7707426FC612
16 changed files with 397 additions and 350 deletions

View file

@ -1,5 +1,6 @@
import { count } from "./Gamefield" import { count } from "./Gamefield"
import { useGameProps } from "@hooks/useGameProps" import { useGameProps } from "@hooks/useGameProps"
import useShips from "@hooks/useShips"
import { import {
borderCN, borderCN,
cornerCN, cornerCN,
@ -25,16 +26,14 @@ function BorderTiles() {
DispatchAction, DispatchAction,
payload, payload,
mode, mode,
ships,
hits, hits,
target, target,
targetPreview, targetPreview,
mouseCursor, mouseCursor,
setTarget, setTarget,
addShip,
setMouseCursor, setMouseCursor,
removeShip,
} = useGameProps() } = useGameProps()
const { ships, setShips, removeShip } = useShips()
const settingTarget = useCallback( const settingTarget = useCallback(
(isGameTile: boolean, x: number, y: number) => { (isGameTile: boolean, x: number, y: number) => {
@ -59,16 +58,16 @@ function BorderTiles() {
!intersectingShip(ships, shipProps(ships, mode, targetPreview)).score !intersectingShip(ships, shipProps(ships, mode, targetPreview)).score
) { ) {
setMouseCursor((e) => ({ ...e, shouldShow: false })) setMouseCursor((e) => ({ ...e, shouldShow: false }))
addShip(shipProps(ships, mode, targetPreview)) setShips([...ships, shipProps(ships, mode, targetPreview)])
} }
}, },
[ [
DispatchAction, DispatchAction,
addShip,
hits, hits,
mode, mode,
payload?.game?.state, payload?.game?.state,
setMouseCursor, setMouseCursor,
setShips,
setTarget, setTarget,
ships, ships,
target, target,

View file

@ -24,17 +24,11 @@ import {
} from "@fortawesome/pro-solid-svg-icons" } from "@fortawesome/pro-solid-svg-icons"
import { useDrawProps } from "@hooks/useDrawProps" import { useDrawProps } from "@hooks/useDrawProps"
import { useGameProps } from "@hooks/useGameProps" import { useGameProps } from "@hooks/useGameProps"
import useShips from "@hooks/useShips"
import { socket } from "@lib/socket" import { socket } from "@lib/socket"
import { GamePropsSchema } from "@lib/zodSchemas" import { GamePropsSchema } from "@lib/zodSchemas"
import { Orientation } from "@prisma/client"
import { useSession } from "next-auth/react" import { useSession } from "next-auth/react"
import { import { useCallback, useEffect, useMemo } from "react"
Dispatch,
SetStateAction,
useCallback,
useEffect,
useMemo,
} from "react"
export function setGameSetting( export function setGameSetting(
payload: GameSettings, payload: GameSettings,
@ -55,7 +49,6 @@ function EventBar({ clear }: { clear: () => void }) {
const { shouldHide, color } = useDrawProps() const { shouldHide, color } = useDrawProps()
const { data: session } = useSession() const { data: session } = useSession()
const { const {
ships,
payload, payload,
menu, menu,
mode, mode,
@ -65,6 +58,7 @@ function EventBar({ clear }: { clear: () => void }) {
setTargetPreview, setTargetPreview,
setIsReady, setIsReady,
} = useGameProps() } = useGameProps()
const { ships } = useShips()
const gameSetting = useCallback( const gameSetting = useCallback(
(payload: GameSettings) => setGameSetting(payload, setSetting, full), (payload: GameSettings) => setGameSetting(payload, setSetting, full),
[full, setSetting] [full, setSetting]
@ -130,7 +124,7 @@ function EventBar({ clear }: { clear: () => void }) {
icon: "scope", icon: "scope",
text: "Fire missile", text: "Fire missile",
callback: () => { callback: () => {
useGameProps.setState({ mode: 3 }) useGameProps.setState({ mode: 0 })
setTarget((e) => ({ ...e, show: false })) setTarget((e) => ({ ...e, show: false }))
}, },
}, },
@ -154,7 +148,7 @@ function EventBar({ clear }: { clear: () => void }) {
1 - 1 -
(self?.moves.filter((e) => e.action === "radar").length ?? 0), (self?.moves.filter((e) => e.action === "radar").length ?? 0),
callback: () => { callback: () => {
useGameProps.setState({ mode: 0 }) useGameProps.setState({ mode: 3 })
setTarget((e) => ({ ...e, show: false })) setTarget((e) => ({ ...e, show: false }))
}, },
}, },
@ -202,11 +196,12 @@ function EventBar({ clear }: { clear: () => void }) {
text: "Done", text: "Done",
disabled: mode >= 0, disabled: mode >= 0,
callback: () => { callback: () => {
const i = payload?.users.findIndex( if (!payload || !session?.user.id) return
(user) => session?.user?.id === user?.id const i = payload.users.findIndex(
(user) => session.user.id === user?.id
) )
if (!i) return
setIsReady({ isReady: true, i }) setIsReady({ isReady: true, i })
socket.emit("isReady", true)
}, },
}, },
], ],
@ -259,14 +254,9 @@ function EventBar({ clear }: { clear: () => void }) {
color, color,
gameSetting, gameSetting,
mode, mode,
payload?.game?.allowChat, payload,
payload?.game?.allowMarkDraw,
payload?.game?.allowSpecials,
payload?.game?.allowSpectators,
payload?.game?.state,
payload?.users,
self?.moves, self?.moves,
session?.user?.id, session?.user.id,
setIsReady, setIsReady,
setTarget, setTarget,
setTargetPreview, setTargetPreview,

View file

@ -19,17 +19,26 @@ export const count = 12
function Gamefield() { function Gamefield() {
const { const {
userStates,
mode, mode,
target, target,
targetPreview,
mouseCursor, mouseCursor,
ships, setMouseCursor,
payload, payload,
setTargetPreview, setTargetPreview,
full, full,
} = useGameProps() } = useGameProps()
const { isConnected } = useSocket() const { isConnected } = useSocket()
useEffect(() => {
if (
payload?.game?.state !== "starting" ||
userStates.reduce((prev, curr) => prev || !curr.isReady, false)
)
return
socket.emit("gameState", "running")
}, [payload?.game?.state, userStates])
useEffect(() => { useEffect(() => {
if (payload?.game?.id || !isConnected) return if (payload?.game?.id || !isConnected) return
socket.emit("update", full) socket.emit("update", full)
@ -51,13 +60,16 @@ function Gamefield() {
...position, ...position,
show: !show || x !== position.x || y !== position.y, show: !show || x !== position.x || y !== position.y,
})) }))
if (payload?.game?.state !== "starting") return
const handleKeyPress = (event: KeyboardEvent) => { const handleKeyPress = (event: KeyboardEvent) => {
if (event.key !== "r") return if (event.key !== "r") return
setTargetPreview((t) => ({ if (payload?.game?.state === "starting") {
...t, setTargetPreview((t) => ({
orientation: t.orientation === "h" ? "v" : "h", ...t,
})) orientation: t.orientation === "h" ? "v" : "h",
}))
}
if (payload?.game?.state === "running" && (mode === 1 || mode === 2))
useGameProps.setState({ mode: mode === 1 ? 2 : 1 })
} }
document.addEventListener("keydown", handleKeyPress) document.addEventListener("keydown", handleKeyPress)
return () => { return () => {
@ -75,9 +87,9 @@ function Gamefield() {
<div <div
id="game-frame" id="game-frame"
style={{ "--i": count } as CSSProperties} style={{ "--i": count } as CSSProperties}
// onMouseLeave={() => onMouseLeave={() =>
// setMouseCursor((e) => ({ ...e, shouldShow: false })) setMouseCursor((e) => ({ ...e, shouldShow: false }))
// } }
> >
{/* Bordes */} {/* Bordes */}
<BorderTiles /> <BorderTiles />

View file

@ -1,17 +1,8 @@
import Ship from "./Ship" import Ship from "./Ship"
import { useGameProps } from "@hooks/useGameProps" import useShips from "@hooks/useShips"
function Ships() { function Ships() {
// const shipIndexes: Ship[] = [ const { ships } = useShips()
// { size: 2, variant: 1, x: 3, y: 3 },
// { size: 3, variant: 1, x: 4, y: 3 },
// { size: 3, variant: 2, x: 5, y: 3 },
// { size: 3, variant: 3, x: 6, y: 3 },
// { size: 4, variant: 1, x: 7, y: 3 },
// { size: 4, variant: 2, x: 8, y: 3 },
// ]
const { ships } = useGameProps()
return ( return (
<> <>

View file

@ -2,6 +2,7 @@ import GamefieldPointer from "./GamefieldPointer"
import HitElems from "./HitElems" import HitElems from "./HitElems"
import Ship from "./Ship" import Ship from "./Ship"
import { useGameProps } from "@hooks/useGameProps" import { useGameProps } from "@hooks/useGameProps"
import useShips from "@hooks/useShips"
import { import {
composeTargetTiles, composeTargetTiles,
intersectingShip, intersectingShip,
@ -9,7 +10,8 @@ import {
} from "@lib/utils/helpers" } from "@lib/utils/helpers"
function Targets() { function Targets() {
const { payload, target, targetPreview, mode, hits, ships } = useGameProps() const { payload, target, targetPreview, mode, hits } = useGameProps()
const { ships } = useShips()
if (payload?.game?.state === "running") if (payload?.game?.state === "running")
return ( return (

View file

@ -48,7 +48,7 @@ function LobbyFrame({ openSettings }: { openSettings: () => void }) {
useEffect(() => { useEffect(() => {
if (!launching || launchTime > 0) return if (!launching || launchTime > 0) return
socket.emit("starting") socket.emit("gameState", "running")
}, [launching, launchTime, router]) }, [launching, launchTime, router])
useEffect(() => { useEffect(() => {

View file

@ -20,6 +20,7 @@ import {
optionalGamePropsSchema, optionalGamePropsSchema,
PlayerSchema, PlayerSchema,
} from "@lib/zodSchemas" } from "@lib/zodSchemas"
import { GameState } from "@prisma/client"
import { produce } from "immer" import { produce } from "immer"
import { SetStateAction } from "react" import { SetStateAction } from "react"
import { toast } from "react-toastify" import { toast } from "react-toastify"
@ -33,7 +34,6 @@ const initialState: optionalGamePropsSchema & {
}[] }[]
menu: keyof EventBarModes menu: keyof EventBarModes
mode: number mode: number
ships: ShipProps[]
hits: Hit[] hits: Hit[]
target: Target target: Target
targetPreview: TargetPreview targetPreview: TargetPreview
@ -43,7 +43,6 @@ const initialState: optionalGamePropsSchema & {
mode: 0, mode: 0,
payload: null, payload: null,
hash: null, hash: null,
ships: [],
hits: [], hits: [],
target: initlialTarget, target: initlialTarget,
targetPreview: initlialTargetPreview, targetPreview: initlialTargetPreview,
@ -66,9 +65,9 @@ export type Action = {
full: (newProps: GamePropsSchema) => void full: (newProps: GamePropsSchema) => void
leave: (cb: () => void) => void leave: (cb: () => void) => void
setIsReady: (payload: { i: number; isReady: boolean }) => void setIsReady: (payload: { i: number; isReady: boolean }) => void
starting: () => void gameState: (newState: GameState) => void
addShip: (props: ShipProps) => void setShips: (ships: ShipProps[], userId: string) => void
removeShip: (props: ShipProps) => void removeShip: (props: ShipProps, userId: string) => void
setIsConnected: (payload: { i: number; isConnected: boolean }) => void setIsConnected: (payload: { i: number; isConnected: boolean }) => void
reset: () => void reset: () => void
} }
@ -113,23 +112,32 @@ export const useGameProps = create<State & Action>()(
else state.mouseCursor = dispatch else state.mouseCursor = dispatch
}) })
), ),
addShip: (props) => setShips: (ships, userId) =>
set( set(
produce((state: State) => { produce((state: State) => {
state.ships.push(props) if (!state.payload) return
state.payload.users = state.payload.users.map((e) => {
if (!e || e.id !== userId) return e
e.ships = ships
return e
})
}) })
), ),
removeShip: ({ size, variant, x, y }) => removeShip: ({ size, variant, x, y }, userId) =>
set( set(
produce((state: State) => { produce((state: State) => {
const indexToRemove = state.ships.findIndex( state.payload?.users.map((e) => {
(ship) => if (!e || e.id !== userId) return
ship.size === size && const indexToRemove = e.ships.findIndex(
ship.variant === variant && (ship) =>
ship.x === x && ship.size === size &&
ship.y === y ship.variant === variant &&
) ship.x === x &&
state.ships.splice(indexToRemove, 1) ship.y === y
)
e.ships.splice(indexToRemove, 1)
return e
})
}) })
), ),
setPlayer: (payload) => { setPlayer: (payload) => {
@ -209,11 +217,11 @@ export const useGameProps = create<State & Action>()(
state.userStates[i].isConnected = true state.userStates[i].isConnected = true
}) })
), ),
starting: () => gameState: (newState: GameState) =>
set( set(
produce((state: State) => { produce((state: State) => {
if (state.payload?.game?.state !== "lobby") return if (!state.payload?.game) return
state.payload.game.state = "starting" state.payload.game.state = newState
state.userStates = state.userStates.map((e) => ({ state.userStates = state.userStates.map((e) => ({
...e, ...e,
isReady: false, isReady: false,

View file

@ -0,0 +1,28 @@
import { ShipProps } from "../interfaces/frontend"
import { useGameProps } from "./useGameProps"
import { useSession } from "next-auth/react"
import { useCallback, useMemo } from "react"
function useShips() {
const gameProps = useGameProps()
const { data: session } = useSession()
const ships = useMemo(
() =>
gameProps.payload?.users.find((e) => e?.id === session?.user.id)?.ships ??
[],
[gameProps.payload?.users, session?.user.id]
)
const setShips = useCallback(
(ships: ShipProps[]) => gameProps.setShips(ships, session?.user.id ?? ""),
[gameProps, session?.user.id]
)
const removeShip = useCallback(
(ship: ShipProps) => gameProps.removeShip(ship, session?.user.id ?? ""),
[gameProps, session?.user.id]
)
return { ships, setShips, removeShip }
}
export default useShips

View file

@ -18,7 +18,7 @@ function useSocket() {
setSetting, setSetting,
full, full,
setIsReady, setIsReady,
starting, gameState,
setIsConnected, setIsConnected,
} = useGameProps() } = useGameProps()
const { data: session } = useSession() const { data: session } = useSession()
@ -120,7 +120,7 @@ function useSocket() {
socket.on("isReady", setIsReady) socket.on("isReady", setIsReady)
socket.on("starting", starting) socket.on("gameState", gameState)
socket.on("disconnect", () => { socket.on("disconnect", () => {
console.log("disconnect") console.log("disconnect")
@ -132,14 +132,12 @@ function useSocket() {
} }
}, [ }, [
full, full,
payload?.game?.id, gameState,
router, router,
session?.user.id,
setIsConnected, setIsConnected,
setIsReady, setIsReady,
setPlayer, setPlayer,
setSetting, setSetting,
starting,
userStates, userStates,
]) ])

View file

@ -1,6 +1,7 @@
import { DrawLineProps } from "./frontend" import { DrawLineProps, ShipProps } from "./frontend"
import { GameSettings } from "@components/Lobby/SettingsFrame/Setting" import { GameSettings } from "@components/Lobby/SettingsFrame/Setting"
import { GamePropsSchema, PlayerSchema } from "@lib/zodSchemas" import { GamePropsSchema, PlayerSchema } from "@lib/zodSchemas"
import { GameState, Ship } from "@prisma/client"
import type { Server as HTTPServer } from "http" import type { Server as HTTPServer } from "http"
import type { Socket as NetSocket } from "net" import type { Socket as NetSocket } from "net"
import type { NextApiResponse } from "next" import type { NextApiResponse } from "next"
@ -48,7 +49,8 @@ export interface ServerToClientEvents {
"canvas-state-from-server": (state: string, userIndex: number) => void "canvas-state-from-server": (state: string, userIndex: number) => void
"draw-line": (props: DrawLineProps, userIndex: number) => void "draw-line": (props: DrawLineProps, userIndex: number) => void
"canvas-clear": () => void "canvas-clear": () => void
starting: () => void gameState: (newState: GameState) => void
ships: (ships: ShipProps[], userId: string) => void
} }
export interface ClientToServerEvents { export interface ClientToServerEvents {
@ -62,7 +64,8 @@ export interface ClientToServerEvents {
"canvas-state": (state: string) => void "canvas-state": (state: string) => void
"draw-line": (props: DrawLineProps) => void "draw-line": (props: DrawLineProps) => void
"canvas-clear": () => void "canvas-clear": () => void
starting: () => void gameState: (newState: GameState) => void
ships: (ships: ShipProps[]) => void
} }
interface InterServerEvents { interface InterServerEvents {

View file

@ -32,8 +32,8 @@ export function fieldIndex(count: number, x: number, y: number) {
const modes: Mode[] = [ const modes: Mode[] = [
{ {
pointerGrid: Array.from(Array(3), () => Array.from(Array(3))), pointerGrid: Array.from(Array(1), () => Array.from(Array(1))),
type: "radar", type: "missile",
}, },
{ {
pointerGrid: Array.from(Array(3), () => Array.from(Array(1))), pointerGrid: Array.from(Array(3), () => Array.from(Array(1))),
@ -44,8 +44,8 @@ const modes: Mode[] = [
type: "vtorpedo", type: "vtorpedo",
}, },
{ {
pointerGrid: Array.from(Array(1), () => Array.from(Array(1))), pointerGrid: Array.from(Array(3), () => Array.from(Array(3))),
type: "missile", type: "radar",
}, },
] ]
@ -61,6 +61,7 @@ export function targetList(
{ x: targetX, y: targetY }: Position, { x: targetX, y: targetY }: Position,
mode: number mode: number
): TargetList[] { ): TargetList[] {
if (mode < 0) return []
const { pointerGrid, type } = modes[mode] const { pointerGrid, type } = modes[mode]
const xLength = pointerGrid.length const xLength = pointerGrid.length
const yLength = pointerGrid[0].length const yLength = pointerGrid[0].length

View file

@ -23,6 +23,15 @@ export const PlayerSchema = z
y: z.number(), y: z.number(),
}) })
.array(), .array(),
ships: z
.object({
size: z.number(),
variant: z.number(),
x: z.number(),
y: z.number(),
orientation: z.nativeEnum(Orientation),
})
.array(),
}) })
.nullable() .nullable()
@ -37,16 +46,6 @@ export const CreateSchema = z.object({
allowSpecials: z.boolean(), allowSpecials: z.boolean(),
allowChat: z.boolean(), allowChat: z.boolean(),
allowMarkDraw: z.boolean(), allowMarkDraw: z.boolean(),
ships: z
.object({
id: z.string(),
size: z.number(),
variant: z.number(),
x: z.number(),
y: z.number(),
orientation: z.nativeEnum(Orientation),
})
.array(),
}) })
.nullable(), .nullable(),
gamePin: z.string().nullable(), gamePin: z.string().nullable(),

View file

@ -15,16 +15,6 @@ export const gameSelects = {
allowSpecials: true, allowSpecials: true,
allowSpectators: true, allowSpectators: true,
state: true, state: true,
ships: {
select: {
id: true,
size: true,
variant: true,
x: true,
y: true,
orientation: true,
},
},
gamePin: { gamePin: {
select: { select: {
pin: true, pin: true,
@ -52,6 +42,15 @@ export const gameSelects = {
orientation: true, orientation: true,
}, },
}, },
ships: {
select: {
size: true,
variant: true,
x: true,
y: true,
orientation: true,
},
},
user: { user: {
select: { select: {
id: true, id: true,

View file

@ -205,15 +205,36 @@ const SocketHandler = async (
socket.to(socket.data.gameId).emit("canvas-clear") socket.to(socket.data.gameId).emit("canvas-clear")
}) })
socket.on("starting", async () => { socket.on("gameState", async (newState) => {
if (socket.data.index !== 0 || !socket.data.gameId) return if (socket.data.index !== 0 || !socket.data.gameId) return
await prisma.game.update({ await prisma.game.update({
where: { id: socket.data.gameId }, where: { id: socket.data.gameId },
data: { data: {
state: "starting", state: newState,
}, },
}) })
io.to(socket.data.gameId).emit("starting") io.to(socket.data.gameId).emit("gameState", newState)
})
socket.on("ships", async (ships) => {
if (!socket.data.gameId || !socket.data.user?.id) return
await prisma.user_Game.update({
where: {
gameId_userId: {
gameId: socket.data.gameId,
userId: socket.data.user.id,
},
},
data: {
ships: {
deleteMany: {},
createMany: {
data: ships,
},
},
},
})
socket.to(socket.data.gameId).emit("ships", ships, socket.data.user.id)
}) })
socket.on("disconnecting", async () => { socket.on("disconnecting", async () => {

View file

@ -22,7 +22,7 @@ export const MoveScalarFieldEnumSchema = z.enum(['id','createdAt','index','actio
export const SessionScalarFieldEnumSchema = z.enum(['id','sessionToken','userId','expires']); export const SessionScalarFieldEnumSchema = z.enum(['id','sessionToken','userId','expires']);
export const ShipScalarFieldEnumSchema = z.enum(['id','size','variant','x','y','orientation','gameId']); export const ShipScalarFieldEnumSchema = z.enum(['id','size','variant','x','y','orientation','user_GameId']);
export const SortOrderSchema = z.enum(['asc','desc']); export const SortOrderSchema = z.enum(['asc','desc']);
@ -126,7 +126,7 @@ export const ShipSchema = z.object({
variant: z.number().int(), variant: z.number().int(),
x: z.number().int(), x: z.number().int(),
y: z.number().int(), y: z.number().int(),
gameId: z.string(), user_GameId: z.string(),
}) })
export type Ship = z.infer<typeof ShipSchema> export type Ship = z.infer<typeof ShipSchema>
@ -313,7 +313,7 @@ export const VerificationTokenSelectSchema: z.ZodType<Prisma.VerificationTokenSe
//------------------------------------------------------ //------------------------------------------------------
export const ShipIncludeSchema: z.ZodType<Prisma.ShipInclude> = z.object({ export const ShipIncludeSchema: z.ZodType<Prisma.ShipInclude> = z.object({
game: z.union([z.boolean(),z.lazy(() => GameArgsSchema)]).optional(), User_Game: z.union([z.boolean(),z.lazy(() => User_GameArgsSchema)]).optional(),
}).strict() }).strict()
export const ShipArgsSchema: z.ZodType<Prisma.ShipArgs> = z.object({ export const ShipArgsSchema: z.ZodType<Prisma.ShipArgs> = z.object({
@ -328,15 +328,14 @@ export const ShipSelectSchema: z.ZodType<Prisma.ShipSelect> = z.object({
x: z.boolean().optional(), x: z.boolean().optional(),
y: z.boolean().optional(), y: z.boolean().optional(),
orientation: z.boolean().optional(), orientation: z.boolean().optional(),
gameId: z.boolean().optional(), user_GameId: z.boolean().optional(),
game: z.union([z.boolean(),z.lazy(() => GameArgsSchema)]).optional(), User_Game: z.union([z.boolean(),z.lazy(() => User_GameArgsSchema)]).optional(),
}).strict() }).strict()
// GAME // GAME
//------------------------------------------------------ //------------------------------------------------------
export const GameIncludeSchema: z.ZodType<Prisma.GameInclude> = z.object({ export const GameIncludeSchema: z.ZodType<Prisma.GameInclude> = z.object({
ships: z.union([z.boolean(),z.lazy(() => ShipFindManyArgsSchema)]).optional(),
gamePin: z.union([z.boolean(),z.lazy(() => GamepinArgsSchema)]).optional(), gamePin: z.union([z.boolean(),z.lazy(() => GamepinArgsSchema)]).optional(),
users: z.union([z.boolean(),z.lazy(() => User_GameFindManyArgsSchema)]).optional(), users: z.union([z.boolean(),z.lazy(() => User_GameFindManyArgsSchema)]).optional(),
_count: z.union([z.boolean(),z.lazy(() => GameCountOutputTypeArgsSchema)]).optional(), _count: z.union([z.boolean(),z.lazy(() => GameCountOutputTypeArgsSchema)]).optional(),
@ -352,7 +351,6 @@ export const GameCountOutputTypeArgsSchema: z.ZodType<Prisma.GameCountOutputType
}).strict(); }).strict();
export const GameCountOutputTypeSelectSchema: z.ZodType<Prisma.GameCountOutputTypeSelect> = z.object({ export const GameCountOutputTypeSelectSchema: z.ZodType<Prisma.GameCountOutputTypeSelect> = z.object({
ships: z.boolean().optional(),
users: z.boolean().optional(), users: z.boolean().optional(),
}).strict(); }).strict();
@ -365,7 +363,6 @@ export const GameSelectSchema: z.ZodType<Prisma.GameSelect> = z.object({
allowSpecials: z.boolean().optional(), allowSpecials: z.boolean().optional(),
allowChat: z.boolean().optional(), allowChat: z.boolean().optional(),
allowMarkDraw: z.boolean().optional(), allowMarkDraw: z.boolean().optional(),
ships: z.union([z.boolean(),z.lazy(() => ShipFindManyArgsSchema)]).optional(),
gamePin: z.union([z.boolean(),z.lazy(() => GamepinArgsSchema)]).optional(), gamePin: z.union([z.boolean(),z.lazy(() => GamepinArgsSchema)]).optional(),
users: z.union([z.boolean(),z.lazy(() => User_GameFindManyArgsSchema)]).optional(), users: z.union([z.boolean(),z.lazy(() => User_GameFindManyArgsSchema)]).optional(),
_count: z.union([z.boolean(),z.lazy(() => GameCountOutputTypeArgsSchema)]).optional(), _count: z.union([z.boolean(),z.lazy(() => GameCountOutputTypeArgsSchema)]).optional(),
@ -396,6 +393,7 @@ export const GamepinSelectSchema: z.ZodType<Prisma.GamepinSelect> = z.object({
export const User_GameIncludeSchema: z.ZodType<Prisma.User_GameInclude> = z.object({ export const User_GameIncludeSchema: z.ZodType<Prisma.User_GameInclude> = z.object({
moves: z.union([z.boolean(),z.lazy(() => MoveFindManyArgsSchema)]).optional(), moves: z.union([z.boolean(),z.lazy(() => MoveFindManyArgsSchema)]).optional(),
ships: z.union([z.boolean(),z.lazy(() => ShipFindManyArgsSchema)]).optional(),
chats: z.union([z.boolean(),z.lazy(() => ChatFindManyArgsSchema)]).optional(), chats: z.union([z.boolean(),z.lazy(() => ChatFindManyArgsSchema)]).optional(),
game: z.union([z.boolean(),z.lazy(() => GameArgsSchema)]).optional(), game: z.union([z.boolean(),z.lazy(() => GameArgsSchema)]).optional(),
user: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), user: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(),
@ -413,6 +411,7 @@ export const User_GameCountOutputTypeArgsSchema: z.ZodType<Prisma.User_GameCount
export const User_GameCountOutputTypeSelectSchema: z.ZodType<Prisma.User_GameCountOutputTypeSelect> = z.object({ export const User_GameCountOutputTypeSelectSchema: z.ZodType<Prisma.User_GameCountOutputTypeSelect> = z.object({
moves: z.boolean().optional(), moves: z.boolean().optional(),
ships: z.boolean().optional(),
chats: z.boolean().optional(), chats: z.boolean().optional(),
}).strict(); }).strict();
@ -423,6 +422,7 @@ export const User_GameSelectSchema: z.ZodType<Prisma.User_GameSelect> = z.object
userId: z.boolean().optional(), userId: z.boolean().optional(),
index: z.boolean().optional(), index: z.boolean().optional(),
moves: z.union([z.boolean(),z.lazy(() => MoveFindManyArgsSchema)]).optional(), moves: z.union([z.boolean(),z.lazy(() => MoveFindManyArgsSchema)]).optional(),
ships: z.union([z.boolean(),z.lazy(() => ShipFindManyArgsSchema)]).optional(),
chats: z.union([z.boolean(),z.lazy(() => ChatFindManyArgsSchema)]).optional(), chats: z.union([z.boolean(),z.lazy(() => ChatFindManyArgsSchema)]).optional(),
game: z.union([z.boolean(),z.lazy(() => GameArgsSchema)]).optional(), game: z.union([z.boolean(),z.lazy(() => GameArgsSchema)]).optional(),
user: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(), user: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(),
@ -721,8 +721,8 @@ export const ShipWhereInputSchema: z.ZodType<Prisma.ShipWhereInput> = z.object({
x: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), x: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(),
y: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), y: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(),
orientation: z.union([ z.lazy(() => EnumOrientationFilterSchema),z.lazy(() => OrientationSchema) ]).optional(), orientation: z.union([ z.lazy(() => EnumOrientationFilterSchema),z.lazy(() => OrientationSchema) ]).optional(),
gameId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), user_GameId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(),
game: z.union([ z.lazy(() => GameRelationFilterSchema),z.lazy(() => GameWhereInputSchema) ]).optional(), User_Game: z.union([ z.lazy(() => User_GameRelationFilterSchema),z.lazy(() => User_GameWhereInputSchema) ]).optional(),
}).strict(); }).strict();
export const ShipOrderByWithRelationInputSchema: z.ZodType<Prisma.ShipOrderByWithRelationInput> = z.object({ export const ShipOrderByWithRelationInputSchema: z.ZodType<Prisma.ShipOrderByWithRelationInput> = z.object({
@ -732,8 +732,8 @@ export const ShipOrderByWithRelationInputSchema: z.ZodType<Prisma.ShipOrderByWit
x: z.lazy(() => SortOrderSchema).optional(), x: z.lazy(() => SortOrderSchema).optional(),
y: z.lazy(() => SortOrderSchema).optional(), y: z.lazy(() => SortOrderSchema).optional(),
orientation: z.lazy(() => SortOrderSchema).optional(), orientation: z.lazy(() => SortOrderSchema).optional(),
gameId: z.lazy(() => SortOrderSchema).optional(), user_GameId: z.lazy(() => SortOrderSchema).optional(),
game: z.lazy(() => GameOrderByWithRelationInputSchema).optional() User_Game: z.lazy(() => User_GameOrderByWithRelationInputSchema).optional()
}).strict(); }).strict();
export const ShipWhereUniqueInputSchema: z.ZodType<Prisma.ShipWhereUniqueInput> = z.object({ export const ShipWhereUniqueInputSchema: z.ZodType<Prisma.ShipWhereUniqueInput> = z.object({
@ -747,7 +747,7 @@ export const ShipOrderByWithAggregationInputSchema: z.ZodType<Prisma.ShipOrderBy
x: z.lazy(() => SortOrderSchema).optional(), x: z.lazy(() => SortOrderSchema).optional(),
y: z.lazy(() => SortOrderSchema).optional(), y: z.lazy(() => SortOrderSchema).optional(),
orientation: z.lazy(() => SortOrderSchema).optional(), orientation: z.lazy(() => SortOrderSchema).optional(),
gameId: z.lazy(() => SortOrderSchema).optional(), user_GameId: z.lazy(() => SortOrderSchema).optional(),
_count: z.lazy(() => ShipCountOrderByAggregateInputSchema).optional(), _count: z.lazy(() => ShipCountOrderByAggregateInputSchema).optional(),
_avg: z.lazy(() => ShipAvgOrderByAggregateInputSchema).optional(), _avg: z.lazy(() => ShipAvgOrderByAggregateInputSchema).optional(),
_max: z.lazy(() => ShipMaxOrderByAggregateInputSchema).optional(), _max: z.lazy(() => ShipMaxOrderByAggregateInputSchema).optional(),
@ -765,7 +765,7 @@ export const ShipScalarWhereWithAggregatesInputSchema: z.ZodType<Prisma.ShipScal
x: z.union([ z.lazy(() => IntWithAggregatesFilterSchema),z.number() ]).optional(), x: z.union([ z.lazy(() => IntWithAggregatesFilterSchema),z.number() ]).optional(),
y: z.union([ z.lazy(() => IntWithAggregatesFilterSchema),z.number() ]).optional(), y: z.union([ z.lazy(() => IntWithAggregatesFilterSchema),z.number() ]).optional(),
orientation: z.union([ z.lazy(() => EnumOrientationWithAggregatesFilterSchema),z.lazy(() => OrientationSchema) ]).optional(), orientation: z.union([ z.lazy(() => EnumOrientationWithAggregatesFilterSchema),z.lazy(() => OrientationSchema) ]).optional(),
gameId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(), user_GameId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(),
}).strict(); }).strict();
export const GameWhereInputSchema: z.ZodType<Prisma.GameWhereInput> = z.object({ export const GameWhereInputSchema: z.ZodType<Prisma.GameWhereInput> = z.object({
@ -780,7 +780,6 @@ export const GameWhereInputSchema: z.ZodType<Prisma.GameWhereInput> = z.object({
allowSpecials: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), allowSpecials: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(),
allowChat: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), allowChat: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(),
allowMarkDraw: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(), allowMarkDraw: z.union([ z.lazy(() => BoolFilterSchema),z.boolean() ]).optional(),
ships: z.lazy(() => ShipListRelationFilterSchema).optional(),
gamePin: z.union([ z.lazy(() => GamepinRelationFilterSchema),z.lazy(() => GamepinWhereInputSchema) ]).optional().nullable(), gamePin: z.union([ z.lazy(() => GamepinRelationFilterSchema),z.lazy(() => GamepinWhereInputSchema) ]).optional().nullable(),
users: z.lazy(() => User_GameListRelationFilterSchema).optional() users: z.lazy(() => User_GameListRelationFilterSchema).optional()
}).strict(); }).strict();
@ -794,7 +793,6 @@ export const GameOrderByWithRelationInputSchema: z.ZodType<Prisma.GameOrderByWit
allowSpecials: z.lazy(() => SortOrderSchema).optional(), allowSpecials: z.lazy(() => SortOrderSchema).optional(),
allowChat: z.lazy(() => SortOrderSchema).optional(), allowChat: z.lazy(() => SortOrderSchema).optional(),
allowMarkDraw: z.lazy(() => SortOrderSchema).optional(), allowMarkDraw: z.lazy(() => SortOrderSchema).optional(),
ships: z.lazy(() => ShipOrderByRelationAggregateInputSchema).optional(),
gamePin: z.lazy(() => GamepinOrderByWithRelationInputSchema).optional(), gamePin: z.lazy(() => GamepinOrderByWithRelationInputSchema).optional(),
users: z.lazy(() => User_GameOrderByRelationAggregateInputSchema).optional() users: z.lazy(() => User_GameOrderByRelationAggregateInputSchema).optional()
}).strict(); }).strict();
@ -886,6 +884,7 @@ export const User_GameWhereInputSchema: z.ZodType<Prisma.User_GameWhereInput> =
userId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), userId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(),
index: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(), index: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(),
moves: z.lazy(() => MoveListRelationFilterSchema).optional(), moves: z.lazy(() => MoveListRelationFilterSchema).optional(),
ships: z.lazy(() => ShipListRelationFilterSchema).optional(),
chats: z.lazy(() => ChatListRelationFilterSchema).optional(), chats: z.lazy(() => ChatListRelationFilterSchema).optional(),
game: z.union([ z.lazy(() => GameRelationFilterSchema),z.lazy(() => GameWhereInputSchema) ]).optional(), game: z.union([ z.lazy(() => GameRelationFilterSchema),z.lazy(() => GameWhereInputSchema) ]).optional(),
user: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(), user: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(),
@ -898,6 +897,7 @@ export const User_GameOrderByWithRelationInputSchema: z.ZodType<Prisma.User_Game
userId: z.lazy(() => SortOrderSchema).optional(), userId: z.lazy(() => SortOrderSchema).optional(),
index: z.lazy(() => SortOrderSchema).optional(), index: z.lazy(() => SortOrderSchema).optional(),
moves: z.lazy(() => MoveOrderByRelationAggregateInputSchema).optional(), moves: z.lazy(() => MoveOrderByRelationAggregateInputSchema).optional(),
ships: z.lazy(() => ShipOrderByRelationAggregateInputSchema).optional(),
chats: z.lazy(() => ChatOrderByRelationAggregateInputSchema).optional(), chats: z.lazy(() => ChatOrderByRelationAggregateInputSchema).optional(),
game: z.lazy(() => GameOrderByWithRelationInputSchema).optional(), game: z.lazy(() => GameOrderByWithRelationInputSchema).optional(),
user: z.lazy(() => UserOrderByWithRelationInputSchema).optional() user: z.lazy(() => UserOrderByWithRelationInputSchema).optional()
@ -1347,7 +1347,7 @@ export const ShipCreateInputSchema: z.ZodType<Prisma.ShipCreateInput> = z.object
x: z.number().int(), x: z.number().int(),
y: z.number().int(), y: z.number().int(),
orientation: z.lazy(() => OrientationSchema), orientation: z.lazy(() => OrientationSchema),
game: z.lazy(() => GameCreateNestedOneWithoutShipsInputSchema) User_Game: z.lazy(() => User_GameCreateNestedOneWithoutShipsInputSchema)
}).strict(); }).strict();
export const ShipUncheckedCreateInputSchema: z.ZodType<Prisma.ShipUncheckedCreateInput> = z.object({ export const ShipUncheckedCreateInputSchema: z.ZodType<Prisma.ShipUncheckedCreateInput> = z.object({
@ -1357,7 +1357,7 @@ export const ShipUncheckedCreateInputSchema: z.ZodType<Prisma.ShipUncheckedCreat
x: z.number().int(), x: z.number().int(),
y: z.number().int(), y: z.number().int(),
orientation: z.lazy(() => OrientationSchema), orientation: z.lazy(() => OrientationSchema),
gameId: z.string() user_GameId: z.string()
}).strict(); }).strict();
export const ShipUpdateInputSchema: z.ZodType<Prisma.ShipUpdateInput> = z.object({ export const ShipUpdateInputSchema: z.ZodType<Prisma.ShipUpdateInput> = z.object({
@ -1367,7 +1367,7 @@ export const ShipUpdateInputSchema: z.ZodType<Prisma.ShipUpdateInput> = z.object
x: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), x: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
y: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), y: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
orientation: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(), orientation: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(),
game: z.lazy(() => GameUpdateOneRequiredWithoutShipsNestedInputSchema).optional() User_Game: z.lazy(() => User_GameUpdateOneRequiredWithoutShipsNestedInputSchema).optional()
}).strict(); }).strict();
export const ShipUncheckedUpdateInputSchema: z.ZodType<Prisma.ShipUncheckedUpdateInput> = z.object({ export const ShipUncheckedUpdateInputSchema: z.ZodType<Prisma.ShipUncheckedUpdateInput> = z.object({
@ -1377,7 +1377,7 @@ export const ShipUncheckedUpdateInputSchema: z.ZodType<Prisma.ShipUncheckedUpdat
x: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), x: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
y: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), y: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
orientation: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(), orientation: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(),
gameId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), user_GameId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
}).strict(); }).strict();
export const ShipCreateManyInputSchema: z.ZodType<Prisma.ShipCreateManyInput> = z.object({ export const ShipCreateManyInputSchema: z.ZodType<Prisma.ShipCreateManyInput> = z.object({
@ -1387,7 +1387,7 @@ export const ShipCreateManyInputSchema: z.ZodType<Prisma.ShipCreateManyInput> =
x: z.number().int(), x: z.number().int(),
y: z.number().int(), y: z.number().int(),
orientation: z.lazy(() => OrientationSchema), orientation: z.lazy(() => OrientationSchema),
gameId: z.string() user_GameId: z.string()
}).strict(); }).strict();
export const ShipUpdateManyMutationInputSchema: z.ZodType<Prisma.ShipUpdateManyMutationInput> = z.object({ export const ShipUpdateManyMutationInputSchema: z.ZodType<Prisma.ShipUpdateManyMutationInput> = z.object({
@ -1406,7 +1406,7 @@ export const ShipUncheckedUpdateManyInputSchema: z.ZodType<Prisma.ShipUncheckedU
x: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), x: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
y: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), y: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
orientation: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(), orientation: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(),
gameId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), user_GameId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
}).strict(); }).strict();
export const GameCreateInputSchema: z.ZodType<Prisma.GameCreateInput> = z.object({ export const GameCreateInputSchema: z.ZodType<Prisma.GameCreateInput> = z.object({
@ -1418,7 +1418,6 @@ export const GameCreateInputSchema: z.ZodType<Prisma.GameCreateInput> = z.object
allowSpecials: z.boolean().optional(), allowSpecials: z.boolean().optional(),
allowChat: z.boolean().optional(), allowChat: z.boolean().optional(),
allowMarkDraw: z.boolean().optional(), allowMarkDraw: z.boolean().optional(),
ships: z.lazy(() => ShipCreateNestedManyWithoutGameInputSchema).optional(),
gamePin: z.lazy(() => GamepinCreateNestedOneWithoutGameInputSchema).optional(), gamePin: z.lazy(() => GamepinCreateNestedOneWithoutGameInputSchema).optional(),
users: z.lazy(() => User_GameCreateNestedManyWithoutGameInputSchema).optional() users: z.lazy(() => User_GameCreateNestedManyWithoutGameInputSchema).optional()
}).strict(); }).strict();
@ -1432,7 +1431,6 @@ export const GameUncheckedCreateInputSchema: z.ZodType<Prisma.GameUncheckedCreat
allowSpecials: z.boolean().optional(), allowSpecials: z.boolean().optional(),
allowChat: z.boolean().optional(), allowChat: z.boolean().optional(),
allowMarkDraw: z.boolean().optional(), allowMarkDraw: z.boolean().optional(),
ships: z.lazy(() => ShipUncheckedCreateNestedManyWithoutGameInputSchema).optional(),
gamePin: z.lazy(() => GamepinUncheckedCreateNestedOneWithoutGameInputSchema).optional(), gamePin: z.lazy(() => GamepinUncheckedCreateNestedOneWithoutGameInputSchema).optional(),
users: z.lazy(() => User_GameUncheckedCreateNestedManyWithoutGameInputSchema).optional() users: z.lazy(() => User_GameUncheckedCreateNestedManyWithoutGameInputSchema).optional()
}).strict(); }).strict();
@ -1446,7 +1444,6 @@ export const GameUpdateInputSchema: z.ZodType<Prisma.GameUpdateInput> = z.object
allowSpecials: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowSpecials: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowChat: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowChat: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
ships: z.lazy(() => ShipUpdateManyWithoutGameNestedInputSchema).optional(),
gamePin: z.lazy(() => GamepinUpdateOneWithoutGameNestedInputSchema).optional(), gamePin: z.lazy(() => GamepinUpdateOneWithoutGameNestedInputSchema).optional(),
users: z.lazy(() => User_GameUpdateManyWithoutGameNestedInputSchema).optional() users: z.lazy(() => User_GameUpdateManyWithoutGameNestedInputSchema).optional()
}).strict(); }).strict();
@ -1460,7 +1457,6 @@ export const GameUncheckedUpdateInputSchema: z.ZodType<Prisma.GameUncheckedUpdat
allowSpecials: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowSpecials: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowChat: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowChat: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
ships: z.lazy(() => ShipUncheckedUpdateManyWithoutGameNestedInputSchema).optional(),
gamePin: z.lazy(() => GamepinUncheckedUpdateOneWithoutGameNestedInputSchema).optional(), gamePin: z.lazy(() => GamepinUncheckedUpdateOneWithoutGameNestedInputSchema).optional(),
users: z.lazy(() => User_GameUncheckedUpdateManyWithoutGameNestedInputSchema).optional() users: z.lazy(() => User_GameUncheckedUpdateManyWithoutGameNestedInputSchema).optional()
}).strict(); }).strict();
@ -1551,6 +1547,7 @@ export const User_GameCreateInputSchema: z.ZodType<Prisma.User_GameCreateInput>
createdAt: z.coerce.date().optional(), createdAt: z.coerce.date().optional(),
index: z.number().int(), index: z.number().int(),
moves: z.lazy(() => MoveCreateNestedManyWithoutUser_gameInputSchema).optional(), moves: z.lazy(() => MoveCreateNestedManyWithoutUser_gameInputSchema).optional(),
ships: z.lazy(() => ShipCreateNestedManyWithoutUser_GameInputSchema).optional(),
chats: z.lazy(() => ChatCreateNestedManyWithoutUser_gameInputSchema).optional(), chats: z.lazy(() => ChatCreateNestedManyWithoutUser_gameInputSchema).optional(),
game: z.lazy(() => GameCreateNestedOneWithoutUsersInputSchema), game: z.lazy(() => GameCreateNestedOneWithoutUsersInputSchema),
user: z.lazy(() => UserCreateNestedOneWithoutGamesInputSchema) user: z.lazy(() => UserCreateNestedOneWithoutGamesInputSchema)
@ -1563,6 +1560,7 @@ export const User_GameUncheckedCreateInputSchema: z.ZodType<Prisma.User_GameUnch
userId: z.string(), userId: z.string(),
index: z.number().int(), index: z.number().int(),
moves: z.lazy(() => MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional(), moves: z.lazy(() => MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional(),
ships: z.lazy(() => ShipUncheckedCreateNestedManyWithoutUser_GameInputSchema).optional(),
chats: z.lazy(() => ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional() chats: z.lazy(() => ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional()
}).strict(); }).strict();
@ -1571,6 +1569,7 @@ export const User_GameUpdateInputSchema: z.ZodType<Prisma.User_GameUpdateInput>
createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
moves: z.lazy(() => MoveUpdateManyWithoutUser_gameNestedInputSchema).optional(), moves: z.lazy(() => MoveUpdateManyWithoutUser_gameNestedInputSchema).optional(),
ships: z.lazy(() => ShipUpdateManyWithoutUser_GameNestedInputSchema).optional(),
chats: z.lazy(() => ChatUpdateManyWithoutUser_gameNestedInputSchema).optional(), chats: z.lazy(() => ChatUpdateManyWithoutUser_gameNestedInputSchema).optional(),
game: z.lazy(() => GameUpdateOneRequiredWithoutUsersNestedInputSchema).optional(), game: z.lazy(() => GameUpdateOneRequiredWithoutUsersNestedInputSchema).optional(),
user: z.lazy(() => UserUpdateOneRequiredWithoutGamesNestedInputSchema).optional() user: z.lazy(() => UserUpdateOneRequiredWithoutGamesNestedInputSchema).optional()
@ -1583,6 +1582,7 @@ export const User_GameUncheckedUpdateInputSchema: z.ZodType<Prisma.User_GameUnch
userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
moves: z.lazy(() => MoveUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional(), moves: z.lazy(() => MoveUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional(),
ships: z.lazy(() => ShipUncheckedUpdateManyWithoutUser_GameNestedInputSchema).optional(),
chats: z.lazy(() => ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional() chats: z.lazy(() => ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional()
}).strict(); }).strict();
@ -2074,9 +2074,9 @@ export const EnumOrientationFilterSchema: z.ZodType<Prisma.EnumOrientationFilter
not: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => NestedEnumOrientationFilterSchema) ]).optional(), not: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => NestedEnumOrientationFilterSchema) ]).optional(),
}).strict(); }).strict();
export const GameRelationFilterSchema: z.ZodType<Prisma.GameRelationFilter> = z.object({ export const User_GameRelationFilterSchema: z.ZodType<Prisma.User_GameRelationFilter> = z.object({
is: z.lazy(() => GameWhereInputSchema).optional(), is: z.lazy(() => User_GameWhereInputSchema).optional(),
isNot: z.lazy(() => GameWhereInputSchema).optional() isNot: z.lazy(() => User_GameWhereInputSchema).optional()
}).strict(); }).strict();
export const ShipCountOrderByAggregateInputSchema: z.ZodType<Prisma.ShipCountOrderByAggregateInput> = z.object({ export const ShipCountOrderByAggregateInputSchema: z.ZodType<Prisma.ShipCountOrderByAggregateInput> = z.object({
@ -2086,7 +2086,7 @@ export const ShipCountOrderByAggregateInputSchema: z.ZodType<Prisma.ShipCountOrd
x: z.lazy(() => SortOrderSchema).optional(), x: z.lazy(() => SortOrderSchema).optional(),
y: z.lazy(() => SortOrderSchema).optional(), y: z.lazy(() => SortOrderSchema).optional(),
orientation: z.lazy(() => SortOrderSchema).optional(), orientation: z.lazy(() => SortOrderSchema).optional(),
gameId: z.lazy(() => SortOrderSchema).optional() user_GameId: z.lazy(() => SortOrderSchema).optional()
}).strict(); }).strict();
export const ShipAvgOrderByAggregateInputSchema: z.ZodType<Prisma.ShipAvgOrderByAggregateInput> = z.object({ export const ShipAvgOrderByAggregateInputSchema: z.ZodType<Prisma.ShipAvgOrderByAggregateInput> = z.object({
@ -2103,7 +2103,7 @@ export const ShipMaxOrderByAggregateInputSchema: z.ZodType<Prisma.ShipMaxOrderBy
x: z.lazy(() => SortOrderSchema).optional(), x: z.lazy(() => SortOrderSchema).optional(),
y: z.lazy(() => SortOrderSchema).optional(), y: z.lazy(() => SortOrderSchema).optional(),
orientation: z.lazy(() => SortOrderSchema).optional(), orientation: z.lazy(() => SortOrderSchema).optional(),
gameId: z.lazy(() => SortOrderSchema).optional() user_GameId: z.lazy(() => SortOrderSchema).optional()
}).strict(); }).strict();
export const ShipMinOrderByAggregateInputSchema: z.ZodType<Prisma.ShipMinOrderByAggregateInput> = z.object({ export const ShipMinOrderByAggregateInputSchema: z.ZodType<Prisma.ShipMinOrderByAggregateInput> = z.object({
@ -2113,7 +2113,7 @@ export const ShipMinOrderByAggregateInputSchema: z.ZodType<Prisma.ShipMinOrderBy
x: z.lazy(() => SortOrderSchema).optional(), x: z.lazy(() => SortOrderSchema).optional(),
y: z.lazy(() => SortOrderSchema).optional(), y: z.lazy(() => SortOrderSchema).optional(),
orientation: z.lazy(() => SortOrderSchema).optional(), orientation: z.lazy(() => SortOrderSchema).optional(),
gameId: z.lazy(() => SortOrderSchema).optional() user_GameId: z.lazy(() => SortOrderSchema).optional()
}).strict(); }).strict();
export const ShipSumOrderByAggregateInputSchema: z.ZodType<Prisma.ShipSumOrderByAggregateInput> = z.object({ export const ShipSumOrderByAggregateInputSchema: z.ZodType<Prisma.ShipSumOrderByAggregateInput> = z.object({
@ -2161,21 +2161,11 @@ export const BoolFilterSchema: z.ZodType<Prisma.BoolFilter> = z.object({
not: z.union([ z.boolean(),z.lazy(() => NestedBoolFilterSchema) ]).optional(), not: z.union([ z.boolean(),z.lazy(() => NestedBoolFilterSchema) ]).optional(),
}).strict(); }).strict();
export const ShipListRelationFilterSchema: z.ZodType<Prisma.ShipListRelationFilter> = z.object({
every: z.lazy(() => ShipWhereInputSchema).optional(),
some: z.lazy(() => ShipWhereInputSchema).optional(),
none: z.lazy(() => ShipWhereInputSchema).optional()
}).strict();
export const GamepinRelationFilterSchema: z.ZodType<Prisma.GamepinRelationFilter> = z.object({ export const GamepinRelationFilterSchema: z.ZodType<Prisma.GamepinRelationFilter> = z.object({
is: z.lazy(() => GamepinWhereInputSchema).optional().nullable(), is: z.lazy(() => GamepinWhereInputSchema).optional().nullable(),
isNot: z.lazy(() => GamepinWhereInputSchema).optional().nullable() isNot: z.lazy(() => GamepinWhereInputSchema).optional().nullable()
}).strict(); }).strict();
export const ShipOrderByRelationAggregateInputSchema: z.ZodType<Prisma.ShipOrderByRelationAggregateInput> = z.object({
_count: z.lazy(() => SortOrderSchema).optional()
}).strict();
export const GameCountOrderByAggregateInputSchema: z.ZodType<Prisma.GameCountOrderByAggregateInput> = z.object({ export const GameCountOrderByAggregateInputSchema: z.ZodType<Prisma.GameCountOrderByAggregateInput> = z.object({
id: z.lazy(() => SortOrderSchema).optional(), id: z.lazy(() => SortOrderSchema).optional(),
createdAt: z.lazy(() => SortOrderSchema).optional(), createdAt: z.lazy(() => SortOrderSchema).optional(),
@ -2227,6 +2217,11 @@ export const BoolWithAggregatesFilterSchema: z.ZodType<Prisma.BoolWithAggregates
_max: z.lazy(() => NestedBoolFilterSchema).optional() _max: z.lazy(() => NestedBoolFilterSchema).optional()
}).strict(); }).strict();
export const GameRelationFilterSchema: z.ZodType<Prisma.GameRelationFilter> = z.object({
is: z.lazy(() => GameWhereInputSchema).optional(),
isNot: z.lazy(() => GameWhereInputSchema).optional()
}).strict();
export const GamepinCountOrderByAggregateInputSchema: z.ZodType<Prisma.GamepinCountOrderByAggregateInput> = z.object({ export const GamepinCountOrderByAggregateInputSchema: z.ZodType<Prisma.GamepinCountOrderByAggregateInput> = z.object({
id: z.lazy(() => SortOrderSchema).optional(), id: z.lazy(() => SortOrderSchema).optional(),
createdAt: z.lazy(() => SortOrderSchema).optional(), createdAt: z.lazy(() => SortOrderSchema).optional(),
@ -2254,6 +2249,12 @@ export const MoveListRelationFilterSchema: z.ZodType<Prisma.MoveListRelationFilt
none: z.lazy(() => MoveWhereInputSchema).optional() none: z.lazy(() => MoveWhereInputSchema).optional()
}).strict(); }).strict();
export const ShipListRelationFilterSchema: z.ZodType<Prisma.ShipListRelationFilter> = z.object({
every: z.lazy(() => ShipWhereInputSchema).optional(),
some: z.lazy(() => ShipWhereInputSchema).optional(),
none: z.lazy(() => ShipWhereInputSchema).optional()
}).strict();
export const ChatListRelationFilterSchema: z.ZodType<Prisma.ChatListRelationFilter> = z.object({ export const ChatListRelationFilterSchema: z.ZodType<Prisma.ChatListRelationFilter> = z.object({
every: z.lazy(() => ChatWhereInputSchema).optional(), every: z.lazy(() => ChatWhereInputSchema).optional(),
some: z.lazy(() => ChatWhereInputSchema).optional(), some: z.lazy(() => ChatWhereInputSchema).optional(),
@ -2264,6 +2265,10 @@ export const MoveOrderByRelationAggregateInputSchema: z.ZodType<Prisma.MoveOrder
_count: z.lazy(() => SortOrderSchema).optional() _count: z.lazy(() => SortOrderSchema).optional()
}).strict(); }).strict();
export const ShipOrderByRelationAggregateInputSchema: z.ZodType<Prisma.ShipOrderByRelationAggregateInput> = z.object({
_count: z.lazy(() => SortOrderSchema).optional()
}).strict();
export const ChatOrderByRelationAggregateInputSchema: z.ZodType<Prisma.ChatOrderByRelationAggregateInput> = z.object({ export const ChatOrderByRelationAggregateInputSchema: z.ZodType<Prisma.ChatOrderByRelationAggregateInput> = z.object({
_count: z.lazy(() => SortOrderSchema).optional() _count: z.lazy(() => SortOrderSchema).optional()
}).strict(); }).strict();
@ -2317,11 +2322,6 @@ export const EnumMoveTypeFilterSchema: z.ZodType<Prisma.EnumMoveTypeFilter> = z.
not: z.union([ z.lazy(() => MoveTypeSchema),z.lazy(() => NestedEnumMoveTypeFilterSchema) ]).optional(), not: z.union([ z.lazy(() => MoveTypeSchema),z.lazy(() => NestedEnumMoveTypeFilterSchema) ]).optional(),
}).strict(); }).strict();
export const User_GameRelationFilterSchema: z.ZodType<Prisma.User_GameRelationFilter> = z.object({
is: z.lazy(() => User_GameWhereInputSchema).optional(),
isNot: z.lazy(() => User_GameWhereInputSchema).optional()
}).strict();
export const MoveUser_game_idIndexCompoundUniqueInputSchema: z.ZodType<Prisma.MoveUser_game_idIndexCompoundUniqueInput> = z.object({ export const MoveUser_game_idIndexCompoundUniqueInputSchema: z.ZodType<Prisma.MoveUser_game_idIndexCompoundUniqueInput> = z.object({
user_game_id: z.string(), user_game_id: z.string(),
index: z.number() index: z.number()
@ -2590,10 +2590,10 @@ export const SessionUncheckedUpdateManyWithoutUserNestedInputSchema: z.ZodType<P
deleteMany: z.union([ z.lazy(() => SessionScalarWhereInputSchema),z.lazy(() => SessionScalarWhereInputSchema).array() ]).optional(), deleteMany: z.union([ z.lazy(() => SessionScalarWhereInputSchema),z.lazy(() => SessionScalarWhereInputSchema).array() ]).optional(),
}).strict(); }).strict();
export const GameCreateNestedOneWithoutShipsInputSchema: z.ZodType<Prisma.GameCreateNestedOneWithoutShipsInput> = z.object({ export const User_GameCreateNestedOneWithoutShipsInputSchema: z.ZodType<Prisma.User_GameCreateNestedOneWithoutShipsInput> = z.object({
create: z.union([ z.lazy(() => GameCreateWithoutShipsInputSchema),z.lazy(() => GameUncheckedCreateWithoutShipsInputSchema) ]).optional(), create: z.union([ z.lazy(() => User_GameCreateWithoutShipsInputSchema),z.lazy(() => User_GameUncheckedCreateWithoutShipsInputSchema) ]).optional(),
connectOrCreate: z.lazy(() => GameCreateOrConnectWithoutShipsInputSchema).optional(), connectOrCreate: z.lazy(() => User_GameCreateOrConnectWithoutShipsInputSchema).optional(),
connect: z.lazy(() => GameWhereUniqueInputSchema).optional() connect: z.lazy(() => User_GameWhereUniqueInputSchema).optional()
}).strict(); }).strict();
export const IntFieldUpdateOperationsInputSchema: z.ZodType<Prisma.IntFieldUpdateOperationsInput> = z.object({ export const IntFieldUpdateOperationsInputSchema: z.ZodType<Prisma.IntFieldUpdateOperationsInput> = z.object({
@ -2608,19 +2608,12 @@ export const EnumOrientationFieldUpdateOperationsInputSchema: z.ZodType<Prisma.E
set: z.lazy(() => OrientationSchema).optional() set: z.lazy(() => OrientationSchema).optional()
}).strict(); }).strict();
export const GameUpdateOneRequiredWithoutShipsNestedInputSchema: z.ZodType<Prisma.GameUpdateOneRequiredWithoutShipsNestedInput> = z.object({ export const User_GameUpdateOneRequiredWithoutShipsNestedInputSchema: z.ZodType<Prisma.User_GameUpdateOneRequiredWithoutShipsNestedInput> = z.object({
create: z.union([ z.lazy(() => GameCreateWithoutShipsInputSchema),z.lazy(() => GameUncheckedCreateWithoutShipsInputSchema) ]).optional(), create: z.union([ z.lazy(() => User_GameCreateWithoutShipsInputSchema),z.lazy(() => User_GameUncheckedCreateWithoutShipsInputSchema) ]).optional(),
connectOrCreate: z.lazy(() => GameCreateOrConnectWithoutShipsInputSchema).optional(), connectOrCreate: z.lazy(() => User_GameCreateOrConnectWithoutShipsInputSchema).optional(),
upsert: z.lazy(() => GameUpsertWithoutShipsInputSchema).optional(), upsert: z.lazy(() => User_GameUpsertWithoutShipsInputSchema).optional(),
connect: z.lazy(() => GameWhereUniqueInputSchema).optional(), connect: z.lazy(() => User_GameWhereUniqueInputSchema).optional(),
update: z.union([ z.lazy(() => GameUpdateWithoutShipsInputSchema),z.lazy(() => GameUncheckedUpdateWithoutShipsInputSchema) ]).optional(), update: z.union([ z.lazy(() => User_GameUpdateWithoutShipsInputSchema),z.lazy(() => User_GameUncheckedUpdateWithoutShipsInputSchema) ]).optional(),
}).strict();
export const ShipCreateNestedManyWithoutGameInputSchema: z.ZodType<Prisma.ShipCreateNestedManyWithoutGameInput> = z.object({
create: z.union([ z.lazy(() => ShipCreateWithoutGameInputSchema),z.lazy(() => ShipCreateWithoutGameInputSchema).array(),z.lazy(() => ShipUncheckedCreateWithoutGameInputSchema),z.lazy(() => ShipUncheckedCreateWithoutGameInputSchema).array() ]).optional(),
connectOrCreate: z.union([ z.lazy(() => ShipCreateOrConnectWithoutGameInputSchema),z.lazy(() => ShipCreateOrConnectWithoutGameInputSchema).array() ]).optional(),
createMany: z.lazy(() => ShipCreateManyGameInputEnvelopeSchema).optional(),
connect: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
}).strict(); }).strict();
export const GamepinCreateNestedOneWithoutGameInputSchema: z.ZodType<Prisma.GamepinCreateNestedOneWithoutGameInput> = z.object({ export const GamepinCreateNestedOneWithoutGameInputSchema: z.ZodType<Prisma.GamepinCreateNestedOneWithoutGameInput> = z.object({
@ -2636,13 +2629,6 @@ export const User_GameCreateNestedManyWithoutGameInputSchema: z.ZodType<Prisma.U
connect: z.union([ z.lazy(() => User_GameWhereUniqueInputSchema),z.lazy(() => User_GameWhereUniqueInputSchema).array() ]).optional(), connect: z.union([ z.lazy(() => User_GameWhereUniqueInputSchema),z.lazy(() => User_GameWhereUniqueInputSchema).array() ]).optional(),
}).strict(); }).strict();
export const ShipUncheckedCreateNestedManyWithoutGameInputSchema: z.ZodType<Prisma.ShipUncheckedCreateNestedManyWithoutGameInput> = z.object({
create: z.union([ z.lazy(() => ShipCreateWithoutGameInputSchema),z.lazy(() => ShipCreateWithoutGameInputSchema).array(),z.lazy(() => ShipUncheckedCreateWithoutGameInputSchema),z.lazy(() => ShipUncheckedCreateWithoutGameInputSchema).array() ]).optional(),
connectOrCreate: z.union([ z.lazy(() => ShipCreateOrConnectWithoutGameInputSchema),z.lazy(() => ShipCreateOrConnectWithoutGameInputSchema).array() ]).optional(),
createMany: z.lazy(() => ShipCreateManyGameInputEnvelopeSchema).optional(),
connect: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
}).strict();
export const GamepinUncheckedCreateNestedOneWithoutGameInputSchema: z.ZodType<Prisma.GamepinUncheckedCreateNestedOneWithoutGameInput> = z.object({ export const GamepinUncheckedCreateNestedOneWithoutGameInputSchema: z.ZodType<Prisma.GamepinUncheckedCreateNestedOneWithoutGameInput> = z.object({
create: z.union([ z.lazy(() => GamepinCreateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedCreateWithoutGameInputSchema) ]).optional(), create: z.union([ z.lazy(() => GamepinCreateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedCreateWithoutGameInputSchema) ]).optional(),
connectOrCreate: z.lazy(() => GamepinCreateOrConnectWithoutGameInputSchema).optional(), connectOrCreate: z.lazy(() => GamepinCreateOrConnectWithoutGameInputSchema).optional(),
@ -2664,20 +2650,6 @@ export const BoolFieldUpdateOperationsInputSchema: z.ZodType<Prisma.BoolFieldUpd
set: z.boolean().optional() set: z.boolean().optional()
}).strict(); }).strict();
export const ShipUpdateManyWithoutGameNestedInputSchema: z.ZodType<Prisma.ShipUpdateManyWithoutGameNestedInput> = z.object({
create: z.union([ z.lazy(() => ShipCreateWithoutGameInputSchema),z.lazy(() => ShipCreateWithoutGameInputSchema).array(),z.lazy(() => ShipUncheckedCreateWithoutGameInputSchema),z.lazy(() => ShipUncheckedCreateWithoutGameInputSchema).array() ]).optional(),
connectOrCreate: z.union([ z.lazy(() => ShipCreateOrConnectWithoutGameInputSchema),z.lazy(() => ShipCreateOrConnectWithoutGameInputSchema).array() ]).optional(),
upsert: z.union([ z.lazy(() => ShipUpsertWithWhereUniqueWithoutGameInputSchema),z.lazy(() => ShipUpsertWithWhereUniqueWithoutGameInputSchema).array() ]).optional(),
createMany: z.lazy(() => ShipCreateManyGameInputEnvelopeSchema).optional(),
set: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
disconnect: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
delete: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
connect: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
update: z.union([ z.lazy(() => ShipUpdateWithWhereUniqueWithoutGameInputSchema),z.lazy(() => ShipUpdateWithWhereUniqueWithoutGameInputSchema).array() ]).optional(),
updateMany: z.union([ z.lazy(() => ShipUpdateManyWithWhereWithoutGameInputSchema),z.lazy(() => ShipUpdateManyWithWhereWithoutGameInputSchema).array() ]).optional(),
deleteMany: z.union([ z.lazy(() => ShipScalarWhereInputSchema),z.lazy(() => ShipScalarWhereInputSchema).array() ]).optional(),
}).strict();
export const GamepinUpdateOneWithoutGameNestedInputSchema: z.ZodType<Prisma.GamepinUpdateOneWithoutGameNestedInput> = z.object({ export const GamepinUpdateOneWithoutGameNestedInputSchema: z.ZodType<Prisma.GamepinUpdateOneWithoutGameNestedInput> = z.object({
create: z.union([ z.lazy(() => GamepinCreateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedCreateWithoutGameInputSchema) ]).optional(), create: z.union([ z.lazy(() => GamepinCreateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedCreateWithoutGameInputSchema) ]).optional(),
connectOrCreate: z.lazy(() => GamepinCreateOrConnectWithoutGameInputSchema).optional(), connectOrCreate: z.lazy(() => GamepinCreateOrConnectWithoutGameInputSchema).optional(),
@ -2702,20 +2674,6 @@ export const User_GameUpdateManyWithoutGameNestedInputSchema: z.ZodType<Prisma.U
deleteMany: z.union([ z.lazy(() => User_GameScalarWhereInputSchema),z.lazy(() => User_GameScalarWhereInputSchema).array() ]).optional(), deleteMany: z.union([ z.lazy(() => User_GameScalarWhereInputSchema),z.lazy(() => User_GameScalarWhereInputSchema).array() ]).optional(),
}).strict(); }).strict();
export const ShipUncheckedUpdateManyWithoutGameNestedInputSchema: z.ZodType<Prisma.ShipUncheckedUpdateManyWithoutGameNestedInput> = z.object({
create: z.union([ z.lazy(() => ShipCreateWithoutGameInputSchema),z.lazy(() => ShipCreateWithoutGameInputSchema).array(),z.lazy(() => ShipUncheckedCreateWithoutGameInputSchema),z.lazy(() => ShipUncheckedCreateWithoutGameInputSchema).array() ]).optional(),
connectOrCreate: z.union([ z.lazy(() => ShipCreateOrConnectWithoutGameInputSchema),z.lazy(() => ShipCreateOrConnectWithoutGameInputSchema).array() ]).optional(),
upsert: z.union([ z.lazy(() => ShipUpsertWithWhereUniqueWithoutGameInputSchema),z.lazy(() => ShipUpsertWithWhereUniqueWithoutGameInputSchema).array() ]).optional(),
createMany: z.lazy(() => ShipCreateManyGameInputEnvelopeSchema).optional(),
set: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
disconnect: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
delete: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
connect: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
update: z.union([ z.lazy(() => ShipUpdateWithWhereUniqueWithoutGameInputSchema),z.lazy(() => ShipUpdateWithWhereUniqueWithoutGameInputSchema).array() ]).optional(),
updateMany: z.union([ z.lazy(() => ShipUpdateManyWithWhereWithoutGameInputSchema),z.lazy(() => ShipUpdateManyWithWhereWithoutGameInputSchema).array() ]).optional(),
deleteMany: z.union([ z.lazy(() => ShipScalarWhereInputSchema),z.lazy(() => ShipScalarWhereInputSchema).array() ]).optional(),
}).strict();
export const GamepinUncheckedUpdateOneWithoutGameNestedInputSchema: z.ZodType<Prisma.GamepinUncheckedUpdateOneWithoutGameNestedInput> = z.object({ export const GamepinUncheckedUpdateOneWithoutGameNestedInputSchema: z.ZodType<Prisma.GamepinUncheckedUpdateOneWithoutGameNestedInput> = z.object({
create: z.union([ z.lazy(() => GamepinCreateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedCreateWithoutGameInputSchema) ]).optional(), create: z.union([ z.lazy(() => GamepinCreateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedCreateWithoutGameInputSchema) ]).optional(),
connectOrCreate: z.lazy(() => GamepinCreateOrConnectWithoutGameInputSchema).optional(), connectOrCreate: z.lazy(() => GamepinCreateOrConnectWithoutGameInputSchema).optional(),
@ -2761,6 +2719,13 @@ export const MoveCreateNestedManyWithoutUser_gameInputSchema: z.ZodType<Prisma.M
connect: z.union([ z.lazy(() => MoveWhereUniqueInputSchema),z.lazy(() => MoveWhereUniqueInputSchema).array() ]).optional(), connect: z.union([ z.lazy(() => MoveWhereUniqueInputSchema),z.lazy(() => MoveWhereUniqueInputSchema).array() ]).optional(),
}).strict(); }).strict();
export const ShipCreateNestedManyWithoutUser_GameInputSchema: z.ZodType<Prisma.ShipCreateNestedManyWithoutUser_GameInput> = z.object({
create: z.union([ z.lazy(() => ShipCreateWithoutUser_GameInputSchema),z.lazy(() => ShipCreateWithoutUser_GameInputSchema).array(),z.lazy(() => ShipUncheckedCreateWithoutUser_GameInputSchema),z.lazy(() => ShipUncheckedCreateWithoutUser_GameInputSchema).array() ]).optional(),
connectOrCreate: z.union([ z.lazy(() => ShipCreateOrConnectWithoutUser_GameInputSchema),z.lazy(() => ShipCreateOrConnectWithoutUser_GameInputSchema).array() ]).optional(),
createMany: z.lazy(() => ShipCreateManyUser_GameInputEnvelopeSchema).optional(),
connect: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
}).strict();
export const ChatCreateNestedManyWithoutUser_gameInputSchema: z.ZodType<Prisma.ChatCreateNestedManyWithoutUser_gameInput> = z.object({ export const ChatCreateNestedManyWithoutUser_gameInputSchema: z.ZodType<Prisma.ChatCreateNestedManyWithoutUser_gameInput> = z.object({
create: z.union([ z.lazy(() => ChatCreateWithoutUser_gameInputSchema),z.lazy(() => ChatCreateWithoutUser_gameInputSchema).array(),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema).array() ]).optional(), create: z.union([ z.lazy(() => ChatCreateWithoutUser_gameInputSchema),z.lazy(() => ChatCreateWithoutUser_gameInputSchema).array(),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema).array() ]).optional(),
connectOrCreate: z.union([ z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema),z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema).array() ]).optional(), connectOrCreate: z.union([ z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema),z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema).array() ]).optional(),
@ -2787,6 +2752,13 @@ export const MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema: z.ZodType
connect: z.union([ z.lazy(() => MoveWhereUniqueInputSchema),z.lazy(() => MoveWhereUniqueInputSchema).array() ]).optional(), connect: z.union([ z.lazy(() => MoveWhereUniqueInputSchema),z.lazy(() => MoveWhereUniqueInputSchema).array() ]).optional(),
}).strict(); }).strict();
export const ShipUncheckedCreateNestedManyWithoutUser_GameInputSchema: z.ZodType<Prisma.ShipUncheckedCreateNestedManyWithoutUser_GameInput> = z.object({
create: z.union([ z.lazy(() => ShipCreateWithoutUser_GameInputSchema),z.lazy(() => ShipCreateWithoutUser_GameInputSchema).array(),z.lazy(() => ShipUncheckedCreateWithoutUser_GameInputSchema),z.lazy(() => ShipUncheckedCreateWithoutUser_GameInputSchema).array() ]).optional(),
connectOrCreate: z.union([ z.lazy(() => ShipCreateOrConnectWithoutUser_GameInputSchema),z.lazy(() => ShipCreateOrConnectWithoutUser_GameInputSchema).array() ]).optional(),
createMany: z.lazy(() => ShipCreateManyUser_GameInputEnvelopeSchema).optional(),
connect: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
}).strict();
export const ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema: z.ZodType<Prisma.ChatUncheckedCreateNestedManyWithoutUser_gameInput> = z.object({ export const ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema: z.ZodType<Prisma.ChatUncheckedCreateNestedManyWithoutUser_gameInput> = z.object({
create: z.union([ z.lazy(() => ChatCreateWithoutUser_gameInputSchema),z.lazy(() => ChatCreateWithoutUser_gameInputSchema).array(),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema).array() ]).optional(), create: z.union([ z.lazy(() => ChatCreateWithoutUser_gameInputSchema),z.lazy(() => ChatCreateWithoutUser_gameInputSchema).array(),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema).array() ]).optional(),
connectOrCreate: z.union([ z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema),z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema).array() ]).optional(), connectOrCreate: z.union([ z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema),z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema).array() ]).optional(),
@ -2808,6 +2780,20 @@ export const MoveUpdateManyWithoutUser_gameNestedInputSchema: z.ZodType<Prisma.M
deleteMany: z.union([ z.lazy(() => MoveScalarWhereInputSchema),z.lazy(() => MoveScalarWhereInputSchema).array() ]).optional(), deleteMany: z.union([ z.lazy(() => MoveScalarWhereInputSchema),z.lazy(() => MoveScalarWhereInputSchema).array() ]).optional(),
}).strict(); }).strict();
export const ShipUpdateManyWithoutUser_GameNestedInputSchema: z.ZodType<Prisma.ShipUpdateManyWithoutUser_GameNestedInput> = z.object({
create: z.union([ z.lazy(() => ShipCreateWithoutUser_GameInputSchema),z.lazy(() => ShipCreateWithoutUser_GameInputSchema).array(),z.lazy(() => ShipUncheckedCreateWithoutUser_GameInputSchema),z.lazy(() => ShipUncheckedCreateWithoutUser_GameInputSchema).array() ]).optional(),
connectOrCreate: z.union([ z.lazy(() => ShipCreateOrConnectWithoutUser_GameInputSchema),z.lazy(() => ShipCreateOrConnectWithoutUser_GameInputSchema).array() ]).optional(),
upsert: z.union([ z.lazy(() => ShipUpsertWithWhereUniqueWithoutUser_GameInputSchema),z.lazy(() => ShipUpsertWithWhereUniqueWithoutUser_GameInputSchema).array() ]).optional(),
createMany: z.lazy(() => ShipCreateManyUser_GameInputEnvelopeSchema).optional(),
set: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
disconnect: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
delete: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
connect: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
update: z.union([ z.lazy(() => ShipUpdateWithWhereUniqueWithoutUser_GameInputSchema),z.lazy(() => ShipUpdateWithWhereUniqueWithoutUser_GameInputSchema).array() ]).optional(),
updateMany: z.union([ z.lazy(() => ShipUpdateManyWithWhereWithoutUser_GameInputSchema),z.lazy(() => ShipUpdateManyWithWhereWithoutUser_GameInputSchema).array() ]).optional(),
deleteMany: z.union([ z.lazy(() => ShipScalarWhereInputSchema),z.lazy(() => ShipScalarWhereInputSchema).array() ]).optional(),
}).strict();
export const ChatUpdateManyWithoutUser_gameNestedInputSchema: z.ZodType<Prisma.ChatUpdateManyWithoutUser_gameNestedInput> = z.object({ export const ChatUpdateManyWithoutUser_gameNestedInputSchema: z.ZodType<Prisma.ChatUpdateManyWithoutUser_gameNestedInput> = z.object({
create: z.union([ z.lazy(() => ChatCreateWithoutUser_gameInputSchema),z.lazy(() => ChatCreateWithoutUser_gameInputSchema).array(),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema).array() ]).optional(), create: z.union([ z.lazy(() => ChatCreateWithoutUser_gameInputSchema),z.lazy(() => ChatCreateWithoutUser_gameInputSchema).array(),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema).array() ]).optional(),
connectOrCreate: z.union([ z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema),z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema).array() ]).optional(), connectOrCreate: z.union([ z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema),z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema).array() ]).optional(),
@ -2852,6 +2838,20 @@ export const MoveUncheckedUpdateManyWithoutUser_gameNestedInputSchema: z.ZodType
deleteMany: z.union([ z.lazy(() => MoveScalarWhereInputSchema),z.lazy(() => MoveScalarWhereInputSchema).array() ]).optional(), deleteMany: z.union([ z.lazy(() => MoveScalarWhereInputSchema),z.lazy(() => MoveScalarWhereInputSchema).array() ]).optional(),
}).strict(); }).strict();
export const ShipUncheckedUpdateManyWithoutUser_GameNestedInputSchema: z.ZodType<Prisma.ShipUncheckedUpdateManyWithoutUser_GameNestedInput> = z.object({
create: z.union([ z.lazy(() => ShipCreateWithoutUser_GameInputSchema),z.lazy(() => ShipCreateWithoutUser_GameInputSchema).array(),z.lazy(() => ShipUncheckedCreateWithoutUser_GameInputSchema),z.lazy(() => ShipUncheckedCreateWithoutUser_GameInputSchema).array() ]).optional(),
connectOrCreate: z.union([ z.lazy(() => ShipCreateOrConnectWithoutUser_GameInputSchema),z.lazy(() => ShipCreateOrConnectWithoutUser_GameInputSchema).array() ]).optional(),
upsert: z.union([ z.lazy(() => ShipUpsertWithWhereUniqueWithoutUser_GameInputSchema),z.lazy(() => ShipUpsertWithWhereUniqueWithoutUser_GameInputSchema).array() ]).optional(),
createMany: z.lazy(() => ShipCreateManyUser_GameInputEnvelopeSchema).optional(),
set: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
disconnect: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
delete: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
connect: z.union([ z.lazy(() => ShipWhereUniqueInputSchema),z.lazy(() => ShipWhereUniqueInputSchema).array() ]).optional(),
update: z.union([ z.lazy(() => ShipUpdateWithWhereUniqueWithoutUser_GameInputSchema),z.lazy(() => ShipUpdateWithWhereUniqueWithoutUser_GameInputSchema).array() ]).optional(),
updateMany: z.union([ z.lazy(() => ShipUpdateManyWithWhereWithoutUser_GameInputSchema),z.lazy(() => ShipUpdateManyWithWhereWithoutUser_GameInputSchema).array() ]).optional(),
deleteMany: z.union([ z.lazy(() => ShipScalarWhereInputSchema),z.lazy(() => ShipScalarWhereInputSchema).array() ]).optional(),
}).strict();
export const ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema: z.ZodType<Prisma.ChatUncheckedUpdateManyWithoutUser_gameNestedInput> = z.object({ export const ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema: z.ZodType<Prisma.ChatUncheckedUpdateManyWithoutUser_gameNestedInput> = z.object({
create: z.union([ z.lazy(() => ChatCreateWithoutUser_gameInputSchema),z.lazy(() => ChatCreateWithoutUser_gameInputSchema).array(),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema).array() ]).optional(), create: z.union([ z.lazy(() => ChatCreateWithoutUser_gameInputSchema),z.lazy(() => ChatCreateWithoutUser_gameInputSchema).array(),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema),z.lazy(() => ChatUncheckedCreateWithoutUser_gameInputSchema).array() ]).optional(),
connectOrCreate: z.union([ z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema),z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema).array() ]).optional(), connectOrCreate: z.union([ z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema),z.lazy(() => ChatCreateOrConnectWithoutUser_gameInputSchema).array() ]).optional(),
@ -3271,6 +3271,7 @@ export const User_GameCreateWithoutUserInputSchema: z.ZodType<Prisma.User_GameCr
createdAt: z.coerce.date().optional(), createdAt: z.coerce.date().optional(),
index: z.number().int(), index: z.number().int(),
moves: z.lazy(() => MoveCreateNestedManyWithoutUser_gameInputSchema).optional(), moves: z.lazy(() => MoveCreateNestedManyWithoutUser_gameInputSchema).optional(),
ships: z.lazy(() => ShipCreateNestedManyWithoutUser_GameInputSchema).optional(),
chats: z.lazy(() => ChatCreateNestedManyWithoutUser_gameInputSchema).optional(), chats: z.lazy(() => ChatCreateNestedManyWithoutUser_gameInputSchema).optional(),
game: z.lazy(() => GameCreateNestedOneWithoutUsersInputSchema) game: z.lazy(() => GameCreateNestedOneWithoutUsersInputSchema)
}).strict(); }).strict();
@ -3281,6 +3282,7 @@ export const User_GameUncheckedCreateWithoutUserInputSchema: z.ZodType<Prisma.Us
gameId: z.string(), gameId: z.string(),
index: z.number().int(), index: z.number().int(),
moves: z.lazy(() => MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional(), moves: z.lazy(() => MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional(),
ships: z.lazy(() => ShipUncheckedCreateNestedManyWithoutUser_GameInputSchema).optional(),
chats: z.lazy(() => ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional() chats: z.lazy(() => ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional()
}).strict(); }).strict();
@ -3450,94 +3452,54 @@ export const SessionScalarWhereInputSchema: z.ZodType<Prisma.SessionScalarWhereI
expires: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(), expires: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(),
}).strict(); }).strict();
export const GameCreateWithoutShipsInputSchema: z.ZodType<Prisma.GameCreateWithoutShipsInput> = z.object({ export const User_GameCreateWithoutShipsInputSchema: z.ZodType<Prisma.User_GameCreateWithoutShipsInput> = z.object({
id: z.string().cuid().optional(), id: z.string().cuid().optional(),
createdAt: z.coerce.date().optional(), createdAt: z.coerce.date().optional(),
updatedAt: z.coerce.date().optional(), index: z.number().int(),
state: z.lazy(() => GameStateSchema).optional(), moves: z.lazy(() => MoveCreateNestedManyWithoutUser_gameInputSchema).optional(),
allowSpectators: z.boolean().optional(), chats: z.lazy(() => ChatCreateNestedManyWithoutUser_gameInputSchema).optional(),
allowSpecials: z.boolean().optional(), game: z.lazy(() => GameCreateNestedOneWithoutUsersInputSchema),
allowChat: z.boolean().optional(), user: z.lazy(() => UserCreateNestedOneWithoutGamesInputSchema)
allowMarkDraw: z.boolean().optional(),
gamePin: z.lazy(() => GamepinCreateNestedOneWithoutGameInputSchema).optional(),
users: z.lazy(() => User_GameCreateNestedManyWithoutGameInputSchema).optional()
}).strict(); }).strict();
export const GameUncheckedCreateWithoutShipsInputSchema: z.ZodType<Prisma.GameUncheckedCreateWithoutShipsInput> = z.object({ export const User_GameUncheckedCreateWithoutShipsInputSchema: z.ZodType<Prisma.User_GameUncheckedCreateWithoutShipsInput> = z.object({
id: z.string().cuid().optional(), id: z.string().cuid().optional(),
createdAt: z.coerce.date().optional(), createdAt: z.coerce.date().optional(),
updatedAt: z.coerce.date().optional(), gameId: z.string(),
state: z.lazy(() => GameStateSchema).optional(), userId: z.string(),
allowSpectators: z.boolean().optional(), index: z.number().int(),
allowSpecials: z.boolean().optional(), moves: z.lazy(() => MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional(),
allowChat: z.boolean().optional(), chats: z.lazy(() => ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional()
allowMarkDraw: z.boolean().optional(),
gamePin: z.lazy(() => GamepinUncheckedCreateNestedOneWithoutGameInputSchema).optional(),
users: z.lazy(() => User_GameUncheckedCreateNestedManyWithoutGameInputSchema).optional()
}).strict(); }).strict();
export const GameCreateOrConnectWithoutShipsInputSchema: z.ZodType<Prisma.GameCreateOrConnectWithoutShipsInput> = z.object({ export const User_GameCreateOrConnectWithoutShipsInputSchema: z.ZodType<Prisma.User_GameCreateOrConnectWithoutShipsInput> = z.object({
where: z.lazy(() => GameWhereUniqueInputSchema), where: z.lazy(() => User_GameWhereUniqueInputSchema),
create: z.union([ z.lazy(() => GameCreateWithoutShipsInputSchema),z.lazy(() => GameUncheckedCreateWithoutShipsInputSchema) ]), create: z.union([ z.lazy(() => User_GameCreateWithoutShipsInputSchema),z.lazy(() => User_GameUncheckedCreateWithoutShipsInputSchema) ]),
}).strict(); }).strict();
export const GameUpsertWithoutShipsInputSchema: z.ZodType<Prisma.GameUpsertWithoutShipsInput> = z.object({ export const User_GameUpsertWithoutShipsInputSchema: z.ZodType<Prisma.User_GameUpsertWithoutShipsInput> = z.object({
update: z.union([ z.lazy(() => GameUpdateWithoutShipsInputSchema),z.lazy(() => GameUncheckedUpdateWithoutShipsInputSchema) ]), update: z.union([ z.lazy(() => User_GameUpdateWithoutShipsInputSchema),z.lazy(() => User_GameUncheckedUpdateWithoutShipsInputSchema) ]),
create: z.union([ z.lazy(() => GameCreateWithoutShipsInputSchema),z.lazy(() => GameUncheckedCreateWithoutShipsInputSchema) ]), create: z.union([ z.lazy(() => User_GameCreateWithoutShipsInputSchema),z.lazy(() => User_GameUncheckedCreateWithoutShipsInputSchema) ]),
}).strict(); }).strict();
export const GameUpdateWithoutShipsInputSchema: z.ZodType<Prisma.GameUpdateWithoutShipsInput> = z.object({ export const User_GameUpdateWithoutShipsInputSchema: z.ZodType<Prisma.User_GameUpdateWithoutShipsInput> = z.object({
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
state: z.union([ z.lazy(() => GameStateSchema),z.lazy(() => EnumGameStateFieldUpdateOperationsInputSchema) ]).optional(), moves: z.lazy(() => MoveUpdateManyWithoutUser_gameNestedInputSchema).optional(),
allowSpectators: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), chats: z.lazy(() => ChatUpdateManyWithoutUser_gameNestedInputSchema).optional(),
allowSpecials: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), game: z.lazy(() => GameUpdateOneRequiredWithoutUsersNestedInputSchema).optional(),
allowChat: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), user: z.lazy(() => UserUpdateOneRequiredWithoutGamesNestedInputSchema).optional()
allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
gamePin: z.lazy(() => GamepinUpdateOneWithoutGameNestedInputSchema).optional(),
users: z.lazy(() => User_GameUpdateManyWithoutGameNestedInputSchema).optional()
}).strict(); }).strict();
export const GameUncheckedUpdateWithoutShipsInputSchema: z.ZodType<Prisma.GameUncheckedUpdateWithoutShipsInput> = z.object({ export const User_GameUncheckedUpdateWithoutShipsInputSchema: z.ZodType<Prisma.User_GameUncheckedUpdateWithoutShipsInput> = z.object({
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), gameId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
state: z.union([ z.lazy(() => GameStateSchema),z.lazy(() => EnumGameStateFieldUpdateOperationsInputSchema) ]).optional(), userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
allowSpectators: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
allowSpecials: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), moves: z.lazy(() => MoveUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional(),
allowChat: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), chats: z.lazy(() => ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional()
allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
gamePin: z.lazy(() => GamepinUncheckedUpdateOneWithoutGameNestedInputSchema).optional(),
users: z.lazy(() => User_GameUncheckedUpdateManyWithoutGameNestedInputSchema).optional()
}).strict();
export const ShipCreateWithoutGameInputSchema: z.ZodType<Prisma.ShipCreateWithoutGameInput> = z.object({
id: z.string().cuid().optional(),
size: z.number().int(),
variant: z.number().int(),
x: z.number().int(),
y: z.number().int(),
orientation: z.lazy(() => OrientationSchema)
}).strict();
export const ShipUncheckedCreateWithoutGameInputSchema: z.ZodType<Prisma.ShipUncheckedCreateWithoutGameInput> = z.object({
id: z.string().cuid().optional(),
size: z.number().int(),
variant: z.number().int(),
x: z.number().int(),
y: z.number().int(),
orientation: z.lazy(() => OrientationSchema)
}).strict();
export const ShipCreateOrConnectWithoutGameInputSchema: z.ZodType<Prisma.ShipCreateOrConnectWithoutGameInput> = z.object({
where: z.lazy(() => ShipWhereUniqueInputSchema),
create: z.union([ z.lazy(() => ShipCreateWithoutGameInputSchema),z.lazy(() => ShipUncheckedCreateWithoutGameInputSchema) ]),
}).strict();
export const ShipCreateManyGameInputEnvelopeSchema: z.ZodType<Prisma.ShipCreateManyGameInputEnvelope> = z.object({
data: z.union([ z.lazy(() => ShipCreateManyGameInputSchema),z.lazy(() => ShipCreateManyGameInputSchema).array() ]),
skipDuplicates: z.boolean().optional()
}).strict(); }).strict();
export const GamepinCreateWithoutGameInputSchema: z.ZodType<Prisma.GamepinCreateWithoutGameInput> = z.object({ export const GamepinCreateWithoutGameInputSchema: z.ZodType<Prisma.GamepinCreateWithoutGameInput> = z.object({
@ -3562,6 +3524,7 @@ export const User_GameCreateWithoutGameInputSchema: z.ZodType<Prisma.User_GameCr
createdAt: z.coerce.date().optional(), createdAt: z.coerce.date().optional(),
index: z.number().int(), index: z.number().int(),
moves: z.lazy(() => MoveCreateNestedManyWithoutUser_gameInputSchema).optional(), moves: z.lazy(() => MoveCreateNestedManyWithoutUser_gameInputSchema).optional(),
ships: z.lazy(() => ShipCreateNestedManyWithoutUser_GameInputSchema).optional(),
chats: z.lazy(() => ChatCreateNestedManyWithoutUser_gameInputSchema).optional(), chats: z.lazy(() => ChatCreateNestedManyWithoutUser_gameInputSchema).optional(),
user: z.lazy(() => UserCreateNestedOneWithoutGamesInputSchema) user: z.lazy(() => UserCreateNestedOneWithoutGamesInputSchema)
}).strict(); }).strict();
@ -3572,6 +3535,7 @@ export const User_GameUncheckedCreateWithoutGameInputSchema: z.ZodType<Prisma.Us
userId: z.string(), userId: z.string(),
index: z.number().int(), index: z.number().int(),
moves: z.lazy(() => MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional(), moves: z.lazy(() => MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional(),
ships: z.lazy(() => ShipUncheckedCreateNestedManyWithoutUser_GameInputSchema).optional(),
chats: z.lazy(() => ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional() chats: z.lazy(() => ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional()
}).strict(); }).strict();
@ -3585,35 +3549,6 @@ export const User_GameCreateManyGameInputEnvelopeSchema: z.ZodType<Prisma.User_G
skipDuplicates: z.boolean().optional() skipDuplicates: z.boolean().optional()
}).strict(); }).strict();
export const ShipUpsertWithWhereUniqueWithoutGameInputSchema: z.ZodType<Prisma.ShipUpsertWithWhereUniqueWithoutGameInput> = z.object({
where: z.lazy(() => ShipWhereUniqueInputSchema),
update: z.union([ z.lazy(() => ShipUpdateWithoutGameInputSchema),z.lazy(() => ShipUncheckedUpdateWithoutGameInputSchema) ]),
create: z.union([ z.lazy(() => ShipCreateWithoutGameInputSchema),z.lazy(() => ShipUncheckedCreateWithoutGameInputSchema) ]),
}).strict();
export const ShipUpdateWithWhereUniqueWithoutGameInputSchema: z.ZodType<Prisma.ShipUpdateWithWhereUniqueWithoutGameInput> = z.object({
where: z.lazy(() => ShipWhereUniqueInputSchema),
data: z.union([ z.lazy(() => ShipUpdateWithoutGameInputSchema),z.lazy(() => ShipUncheckedUpdateWithoutGameInputSchema) ]),
}).strict();
export const ShipUpdateManyWithWhereWithoutGameInputSchema: z.ZodType<Prisma.ShipUpdateManyWithWhereWithoutGameInput> = z.object({
where: z.lazy(() => ShipScalarWhereInputSchema),
data: z.union([ z.lazy(() => ShipUpdateManyMutationInputSchema),z.lazy(() => ShipUncheckedUpdateManyWithoutShipsInputSchema) ]),
}).strict();
export const ShipScalarWhereInputSchema: z.ZodType<Prisma.ShipScalarWhereInput> = z.object({
AND: z.union([ z.lazy(() => ShipScalarWhereInputSchema),z.lazy(() => ShipScalarWhereInputSchema).array() ]).optional(),
OR: z.lazy(() => ShipScalarWhereInputSchema).array().optional(),
NOT: z.union([ z.lazy(() => ShipScalarWhereInputSchema),z.lazy(() => ShipScalarWhereInputSchema).array() ]).optional(),
id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(),
size: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(),
variant: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(),
x: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(),
y: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(),
orientation: z.union([ z.lazy(() => EnumOrientationFilterSchema),z.lazy(() => OrientationSchema) ]).optional(),
gameId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(),
}).strict();
export const GamepinUpsertWithoutGameInputSchema: z.ZodType<Prisma.GamepinUpsertWithoutGameInput> = z.object({ export const GamepinUpsertWithoutGameInputSchema: z.ZodType<Prisma.GamepinUpsertWithoutGameInput> = z.object({
update: z.union([ z.lazy(() => GamepinUpdateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedUpdateWithoutGameInputSchema) ]), update: z.union([ z.lazy(() => GamepinUpdateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedUpdateWithoutGameInputSchema) ]),
create: z.union([ z.lazy(() => GamepinCreateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedCreateWithoutGameInputSchema) ]), create: z.union([ z.lazy(() => GamepinCreateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedCreateWithoutGameInputSchema) ]),
@ -3656,7 +3591,6 @@ export const GameCreateWithoutGamePinInputSchema: z.ZodType<Prisma.GameCreateWit
allowSpecials: z.boolean().optional(), allowSpecials: z.boolean().optional(),
allowChat: z.boolean().optional(), allowChat: z.boolean().optional(),
allowMarkDraw: z.boolean().optional(), allowMarkDraw: z.boolean().optional(),
ships: z.lazy(() => ShipCreateNestedManyWithoutGameInputSchema).optional(),
users: z.lazy(() => User_GameCreateNestedManyWithoutGameInputSchema).optional() users: z.lazy(() => User_GameCreateNestedManyWithoutGameInputSchema).optional()
}).strict(); }).strict();
@ -3669,7 +3603,6 @@ export const GameUncheckedCreateWithoutGamePinInputSchema: z.ZodType<Prisma.Game
allowSpecials: z.boolean().optional(), allowSpecials: z.boolean().optional(),
allowChat: z.boolean().optional(), allowChat: z.boolean().optional(),
allowMarkDraw: z.boolean().optional(), allowMarkDraw: z.boolean().optional(),
ships: z.lazy(() => ShipUncheckedCreateNestedManyWithoutGameInputSchema).optional(),
users: z.lazy(() => User_GameUncheckedCreateNestedManyWithoutGameInputSchema).optional() users: z.lazy(() => User_GameUncheckedCreateNestedManyWithoutGameInputSchema).optional()
}).strict(); }).strict();
@ -3692,7 +3625,6 @@ export const GameUpdateWithoutGamePinInputSchema: z.ZodType<Prisma.GameUpdateWit
allowSpecials: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowSpecials: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowChat: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowChat: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
ships: z.lazy(() => ShipUpdateManyWithoutGameNestedInputSchema).optional(),
users: z.lazy(() => User_GameUpdateManyWithoutGameNestedInputSchema).optional() users: z.lazy(() => User_GameUpdateManyWithoutGameNestedInputSchema).optional()
}).strict(); }).strict();
@ -3705,7 +3637,6 @@ export const GameUncheckedUpdateWithoutGamePinInputSchema: z.ZodType<Prisma.Game
allowSpecials: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowSpecials: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowChat: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowChat: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
ships: z.lazy(() => ShipUncheckedUpdateManyWithoutGameNestedInputSchema).optional(),
users: z.lazy(() => User_GameUncheckedUpdateManyWithoutGameNestedInputSchema).optional() users: z.lazy(() => User_GameUncheckedUpdateManyWithoutGameNestedInputSchema).optional()
}).strict(); }).strict();
@ -3739,6 +3670,34 @@ export const MoveCreateManyUser_gameInputEnvelopeSchema: z.ZodType<Prisma.MoveCr
skipDuplicates: z.boolean().optional() skipDuplicates: z.boolean().optional()
}).strict(); }).strict();
export const ShipCreateWithoutUser_GameInputSchema: z.ZodType<Prisma.ShipCreateWithoutUser_GameInput> = z.object({
id: z.string().cuid().optional(),
size: z.number().int(),
variant: z.number().int(),
x: z.number().int(),
y: z.number().int(),
orientation: z.lazy(() => OrientationSchema)
}).strict();
export const ShipUncheckedCreateWithoutUser_GameInputSchema: z.ZodType<Prisma.ShipUncheckedCreateWithoutUser_GameInput> = z.object({
id: z.string().cuid().optional(),
size: z.number().int(),
variant: z.number().int(),
x: z.number().int(),
y: z.number().int(),
orientation: z.lazy(() => OrientationSchema)
}).strict();
export const ShipCreateOrConnectWithoutUser_GameInputSchema: z.ZodType<Prisma.ShipCreateOrConnectWithoutUser_GameInput> = z.object({
where: z.lazy(() => ShipWhereUniqueInputSchema),
create: z.union([ z.lazy(() => ShipCreateWithoutUser_GameInputSchema),z.lazy(() => ShipUncheckedCreateWithoutUser_GameInputSchema) ]),
}).strict();
export const ShipCreateManyUser_GameInputEnvelopeSchema: z.ZodType<Prisma.ShipCreateManyUser_GameInputEnvelope> = z.object({
data: z.union([ z.lazy(() => ShipCreateManyUser_GameInputSchema),z.lazy(() => ShipCreateManyUser_GameInputSchema).array() ]),
skipDuplicates: z.boolean().optional()
}).strict();
export const ChatCreateWithoutUser_gameInputSchema: z.ZodType<Prisma.ChatCreateWithoutUser_gameInput> = z.object({ export const ChatCreateWithoutUser_gameInputSchema: z.ZodType<Prisma.ChatCreateWithoutUser_gameInput> = z.object({
id: z.string().cuid().optional(), id: z.string().cuid().optional(),
createdAt: z.coerce.date().optional(), createdAt: z.coerce.date().optional(),
@ -3772,7 +3731,6 @@ export const GameCreateWithoutUsersInputSchema: z.ZodType<Prisma.GameCreateWitho
allowSpecials: z.boolean().optional(), allowSpecials: z.boolean().optional(),
allowChat: z.boolean().optional(), allowChat: z.boolean().optional(),
allowMarkDraw: z.boolean().optional(), allowMarkDraw: z.boolean().optional(),
ships: z.lazy(() => ShipCreateNestedManyWithoutGameInputSchema).optional(),
gamePin: z.lazy(() => GamepinCreateNestedOneWithoutGameInputSchema).optional() gamePin: z.lazy(() => GamepinCreateNestedOneWithoutGameInputSchema).optional()
}).strict(); }).strict();
@ -3785,7 +3743,6 @@ export const GameUncheckedCreateWithoutUsersInputSchema: z.ZodType<Prisma.GameUn
allowSpecials: z.boolean().optional(), allowSpecials: z.boolean().optional(),
allowChat: z.boolean().optional(), allowChat: z.boolean().optional(),
allowMarkDraw: z.boolean().optional(), allowMarkDraw: z.boolean().optional(),
ships: z.lazy(() => ShipUncheckedCreateNestedManyWithoutGameInputSchema).optional(),
gamePin: z.lazy(() => GamepinUncheckedCreateNestedOneWithoutGameInputSchema).optional() gamePin: z.lazy(() => GamepinUncheckedCreateNestedOneWithoutGameInputSchema).optional()
}).strict(); }).strict();
@ -3853,6 +3810,35 @@ export const MoveScalarWhereInputSchema: z.ZodType<Prisma.MoveScalarWhereInput>
user_game_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(), user_game_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(),
}).strict(); }).strict();
export const ShipUpsertWithWhereUniqueWithoutUser_GameInputSchema: z.ZodType<Prisma.ShipUpsertWithWhereUniqueWithoutUser_GameInput> = z.object({
where: z.lazy(() => ShipWhereUniqueInputSchema),
update: z.union([ z.lazy(() => ShipUpdateWithoutUser_GameInputSchema),z.lazy(() => ShipUncheckedUpdateWithoutUser_GameInputSchema) ]),
create: z.union([ z.lazy(() => ShipCreateWithoutUser_GameInputSchema),z.lazy(() => ShipUncheckedCreateWithoutUser_GameInputSchema) ]),
}).strict();
export const ShipUpdateWithWhereUniqueWithoutUser_GameInputSchema: z.ZodType<Prisma.ShipUpdateWithWhereUniqueWithoutUser_GameInput> = z.object({
where: z.lazy(() => ShipWhereUniqueInputSchema),
data: z.union([ z.lazy(() => ShipUpdateWithoutUser_GameInputSchema),z.lazy(() => ShipUncheckedUpdateWithoutUser_GameInputSchema) ]),
}).strict();
export const ShipUpdateManyWithWhereWithoutUser_GameInputSchema: z.ZodType<Prisma.ShipUpdateManyWithWhereWithoutUser_GameInput> = z.object({
where: z.lazy(() => ShipScalarWhereInputSchema),
data: z.union([ z.lazy(() => ShipUpdateManyMutationInputSchema),z.lazy(() => ShipUncheckedUpdateManyWithoutShipsInputSchema) ]),
}).strict();
export const ShipScalarWhereInputSchema: z.ZodType<Prisma.ShipScalarWhereInput> = z.object({
AND: z.union([ z.lazy(() => ShipScalarWhereInputSchema),z.lazy(() => ShipScalarWhereInputSchema).array() ]).optional(),
OR: z.lazy(() => ShipScalarWhereInputSchema).array().optional(),
NOT: z.union([ z.lazy(() => ShipScalarWhereInputSchema),z.lazy(() => ShipScalarWhereInputSchema).array() ]).optional(),
id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(),
size: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(),
variant: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(),
x: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(),
y: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(),
orientation: z.union([ z.lazy(() => EnumOrientationFilterSchema),z.lazy(() => OrientationSchema) ]).optional(),
user_GameId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(),
}).strict();
export const ChatUpsertWithWhereUniqueWithoutUser_gameInputSchema: z.ZodType<Prisma.ChatUpsertWithWhereUniqueWithoutUser_gameInput> = z.object({ export const ChatUpsertWithWhereUniqueWithoutUser_gameInputSchema: z.ZodType<Prisma.ChatUpsertWithWhereUniqueWithoutUser_gameInput> = z.object({
where: z.lazy(() => ChatWhereUniqueInputSchema), where: z.lazy(() => ChatWhereUniqueInputSchema),
update: z.union([ z.lazy(() => ChatUpdateWithoutUser_gameInputSchema),z.lazy(() => ChatUncheckedUpdateWithoutUser_gameInputSchema) ]), update: z.union([ z.lazy(() => ChatUpdateWithoutUser_gameInputSchema),z.lazy(() => ChatUncheckedUpdateWithoutUser_gameInputSchema) ]),
@ -3894,7 +3880,6 @@ export const GameUpdateWithoutUsersInputSchema: z.ZodType<Prisma.GameUpdateWitho
allowSpecials: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowSpecials: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowChat: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowChat: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
ships: z.lazy(() => ShipUpdateManyWithoutGameNestedInputSchema).optional(),
gamePin: z.lazy(() => GamepinUpdateOneWithoutGameNestedInputSchema).optional() gamePin: z.lazy(() => GamepinUpdateOneWithoutGameNestedInputSchema).optional()
}).strict(); }).strict();
@ -3907,7 +3892,6 @@ export const GameUncheckedUpdateWithoutUsersInputSchema: z.ZodType<Prisma.GameUn
allowSpecials: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowSpecials: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowChat: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowChat: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(), allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
ships: z.lazy(() => ShipUncheckedUpdateManyWithoutGameNestedInputSchema).optional(),
gamePin: z.lazy(() => GamepinUncheckedUpdateOneWithoutGameNestedInputSchema).optional() gamePin: z.lazy(() => GamepinUncheckedUpdateOneWithoutGameNestedInputSchema).optional()
}).strict(); }).strict();
@ -3944,6 +3928,7 @@ export const User_GameCreateWithoutMovesInputSchema: z.ZodType<Prisma.User_GameC
id: z.string().cuid().optional(), id: z.string().cuid().optional(),
createdAt: z.coerce.date().optional(), createdAt: z.coerce.date().optional(),
index: z.number().int(), index: z.number().int(),
ships: z.lazy(() => ShipCreateNestedManyWithoutUser_GameInputSchema).optional(),
chats: z.lazy(() => ChatCreateNestedManyWithoutUser_gameInputSchema).optional(), chats: z.lazy(() => ChatCreateNestedManyWithoutUser_gameInputSchema).optional(),
game: z.lazy(() => GameCreateNestedOneWithoutUsersInputSchema), game: z.lazy(() => GameCreateNestedOneWithoutUsersInputSchema),
user: z.lazy(() => UserCreateNestedOneWithoutGamesInputSchema) user: z.lazy(() => UserCreateNestedOneWithoutGamesInputSchema)
@ -3955,6 +3940,7 @@ export const User_GameUncheckedCreateWithoutMovesInputSchema: z.ZodType<Prisma.U
gameId: z.string(), gameId: z.string(),
userId: z.string(), userId: z.string(),
index: z.number().int(), index: z.number().int(),
ships: z.lazy(() => ShipUncheckedCreateNestedManyWithoutUser_GameInputSchema).optional(),
chats: z.lazy(() => ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional() chats: z.lazy(() => ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional()
}).strict(); }).strict();
@ -3972,6 +3958,7 @@ export const User_GameUpdateWithoutMovesInputSchema: z.ZodType<Prisma.User_GameU
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
ships: z.lazy(() => ShipUpdateManyWithoutUser_GameNestedInputSchema).optional(),
chats: z.lazy(() => ChatUpdateManyWithoutUser_gameNestedInputSchema).optional(), chats: z.lazy(() => ChatUpdateManyWithoutUser_gameNestedInputSchema).optional(),
game: z.lazy(() => GameUpdateOneRequiredWithoutUsersNestedInputSchema).optional(), game: z.lazy(() => GameUpdateOneRequiredWithoutUsersNestedInputSchema).optional(),
user: z.lazy(() => UserUpdateOneRequiredWithoutGamesNestedInputSchema).optional() user: z.lazy(() => UserUpdateOneRequiredWithoutGamesNestedInputSchema).optional()
@ -3983,6 +3970,7 @@ export const User_GameUncheckedUpdateWithoutMovesInputSchema: z.ZodType<Prisma.U
gameId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), gameId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
ships: z.lazy(() => ShipUncheckedUpdateManyWithoutUser_GameNestedInputSchema).optional(),
chats: z.lazy(() => ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional() chats: z.lazy(() => ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional()
}).strict(); }).strict();
@ -3991,6 +3979,7 @@ export const User_GameCreateWithoutChatsInputSchema: z.ZodType<Prisma.User_GameC
createdAt: z.coerce.date().optional(), createdAt: z.coerce.date().optional(),
index: z.number().int(), index: z.number().int(),
moves: z.lazy(() => MoveCreateNestedManyWithoutUser_gameInputSchema).optional(), moves: z.lazy(() => MoveCreateNestedManyWithoutUser_gameInputSchema).optional(),
ships: z.lazy(() => ShipCreateNestedManyWithoutUser_GameInputSchema).optional(),
game: z.lazy(() => GameCreateNestedOneWithoutUsersInputSchema), game: z.lazy(() => GameCreateNestedOneWithoutUsersInputSchema),
user: z.lazy(() => UserCreateNestedOneWithoutGamesInputSchema) user: z.lazy(() => UserCreateNestedOneWithoutGamesInputSchema)
}).strict(); }).strict();
@ -4001,7 +3990,8 @@ export const User_GameUncheckedCreateWithoutChatsInputSchema: z.ZodType<Prisma.U
gameId: z.string(), gameId: z.string(),
userId: z.string(), userId: z.string(),
index: z.number().int(), index: z.number().int(),
moves: z.lazy(() => MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional() moves: z.lazy(() => MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional(),
ships: z.lazy(() => ShipUncheckedCreateNestedManyWithoutUser_GameInputSchema).optional()
}).strict(); }).strict();
export const User_GameCreateOrConnectWithoutChatsInputSchema: z.ZodType<Prisma.User_GameCreateOrConnectWithoutChatsInput> = z.object({ export const User_GameCreateOrConnectWithoutChatsInputSchema: z.ZodType<Prisma.User_GameCreateOrConnectWithoutChatsInput> = z.object({
@ -4019,6 +4009,7 @@ export const User_GameUpdateWithoutChatsInputSchema: z.ZodType<Prisma.User_GameU
createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
moves: z.lazy(() => MoveUpdateManyWithoutUser_gameNestedInputSchema).optional(), moves: z.lazy(() => MoveUpdateManyWithoutUser_gameNestedInputSchema).optional(),
ships: z.lazy(() => ShipUpdateManyWithoutUser_GameNestedInputSchema).optional(),
game: z.lazy(() => GameUpdateOneRequiredWithoutUsersNestedInputSchema).optional(), game: z.lazy(() => GameUpdateOneRequiredWithoutUsersNestedInputSchema).optional(),
user: z.lazy(() => UserUpdateOneRequiredWithoutGamesNestedInputSchema).optional() user: z.lazy(() => UserUpdateOneRequiredWithoutGamesNestedInputSchema).optional()
}).strict(); }).strict();
@ -4029,7 +4020,8 @@ export const User_GameUncheckedUpdateWithoutChatsInputSchema: z.ZodType<Prisma.U
gameId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), gameId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
moves: z.lazy(() => MoveUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional() moves: z.lazy(() => MoveUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional(),
ships: z.lazy(() => ShipUncheckedUpdateManyWithoutUser_GameNestedInputSchema).optional()
}).strict(); }).strict();
export const User_GameCreateManyUserInputSchema: z.ZodType<Prisma.User_GameCreateManyUserInput> = z.object({ export const User_GameCreateManyUserInputSchema: z.ZodType<Prisma.User_GameCreateManyUserInput> = z.object({
@ -4067,6 +4059,7 @@ export const User_GameUpdateWithoutUserInputSchema: z.ZodType<Prisma.User_GameUp
createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
moves: z.lazy(() => MoveUpdateManyWithoutUser_gameNestedInputSchema).optional(), moves: z.lazy(() => MoveUpdateManyWithoutUser_gameNestedInputSchema).optional(),
ships: z.lazy(() => ShipUpdateManyWithoutUser_GameNestedInputSchema).optional(),
chats: z.lazy(() => ChatUpdateManyWithoutUser_gameNestedInputSchema).optional(), chats: z.lazy(() => ChatUpdateManyWithoutUser_gameNestedInputSchema).optional(),
game: z.lazy(() => GameUpdateOneRequiredWithoutUsersNestedInputSchema).optional() game: z.lazy(() => GameUpdateOneRequiredWithoutUsersNestedInputSchema).optional()
}).strict(); }).strict();
@ -4077,6 +4070,7 @@ export const User_GameUncheckedUpdateWithoutUserInputSchema: z.ZodType<Prisma.Us
gameId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), gameId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
moves: z.lazy(() => MoveUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional(), moves: z.lazy(() => MoveUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional(),
ships: z.lazy(() => ShipUncheckedUpdateManyWithoutUser_GameNestedInputSchema).optional(),
chats: z.lazy(() => ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional() chats: z.lazy(() => ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional()
}).strict(); }).strict();
@ -4156,15 +4150,6 @@ export const SessionUncheckedUpdateManyWithoutSessionsInputSchema: z.ZodType<Pri
expires: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), expires: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
}).strict(); }).strict();
export const ShipCreateManyGameInputSchema: z.ZodType<Prisma.ShipCreateManyGameInput> = z.object({
id: z.string().cuid().optional(),
size: z.number().int(),
variant: z.number().int(),
x: z.number().int(),
y: z.number().int(),
orientation: z.lazy(() => OrientationSchema)
}).strict();
export const User_GameCreateManyGameInputSchema: z.ZodType<Prisma.User_GameCreateManyGameInput> = z.object({ export const User_GameCreateManyGameInputSchema: z.ZodType<Prisma.User_GameCreateManyGameInput> = z.object({
id: z.string().cuid().optional(), id: z.string().cuid().optional(),
createdAt: z.coerce.date().optional(), createdAt: z.coerce.date().optional(),
@ -4172,38 +4157,12 @@ export const User_GameCreateManyGameInputSchema: z.ZodType<Prisma.User_GameCreat
index: z.number().int() index: z.number().int()
}).strict(); }).strict();
export const ShipUpdateWithoutGameInputSchema: z.ZodType<Prisma.ShipUpdateWithoutGameInput> = z.object({
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
size: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
variant: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
x: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
y: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
orientation: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(),
}).strict();
export const ShipUncheckedUpdateWithoutGameInputSchema: z.ZodType<Prisma.ShipUncheckedUpdateWithoutGameInput> = z.object({
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
size: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
variant: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
x: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
y: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
orientation: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(),
}).strict();
export const ShipUncheckedUpdateManyWithoutShipsInputSchema: z.ZodType<Prisma.ShipUncheckedUpdateManyWithoutShipsInput> = z.object({
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
size: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
variant: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
x: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
y: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
orientation: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(),
}).strict();
export const User_GameUpdateWithoutGameInputSchema: z.ZodType<Prisma.User_GameUpdateWithoutGameInput> = z.object({ export const User_GameUpdateWithoutGameInputSchema: z.ZodType<Prisma.User_GameUpdateWithoutGameInput> = z.object({
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
moves: z.lazy(() => MoveUpdateManyWithoutUser_gameNestedInputSchema).optional(), moves: z.lazy(() => MoveUpdateManyWithoutUser_gameNestedInputSchema).optional(),
ships: z.lazy(() => ShipUpdateManyWithoutUser_GameNestedInputSchema).optional(),
chats: z.lazy(() => ChatUpdateManyWithoutUser_gameNestedInputSchema).optional(), chats: z.lazy(() => ChatUpdateManyWithoutUser_gameNestedInputSchema).optional(),
user: z.lazy(() => UserUpdateOneRequiredWithoutGamesNestedInputSchema).optional() user: z.lazy(() => UserUpdateOneRequiredWithoutGamesNestedInputSchema).optional()
}).strict(); }).strict();
@ -4214,6 +4173,7 @@ export const User_GameUncheckedUpdateWithoutGameInputSchema: z.ZodType<Prisma.Us
userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(), index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
moves: z.lazy(() => MoveUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional(), moves: z.lazy(() => MoveUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional(),
ships: z.lazy(() => ShipUncheckedUpdateManyWithoutUser_GameNestedInputSchema).optional(),
chats: z.lazy(() => ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional() chats: z.lazy(() => ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional()
}).strict(); }).strict();
@ -4234,6 +4194,15 @@ export const MoveCreateManyUser_gameInputSchema: z.ZodType<Prisma.MoveCreateMany
orientation: z.lazy(() => OrientationSchema) orientation: z.lazy(() => OrientationSchema)
}).strict(); }).strict();
export const ShipCreateManyUser_GameInputSchema: z.ZodType<Prisma.ShipCreateManyUser_GameInput> = z.object({
id: z.string().cuid().optional(),
size: z.number().int(),
variant: z.number().int(),
x: z.number().int(),
y: z.number().int(),
orientation: z.lazy(() => OrientationSchema)
}).strict();
export const ChatCreateManyUser_gameInputSchema: z.ZodType<Prisma.ChatCreateManyUser_gameInput> = z.object({ export const ChatCreateManyUser_gameInputSchema: z.ZodType<Prisma.ChatCreateManyUser_gameInput> = z.object({
id: z.string().cuid().optional(), id: z.string().cuid().optional(),
createdAt: z.coerce.date().optional(), createdAt: z.coerce.date().optional(),
@ -4271,6 +4240,33 @@ export const MoveUncheckedUpdateManyWithoutMovesInputSchema: z.ZodType<Prisma.Mo
orientation: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(), orientation: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(),
}).strict(); }).strict();
export const ShipUpdateWithoutUser_GameInputSchema: z.ZodType<Prisma.ShipUpdateWithoutUser_GameInput> = z.object({
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
size: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
variant: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
x: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
y: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
orientation: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(),
}).strict();
export const ShipUncheckedUpdateWithoutUser_GameInputSchema: z.ZodType<Prisma.ShipUncheckedUpdateWithoutUser_GameInput> = z.object({
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
size: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
variant: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
x: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
y: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
orientation: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(),
}).strict();
export const ShipUncheckedUpdateManyWithoutShipsInputSchema: z.ZodType<Prisma.ShipUncheckedUpdateManyWithoutShipsInput> = z.object({
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
size: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
variant: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
x: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
y: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
orientation: z.union([ z.lazy(() => OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(),
}).strict();
export const ChatUpdateWithoutUser_gameInputSchema: z.ZodType<Prisma.ChatUpdateWithoutUser_gameInput> = z.object({ export const ChatUpdateWithoutUser_gameInputSchema: z.ZodType<Prisma.ChatUpdateWithoutUser_gameInput> = z.object({
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(), id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(), createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),

View file

@ -80,8 +80,8 @@ model Ship {
x Int x Int
y Int y Int
orientation Orientation orientation Orientation
gameId String user_GameId String
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade) User_Game User_Game @relation(fields: [user_GameId], references: [id], onDelete: Cascade)
} }
enum GameState { enum GameState {
@ -96,7 +96,6 @@ model Game {
createdAt DateTime @default(now()) createdAt DateTime @default(now())
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt
state GameState @default(lobby) state GameState @default(lobby)
ships Ship[]
allowSpectators Boolean @default(true) allowSpectators Boolean @default(true)
allowSpecials Boolean @default(true) allowSpecials Boolean @default(true)
allowChat Boolean @default(true) allowChat Boolean @default(true)
@ -120,6 +119,7 @@ model User_Game {
userId String userId String
index Int index Int
moves Move[] moves Move[]
ships Ship[]
chats Chat[] chats Chat[]
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade) game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
user User @relation(fields: [userId], references: [id]) user User @relation(fields: [userId], references: [id])