= z.object({
user_game_id: z.string(),
index: z.number()
@@ -2590,10 +2590,10 @@ export const SessionUncheckedUpdateManyWithoutUserNestedInputSchema: z.ZodType SessionScalarWhereInputSchema),z.lazy(() => SessionScalarWhereInputSchema).array() ]).optional(),
}).strict();
-export const GameCreateNestedOneWithoutShipsInputSchema: z.ZodType = z.object({
- create: z.union([ z.lazy(() => GameCreateWithoutShipsInputSchema),z.lazy(() => GameUncheckedCreateWithoutShipsInputSchema) ]).optional(),
- connectOrCreate: z.lazy(() => GameCreateOrConnectWithoutShipsInputSchema).optional(),
- connect: z.lazy(() => GameWhereUniqueInputSchema).optional()
+export const User_GameCreateNestedOneWithoutShipsInputSchema: z.ZodType = z.object({
+ create: z.union([ z.lazy(() => User_GameCreateWithoutShipsInputSchema),z.lazy(() => User_GameUncheckedCreateWithoutShipsInputSchema) ]).optional(),
+ connectOrCreate: z.lazy(() => User_GameCreateOrConnectWithoutShipsInputSchema).optional(),
+ connect: z.lazy(() => User_GameWhereUniqueInputSchema).optional()
}).strict();
export const IntFieldUpdateOperationsInputSchema: z.ZodType = z.object({
@@ -2608,19 +2608,12 @@ export const EnumOrientationFieldUpdateOperationsInputSchema: z.ZodType OrientationSchema).optional()
}).strict();
-export const GameUpdateOneRequiredWithoutShipsNestedInputSchema: z.ZodType = z.object({
- create: z.union([ z.lazy(() => GameCreateWithoutShipsInputSchema),z.lazy(() => GameUncheckedCreateWithoutShipsInputSchema) ]).optional(),
- connectOrCreate: z.lazy(() => GameCreateOrConnectWithoutShipsInputSchema).optional(),
- upsert: z.lazy(() => GameUpsertWithoutShipsInputSchema).optional(),
- connect: z.lazy(() => GameWhereUniqueInputSchema).optional(),
- update: z.union([ z.lazy(() => GameUpdateWithoutShipsInputSchema),z.lazy(() => GameUncheckedUpdateWithoutShipsInputSchema) ]).optional(),
-}).strict();
-
-export const ShipCreateNestedManyWithoutGameInputSchema: z.ZodType = 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(),
+export const User_GameUpdateOneRequiredWithoutShipsNestedInputSchema: z.ZodType = z.object({
+ create: z.union([ z.lazy(() => User_GameCreateWithoutShipsInputSchema),z.lazy(() => User_GameUncheckedCreateWithoutShipsInputSchema) ]).optional(),
+ connectOrCreate: z.lazy(() => User_GameCreateOrConnectWithoutShipsInputSchema).optional(),
+ upsert: z.lazy(() => User_GameUpsertWithoutShipsInputSchema).optional(),
+ connect: z.lazy(() => User_GameWhereUniqueInputSchema).optional(),
+ update: z.union([ z.lazy(() => User_GameUpdateWithoutShipsInputSchema),z.lazy(() => User_GameUncheckedUpdateWithoutShipsInputSchema) ]).optional(),
}).strict();
export const GamepinCreateNestedOneWithoutGameInputSchema: z.ZodType = z.object({
@@ -2636,13 +2629,6 @@ export const User_GameCreateNestedManyWithoutGameInputSchema: z.ZodType User_GameWhereUniqueInputSchema),z.lazy(() => User_GameWhereUniqueInputSchema).array() ]).optional(),
}).strict();
-export const ShipUncheckedCreateNestedManyWithoutGameInputSchema: z.ZodType = 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 = z.object({
create: z.union([ z.lazy(() => GamepinCreateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedCreateWithoutGameInputSchema) ]).optional(),
connectOrCreate: z.lazy(() => GamepinCreateOrConnectWithoutGameInputSchema).optional(),
@@ -2664,20 +2650,6 @@ export const BoolFieldUpdateOperationsInputSchema: z.ZodType = 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 = z.object({
create: z.union([ z.lazy(() => GamepinCreateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedCreateWithoutGameInputSchema) ]).optional(),
connectOrCreate: z.lazy(() => GamepinCreateOrConnectWithoutGameInputSchema).optional(),
@@ -2702,20 +2674,6 @@ export const User_GameUpdateManyWithoutGameNestedInputSchema: z.ZodType User_GameScalarWhereInputSchema),z.lazy(() => User_GameScalarWhereInputSchema).array() ]).optional(),
}).strict();
-export const ShipUncheckedUpdateManyWithoutGameNestedInputSchema: z.ZodType = 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 = z.object({
create: z.union([ z.lazy(() => GamepinCreateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedCreateWithoutGameInputSchema) ]).optional(),
connectOrCreate: z.lazy(() => GamepinCreateOrConnectWithoutGameInputSchema).optional(),
@@ -2761,6 +2719,13 @@ export const MoveCreateNestedManyWithoutUser_gameInputSchema: z.ZodType MoveWhereUniqueInputSchema),z.lazy(() => MoveWhereUniqueInputSchema).array() ]).optional(),
}).strict();
+export const ShipCreateNestedManyWithoutUser_GameInputSchema: z.ZodType = 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 = z.object({
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(),
@@ -2787,6 +2752,13 @@ export const MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema: z.ZodType
connect: z.union([ z.lazy(() => MoveWhereUniqueInputSchema),z.lazy(() => MoveWhereUniqueInputSchema).array() ]).optional(),
}).strict();
+export const ShipUncheckedCreateNestedManyWithoutUser_GameInputSchema: z.ZodType = 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 = z.object({
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(),
@@ -2808,6 +2780,20 @@ export const MoveUpdateManyWithoutUser_gameNestedInputSchema: z.ZodType MoveScalarWhereInputSchema),z.lazy(() => MoveScalarWhereInputSchema).array() ]).optional(),
}).strict();
+export const ShipUpdateManyWithoutUser_GameNestedInputSchema: z.ZodType = 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 = z.object({
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(),
@@ -2852,6 +2838,20 @@ export const MoveUncheckedUpdateManyWithoutUser_gameNestedInputSchema: z.ZodType
deleteMany: z.union([ z.lazy(() => MoveScalarWhereInputSchema),z.lazy(() => MoveScalarWhereInputSchema).array() ]).optional(),
}).strict();
+export const ShipUncheckedUpdateManyWithoutUser_GameNestedInputSchema: z.ZodType = 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 = z.object({
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(),
@@ -3271,6 +3271,7 @@ export const User_GameCreateWithoutUserInputSchema: z.ZodType MoveCreateNestedManyWithoutUser_gameInputSchema).optional(),
+ ships: z.lazy(() => ShipCreateNestedManyWithoutUser_GameInputSchema).optional(),
chats: z.lazy(() => ChatCreateNestedManyWithoutUser_gameInputSchema).optional(),
game: z.lazy(() => GameCreateNestedOneWithoutUsersInputSchema)
}).strict();
@@ -3281,6 +3282,7 @@ export const User_GameUncheckedCreateWithoutUserInputSchema: z.ZodType MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional(),
+ ships: z.lazy(() => ShipUncheckedCreateNestedManyWithoutUser_GameInputSchema).optional(),
chats: z.lazy(() => ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional()
}).strict();
@@ -3450,94 +3452,54 @@ export const SessionScalarWhereInputSchema: z.ZodType DateTimeFilterSchema),z.coerce.date() ]).optional(),
}).strict();
-export const GameCreateWithoutShipsInputSchema: z.ZodType = z.object({
+export const User_GameCreateWithoutShipsInputSchema: z.ZodType = z.object({
id: z.string().cuid().optional(),
createdAt: z.coerce.date().optional(),
- updatedAt: z.coerce.date().optional(),
- state: z.lazy(() => GameStateSchema).optional(),
- allowSpectators: z.boolean().optional(),
- allowSpecials: z.boolean().optional(),
- allowChat: z.boolean().optional(),
- allowMarkDraw: z.boolean().optional(),
- gamePin: z.lazy(() => GamepinCreateNestedOneWithoutGameInputSchema).optional(),
- users: z.lazy(() => User_GameCreateNestedManyWithoutGameInputSchema).optional()
+ index: z.number().int(),
+ moves: z.lazy(() => MoveCreateNestedManyWithoutUser_gameInputSchema).optional(),
+ chats: z.lazy(() => ChatCreateNestedManyWithoutUser_gameInputSchema).optional(),
+ game: z.lazy(() => GameCreateNestedOneWithoutUsersInputSchema),
+ user: z.lazy(() => UserCreateNestedOneWithoutGamesInputSchema)
}).strict();
-export const GameUncheckedCreateWithoutShipsInputSchema: z.ZodType = z.object({
+export const User_GameUncheckedCreateWithoutShipsInputSchema: z.ZodType = z.object({
id: z.string().cuid().optional(),
createdAt: z.coerce.date().optional(),
- updatedAt: z.coerce.date().optional(),
- state: z.lazy(() => GameStateSchema).optional(),
- allowSpectators: z.boolean().optional(),
- allowSpecials: z.boolean().optional(),
- allowChat: z.boolean().optional(),
- allowMarkDraw: z.boolean().optional(),
- gamePin: z.lazy(() => GamepinUncheckedCreateNestedOneWithoutGameInputSchema).optional(),
- users: z.lazy(() => User_GameUncheckedCreateNestedManyWithoutGameInputSchema).optional()
+ gameId: z.string(),
+ userId: z.string(),
+ index: z.number().int(),
+ moves: z.lazy(() => MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional(),
+ chats: z.lazy(() => ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional()
}).strict();
-export const GameCreateOrConnectWithoutShipsInputSchema: z.ZodType = z.object({
- where: z.lazy(() => GameWhereUniqueInputSchema),
- create: z.union([ z.lazy(() => GameCreateWithoutShipsInputSchema),z.lazy(() => GameUncheckedCreateWithoutShipsInputSchema) ]),
+export const User_GameCreateOrConnectWithoutShipsInputSchema: z.ZodType = z.object({
+ where: z.lazy(() => User_GameWhereUniqueInputSchema),
+ create: z.union([ z.lazy(() => User_GameCreateWithoutShipsInputSchema),z.lazy(() => User_GameUncheckedCreateWithoutShipsInputSchema) ]),
}).strict();
-export const GameUpsertWithoutShipsInputSchema: z.ZodType = z.object({
- update: z.union([ z.lazy(() => GameUpdateWithoutShipsInputSchema),z.lazy(() => GameUncheckedUpdateWithoutShipsInputSchema) ]),
- create: z.union([ z.lazy(() => GameCreateWithoutShipsInputSchema),z.lazy(() => GameUncheckedCreateWithoutShipsInputSchema) ]),
+export const User_GameUpsertWithoutShipsInputSchema: z.ZodType = z.object({
+ update: z.union([ z.lazy(() => User_GameUpdateWithoutShipsInputSchema),z.lazy(() => User_GameUncheckedUpdateWithoutShipsInputSchema) ]),
+ create: z.union([ z.lazy(() => User_GameCreateWithoutShipsInputSchema),z.lazy(() => User_GameUncheckedCreateWithoutShipsInputSchema) ]),
}).strict();
-export const GameUpdateWithoutShipsInputSchema: z.ZodType = z.object({
+export const User_GameUpdateWithoutShipsInputSchema: z.ZodType = z.object({
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
- updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
- state: z.union([ z.lazy(() => GameStateSchema),z.lazy(() => EnumGameStateFieldUpdateOperationsInputSchema) ]).optional(),
- allowSpectators: 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(),
- allowMarkDraw: z.union([ z.boolean(),z.lazy(() => BoolFieldUpdateOperationsInputSchema) ]).optional(),
- gamePin: z.lazy(() => GamepinUpdateOneWithoutGameNestedInputSchema).optional(),
- users: z.lazy(() => User_GameUpdateManyWithoutGameNestedInputSchema).optional()
+ index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
+ moves: z.lazy(() => MoveUpdateManyWithoutUser_gameNestedInputSchema).optional(),
+ chats: z.lazy(() => ChatUpdateManyWithoutUser_gameNestedInputSchema).optional(),
+ game: z.lazy(() => GameUpdateOneRequiredWithoutUsersNestedInputSchema).optional(),
+ user: z.lazy(() => UserUpdateOneRequiredWithoutGamesNestedInputSchema).optional()
}).strict();
-export const GameUncheckedUpdateWithoutShipsInputSchema: z.ZodType = z.object({
+export const User_GameUncheckedUpdateWithoutShipsInputSchema: z.ZodType = z.object({
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
- updatedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
- state: z.union([ z.lazy(() => GameStateSchema),z.lazy(() => EnumGameStateFieldUpdateOperationsInputSchema) ]).optional(),
- allowSpectators: 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(),
- 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 = 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 = 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 = z.object({
- where: z.lazy(() => ShipWhereUniqueInputSchema),
- create: z.union([ z.lazy(() => ShipCreateWithoutGameInputSchema),z.lazy(() => ShipUncheckedCreateWithoutGameInputSchema) ]),
-}).strict();
-
-export const ShipCreateManyGameInputEnvelopeSchema: z.ZodType = z.object({
- data: z.union([ z.lazy(() => ShipCreateManyGameInputSchema),z.lazy(() => ShipCreateManyGameInputSchema).array() ]),
- skipDuplicates: z.boolean().optional()
+ gameId: 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(),
+ moves: z.lazy(() => MoveUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional(),
+ chats: z.lazy(() => ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional()
}).strict();
export const GamepinCreateWithoutGameInputSchema: z.ZodType = z.object({
@@ -3562,6 +3524,7 @@ export const User_GameCreateWithoutGameInputSchema: z.ZodType MoveCreateNestedManyWithoutUser_gameInputSchema).optional(),
+ ships: z.lazy(() => ShipCreateNestedManyWithoutUser_GameInputSchema).optional(),
chats: z.lazy(() => ChatCreateNestedManyWithoutUser_gameInputSchema).optional(),
user: z.lazy(() => UserCreateNestedOneWithoutGamesInputSchema)
}).strict();
@@ -3572,6 +3535,7 @@ export const User_GameUncheckedCreateWithoutGameInputSchema: z.ZodType MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional(),
+ ships: z.lazy(() => ShipUncheckedCreateNestedManyWithoutUser_GameInputSchema).optional(),
chats: z.lazy(() => ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional()
}).strict();
@@ -3585,35 +3549,6 @@ export const User_GameCreateManyGameInputEnvelopeSchema: z.ZodType = 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 = z.object({
- where: z.lazy(() => ShipWhereUniqueInputSchema),
- data: z.union([ z.lazy(() => ShipUpdateWithoutGameInputSchema),z.lazy(() => ShipUncheckedUpdateWithoutGameInputSchema) ]),
-}).strict();
-
-export const ShipUpdateManyWithWhereWithoutGameInputSchema: z.ZodType = z.object({
- where: z.lazy(() => ShipScalarWhereInputSchema),
- data: z.union([ z.lazy(() => ShipUpdateManyMutationInputSchema),z.lazy(() => ShipUncheckedUpdateManyWithoutShipsInputSchema) ]),
-}).strict();
-
-export const ShipScalarWhereInputSchema: z.ZodType = 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 = z.object({
update: z.union([ z.lazy(() => GamepinUpdateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedUpdateWithoutGameInputSchema) ]),
create: z.union([ z.lazy(() => GamepinCreateWithoutGameInputSchema),z.lazy(() => GamepinUncheckedCreateWithoutGameInputSchema) ]),
@@ -3656,7 +3591,6 @@ export const GameCreateWithoutGamePinInputSchema: z.ZodType ShipCreateNestedManyWithoutGameInputSchema).optional(),
users: z.lazy(() => User_GameCreateNestedManyWithoutGameInputSchema).optional()
}).strict();
@@ -3669,7 +3603,6 @@ export const GameUncheckedCreateWithoutGamePinInputSchema: z.ZodType ShipUncheckedCreateNestedManyWithoutGameInputSchema).optional(),
users: z.lazy(() => User_GameUncheckedCreateNestedManyWithoutGameInputSchema).optional()
}).strict();
@@ -3692,7 +3625,6 @@ export const GameUpdateWithoutGamePinInputSchema: z.ZodType BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowChat: 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()
}).strict();
@@ -3705,7 +3637,6 @@ export const GameUncheckedUpdateWithoutGamePinInputSchema: z.ZodType BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowChat: 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()
}).strict();
@@ -3739,6 +3670,34 @@ export const MoveCreateManyUser_gameInputEnvelopeSchema: z.ZodType = 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 = 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 = z.object({
+ where: z.lazy(() => ShipWhereUniqueInputSchema),
+ create: z.union([ z.lazy(() => ShipCreateWithoutUser_GameInputSchema),z.lazy(() => ShipUncheckedCreateWithoutUser_GameInputSchema) ]),
+}).strict();
+
+export const ShipCreateManyUser_GameInputEnvelopeSchema: z.ZodType = 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 = z.object({
id: z.string().cuid().optional(),
createdAt: z.coerce.date().optional(),
@@ -3772,7 +3731,6 @@ export const GameCreateWithoutUsersInputSchema: z.ZodType ShipCreateNestedManyWithoutGameInputSchema).optional(),
gamePin: z.lazy(() => GamepinCreateNestedOneWithoutGameInputSchema).optional()
}).strict();
@@ -3785,7 +3743,6 @@ export const GameUncheckedCreateWithoutUsersInputSchema: z.ZodType ShipUncheckedCreateNestedManyWithoutGameInputSchema).optional(),
gamePin: z.lazy(() => GamepinUncheckedCreateNestedOneWithoutGameInputSchema).optional()
}).strict();
@@ -3853,6 +3810,35 @@ export const MoveScalarWhereInputSchema: z.ZodType
user_game_id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(),
}).strict();
+export const ShipUpsertWithWhereUniqueWithoutUser_GameInputSchema: z.ZodType = 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 = z.object({
+ where: z.lazy(() => ShipWhereUniqueInputSchema),
+ data: z.union([ z.lazy(() => ShipUpdateWithoutUser_GameInputSchema),z.lazy(() => ShipUncheckedUpdateWithoutUser_GameInputSchema) ]),
+}).strict();
+
+export const ShipUpdateManyWithWhereWithoutUser_GameInputSchema: z.ZodType = z.object({
+ where: z.lazy(() => ShipScalarWhereInputSchema),
+ data: z.union([ z.lazy(() => ShipUpdateManyMutationInputSchema),z.lazy(() => ShipUncheckedUpdateManyWithoutShipsInputSchema) ]),
+}).strict();
+
+export const ShipScalarWhereInputSchema: z.ZodType = 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 = z.object({
where: z.lazy(() => ChatWhereUniqueInputSchema),
update: z.union([ z.lazy(() => ChatUpdateWithoutUser_gameInputSchema),z.lazy(() => ChatUncheckedUpdateWithoutUser_gameInputSchema) ]),
@@ -3894,7 +3880,6 @@ export const GameUpdateWithoutUsersInputSchema: z.ZodType BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowChat: 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()
}).strict();
@@ -3907,7 +3892,6 @@ export const GameUncheckedUpdateWithoutUsersInputSchema: z.ZodType BoolFieldUpdateOperationsInputSchema) ]).optional(),
allowChat: 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()
}).strict();
@@ -3944,6 +3928,7 @@ export const User_GameCreateWithoutMovesInputSchema: z.ZodType ShipCreateNestedManyWithoutUser_GameInputSchema).optional(),
chats: z.lazy(() => ChatCreateNestedManyWithoutUser_gameInputSchema).optional(),
game: z.lazy(() => GameCreateNestedOneWithoutUsersInputSchema),
user: z.lazy(() => UserCreateNestedOneWithoutGamesInputSchema)
@@ -3955,6 +3940,7 @@ export const User_GameUncheckedCreateWithoutMovesInputSchema: z.ZodType ShipUncheckedCreateNestedManyWithoutUser_GameInputSchema).optional(),
chats: z.lazy(() => ChatUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional()
}).strict();
@@ -3972,6 +3958,7 @@ export const User_GameUpdateWithoutMovesInputSchema: z.ZodType StringFieldUpdateOperationsInputSchema) ]).optional(),
createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
+ ships: z.lazy(() => ShipUpdateManyWithoutUser_GameNestedInputSchema).optional(),
chats: z.lazy(() => ChatUpdateManyWithoutUser_gameNestedInputSchema).optional(),
game: z.lazy(() => GameUpdateOneRequiredWithoutUsersNestedInputSchema).optional(),
user: z.lazy(() => UserUpdateOneRequiredWithoutGamesNestedInputSchema).optional()
@@ -3983,6 +3970,7 @@ export const User_GameUncheckedUpdateWithoutMovesInputSchema: z.ZodType StringFieldUpdateOperationsInputSchema) ]).optional(),
userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
+ ships: z.lazy(() => ShipUncheckedUpdateManyWithoutUser_GameNestedInputSchema).optional(),
chats: z.lazy(() => ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional()
}).strict();
@@ -3991,6 +3979,7 @@ export const User_GameCreateWithoutChatsInputSchema: z.ZodType MoveCreateNestedManyWithoutUser_gameInputSchema).optional(),
+ ships: z.lazy(() => ShipCreateNestedManyWithoutUser_GameInputSchema).optional(),
game: z.lazy(() => GameCreateNestedOneWithoutUsersInputSchema),
user: z.lazy(() => UserCreateNestedOneWithoutGamesInputSchema)
}).strict();
@@ -4001,7 +3990,8 @@ export const User_GameUncheckedCreateWithoutChatsInputSchema: z.ZodType MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional()
+ moves: z.lazy(() => MoveUncheckedCreateNestedManyWithoutUser_gameInputSchema).optional(),
+ ships: z.lazy(() => ShipUncheckedCreateNestedManyWithoutUser_GameInputSchema).optional()
}).strict();
export const User_GameCreateOrConnectWithoutChatsInputSchema: z.ZodType = z.object({
@@ -4019,6 +4009,7 @@ export const User_GameUpdateWithoutChatsInputSchema: z.ZodType DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
moves: z.lazy(() => MoveUpdateManyWithoutUser_gameNestedInputSchema).optional(),
+ ships: z.lazy(() => ShipUpdateManyWithoutUser_GameNestedInputSchema).optional(),
game: z.lazy(() => GameUpdateOneRequiredWithoutUsersNestedInputSchema).optional(),
user: z.lazy(() => UserUpdateOneRequiredWithoutGamesNestedInputSchema).optional()
}).strict();
@@ -4029,7 +4020,8 @@ export const User_GameUncheckedUpdateWithoutChatsInputSchema: z.ZodType StringFieldUpdateOperationsInputSchema) ]).optional(),
userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).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();
export const User_GameCreateManyUserInputSchema: z.ZodType = z.object({
@@ -4067,6 +4059,7 @@ export const User_GameUpdateWithoutUserInputSchema: z.ZodType DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
moves: z.lazy(() => MoveUpdateManyWithoutUser_gameNestedInputSchema).optional(),
+ ships: z.lazy(() => ShipUpdateManyWithoutUser_GameNestedInputSchema).optional(),
chats: z.lazy(() => ChatUpdateManyWithoutUser_gameNestedInputSchema).optional(),
game: z.lazy(() => GameUpdateOneRequiredWithoutUsersNestedInputSchema).optional()
}).strict();
@@ -4077,6 +4070,7 @@ export const User_GameUncheckedUpdateWithoutUserInputSchema: z.ZodType StringFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
moves: z.lazy(() => MoveUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional(),
+ ships: z.lazy(() => ShipUncheckedUpdateManyWithoutUser_GameNestedInputSchema).optional(),
chats: z.lazy(() => ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional()
}).strict();
@@ -4156,15 +4150,6 @@ export const SessionUncheckedUpdateManyWithoutSessionsInputSchema: z.ZodType DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
}).strict();
-export const ShipCreateManyGameInputSchema: z.ZodType = 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 = z.object({
id: z.string().cuid().optional(),
createdAt: z.coerce.date().optional(),
@@ -4172,38 +4157,12 @@ export const User_GameCreateManyGameInputSchema: z.ZodType = 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 = 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 = 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 = z.object({
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
moves: z.lazy(() => MoveUpdateManyWithoutUser_gameNestedInputSchema).optional(),
+ ships: z.lazy(() => ShipUpdateManyWithoutUser_GameNestedInputSchema).optional(),
chats: z.lazy(() => ChatUpdateManyWithoutUser_gameNestedInputSchema).optional(),
user: z.lazy(() => UserUpdateOneRequiredWithoutGamesNestedInputSchema).optional()
}).strict();
@@ -4214,6 +4173,7 @@ export const User_GameUncheckedUpdateWithoutGameInputSchema: z.ZodType StringFieldUpdateOperationsInputSchema) ]).optional(),
index: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
moves: z.lazy(() => MoveUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional(),
+ ships: z.lazy(() => ShipUncheckedUpdateManyWithoutUser_GameNestedInputSchema).optional(),
chats: z.lazy(() => ChatUncheckedUpdateManyWithoutUser_gameNestedInputSchema).optional()
}).strict();
@@ -4234,6 +4194,15 @@ export const MoveCreateManyUser_gameInputSchema: z.ZodType OrientationSchema)
}).strict();
+export const ShipCreateManyUser_GameInputSchema: z.ZodType = 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 = z.object({
id: z.string().cuid().optional(),
createdAt: z.coerce.date().optional(),
@@ -4271,6 +4240,33 @@ export const MoveUncheckedUpdateManyWithoutMovesInputSchema: z.ZodType OrientationSchema),z.lazy(() => EnumOrientationFieldUpdateOperationsInputSchema) ]).optional(),
}).strict();
+export const ShipUpdateWithoutUser_GameInputSchema: z.ZodType = 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 = 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 = 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 = z.object({
id: z.union([ z.string().cuid(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
createdAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
diff --git a/leaky-ships/prisma/schema.prisma b/leaky-ships/prisma/schema.prisma
index 8f947b4..76a611c 100644
--- a/leaky-ships/prisma/schema.prisma
+++ b/leaky-ships/prisma/schema.prisma
@@ -80,8 +80,8 @@ model Ship {
x Int
y Int
orientation Orientation
- gameId String
- game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
+ user_GameId String
+ User_Game User_Game @relation(fields: [user_GameId], references: [id], onDelete: Cascade)
}
enum GameState {
@@ -96,7 +96,6 @@ model Game {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
state GameState @default(lobby)
- ships Ship[]
allowSpectators Boolean @default(true)
allowSpecials Boolean @default(true)
allowChat Boolean @default(true)
@@ -120,6 +119,7 @@ model User_Game {
userId String
index Int
moves Move[]
+ ships Ship[]
chats Chat[]
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
user User @relation(fields: [userId], references: [id])