Files
jessy-david-dev 875a299cd4 chore(db): migrate from SQLite to PostgreSQL
- Change Prisma provider from sqlite to postgresql
- Replace better-sqlite3 adapter with @prisma/adapter-pg
- Update prisma.config.ts and lib/prisma.ts for PostgreSQL
- Add DATABASE_URL to .env.local
- Regenerate Prisma client for PostgreSQL
- Recreate migrations for PostgreSQL database
2026-04-11 15:50:44 +02:00

1645 lines
62 KiB
TypeScript

/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
* This file exports the `DailyResult` model and its related types.
*
* 🟢 You can import this file directly.
*/
import type * as runtime from "@prisma/client/runtime/client"
import type * as $Enums from "../enums"
import type * as Prisma from "../internal/prismaNamespace"
/**
* Model DailyResult
*
*/
export type DailyResultModel = runtime.Types.Result.DefaultSelection<Prisma.$DailyResultPayload>
export type AggregateDailyResult = {
_count: DailyResultCountAggregateOutputType | null
_avg: DailyResultAvgAggregateOutputType | null
_sum: DailyResultSumAggregateOutputType | null
_min: DailyResultMinAggregateOutputType | null
_max: DailyResultMaxAggregateOutputType | null
}
export type DailyResultAvgAggregateOutputType = {
clicks: number | null
timeSeconds: number | null
}
export type DailyResultSumAggregateOutputType = {
clicks: number | null
timeSeconds: number | null
}
export type DailyResultMinAggregateOutputType = {
id: string | null
puzzleId: string | null
userId: string | null
path: string | null
clicks: number | null
timeSeconds: number | null
won: boolean | null
playedAt: Date | null
}
export type DailyResultMaxAggregateOutputType = {
id: string | null
puzzleId: string | null
userId: string | null
path: string | null
clicks: number | null
timeSeconds: number | null
won: boolean | null
playedAt: Date | null
}
export type DailyResultCountAggregateOutputType = {
id: number
puzzleId: number
userId: number
path: number
clicks: number
timeSeconds: number
won: number
playedAt: number
_all: number
}
export type DailyResultAvgAggregateInputType = {
clicks?: true
timeSeconds?: true
}
export type DailyResultSumAggregateInputType = {
clicks?: true
timeSeconds?: true
}
export type DailyResultMinAggregateInputType = {
id?: true
puzzleId?: true
userId?: true
path?: true
clicks?: true
timeSeconds?: true
won?: true
playedAt?: true
}
export type DailyResultMaxAggregateInputType = {
id?: true
puzzleId?: true
userId?: true
path?: true
clicks?: true
timeSeconds?: true
won?: true
playedAt?: true
}
export type DailyResultCountAggregateInputType = {
id?: true
puzzleId?: true
userId?: true
path?: true
clicks?: true
timeSeconds?: true
won?: true
playedAt?: true
_all?: true
}
export type DailyResultAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which DailyResult to aggregate.
*/
where?: Prisma.DailyResultWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of DailyResults to fetch.
*/
orderBy?: Prisma.DailyResultOrderByWithRelationInput | Prisma.DailyResultOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: Prisma.DailyResultWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` DailyResults from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` DailyResults.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned DailyResults
**/
_count?: true | DailyResultCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to average
**/
_avg?: DailyResultAvgAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to sum
**/
_sum?: DailyResultSumAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: DailyResultMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: DailyResultMaxAggregateInputType
}
export type GetDailyResultAggregateType<T extends DailyResultAggregateArgs> = {
[P in keyof T & keyof AggregateDailyResult]: P extends '_count' | 'count'
? T[P] extends true
? number
: Prisma.GetScalarType<T[P], AggregateDailyResult[P]>
: Prisma.GetScalarType<T[P], AggregateDailyResult[P]>
}
export type DailyResultGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.DailyResultWhereInput
orderBy?: Prisma.DailyResultOrderByWithAggregationInput | Prisma.DailyResultOrderByWithAggregationInput[]
by: Prisma.DailyResultScalarFieldEnum[] | Prisma.DailyResultScalarFieldEnum
having?: Prisma.DailyResultScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: DailyResultCountAggregateInputType | true
_avg?: DailyResultAvgAggregateInputType
_sum?: DailyResultSumAggregateInputType
_min?: DailyResultMinAggregateInputType
_max?: DailyResultMaxAggregateInputType
}
export type DailyResultGroupByOutputType = {
id: string
puzzleId: string
userId: string
path: string
clicks: number
timeSeconds: number
won: boolean
playedAt: Date
_count: DailyResultCountAggregateOutputType | null
_avg: DailyResultAvgAggregateOutputType | null
_sum: DailyResultSumAggregateOutputType | null
_min: DailyResultMinAggregateOutputType | null
_max: DailyResultMaxAggregateOutputType | null
}
export type GetDailyResultGroupByPayload<T extends DailyResultGroupByArgs> = Prisma.PrismaPromise<
Array<
Prisma.PickEnumerable<DailyResultGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof DailyResultGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: Prisma.GetScalarType<T[P], DailyResultGroupByOutputType[P]>
: Prisma.GetScalarType<T[P], DailyResultGroupByOutputType[P]>
}
>
>
export type DailyResultWhereInput = {
AND?: Prisma.DailyResultWhereInput | Prisma.DailyResultWhereInput[]
OR?: Prisma.DailyResultWhereInput[]
NOT?: Prisma.DailyResultWhereInput | Prisma.DailyResultWhereInput[]
id?: Prisma.StringFilter<"DailyResult"> | string
puzzleId?: Prisma.StringFilter<"DailyResult"> | string
userId?: Prisma.StringFilter<"DailyResult"> | string
path?: Prisma.StringFilter<"DailyResult"> | string
clicks?: Prisma.IntFilter<"DailyResult"> | number
timeSeconds?: Prisma.FloatFilter<"DailyResult"> | number
won?: Prisma.BoolFilter<"DailyResult"> | boolean
playedAt?: Prisma.DateTimeFilter<"DailyResult"> | Date | string
puzzle?: Prisma.XOR<Prisma.DailyPuzzleScalarRelationFilter, Prisma.DailyPuzzleWhereInput>
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
}
export type DailyResultOrderByWithRelationInput = {
id?: Prisma.SortOrder
puzzleId?: Prisma.SortOrder
userId?: Prisma.SortOrder
path?: Prisma.SortOrder
clicks?: Prisma.SortOrder
timeSeconds?: Prisma.SortOrder
won?: Prisma.SortOrder
playedAt?: Prisma.SortOrder
puzzle?: Prisma.DailyPuzzleOrderByWithRelationInput
user?: Prisma.UserOrderByWithRelationInput
}
export type DailyResultWhereUniqueInput = Prisma.AtLeast<{
id?: string
puzzleId_userId?: Prisma.DailyResultPuzzleIdUserIdCompoundUniqueInput
AND?: Prisma.DailyResultWhereInput | Prisma.DailyResultWhereInput[]
OR?: Prisma.DailyResultWhereInput[]
NOT?: Prisma.DailyResultWhereInput | Prisma.DailyResultWhereInput[]
puzzleId?: Prisma.StringFilter<"DailyResult"> | string
userId?: Prisma.StringFilter<"DailyResult"> | string
path?: Prisma.StringFilter<"DailyResult"> | string
clicks?: Prisma.IntFilter<"DailyResult"> | number
timeSeconds?: Prisma.FloatFilter<"DailyResult"> | number
won?: Prisma.BoolFilter<"DailyResult"> | boolean
playedAt?: Prisma.DateTimeFilter<"DailyResult"> | Date | string
puzzle?: Prisma.XOR<Prisma.DailyPuzzleScalarRelationFilter, Prisma.DailyPuzzleWhereInput>
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
}, "id" | "puzzleId_userId">
export type DailyResultOrderByWithAggregationInput = {
id?: Prisma.SortOrder
puzzleId?: Prisma.SortOrder
userId?: Prisma.SortOrder
path?: Prisma.SortOrder
clicks?: Prisma.SortOrder
timeSeconds?: Prisma.SortOrder
won?: Prisma.SortOrder
playedAt?: Prisma.SortOrder
_count?: Prisma.DailyResultCountOrderByAggregateInput
_avg?: Prisma.DailyResultAvgOrderByAggregateInput
_max?: Prisma.DailyResultMaxOrderByAggregateInput
_min?: Prisma.DailyResultMinOrderByAggregateInput
_sum?: Prisma.DailyResultSumOrderByAggregateInput
}
export type DailyResultScalarWhereWithAggregatesInput = {
AND?: Prisma.DailyResultScalarWhereWithAggregatesInput | Prisma.DailyResultScalarWhereWithAggregatesInput[]
OR?: Prisma.DailyResultScalarWhereWithAggregatesInput[]
NOT?: Prisma.DailyResultScalarWhereWithAggregatesInput | Prisma.DailyResultScalarWhereWithAggregatesInput[]
id?: Prisma.StringWithAggregatesFilter<"DailyResult"> | string
puzzleId?: Prisma.StringWithAggregatesFilter<"DailyResult"> | string
userId?: Prisma.StringWithAggregatesFilter<"DailyResult"> | string
path?: Prisma.StringWithAggregatesFilter<"DailyResult"> | string
clicks?: Prisma.IntWithAggregatesFilter<"DailyResult"> | number
timeSeconds?: Prisma.FloatWithAggregatesFilter<"DailyResult"> | number
won?: Prisma.BoolWithAggregatesFilter<"DailyResult"> | boolean
playedAt?: Prisma.DateTimeWithAggregatesFilter<"DailyResult"> | Date | string
}
export type DailyResultCreateInput = {
id?: string
path: string
clicks: number
timeSeconds: number
won: boolean
playedAt?: Date | string
puzzle: Prisma.DailyPuzzleCreateNestedOneWithoutResultsInput
user: Prisma.UserCreateNestedOneWithoutDailyResultsInput
}
export type DailyResultUncheckedCreateInput = {
id?: string
puzzleId: string
userId: string
path: string
clicks: number
timeSeconds: number
won: boolean
playedAt?: Date | string
}
export type DailyResultUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
path?: Prisma.StringFieldUpdateOperationsInput | string
clicks?: Prisma.IntFieldUpdateOperationsInput | number
timeSeconds?: Prisma.FloatFieldUpdateOperationsInput | number
won?: Prisma.BoolFieldUpdateOperationsInput | boolean
playedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
puzzle?: Prisma.DailyPuzzleUpdateOneRequiredWithoutResultsNestedInput
user?: Prisma.UserUpdateOneRequiredWithoutDailyResultsNestedInput
}
export type DailyResultUncheckedUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
puzzleId?: Prisma.StringFieldUpdateOperationsInput | string
userId?: Prisma.StringFieldUpdateOperationsInput | string
path?: Prisma.StringFieldUpdateOperationsInput | string
clicks?: Prisma.IntFieldUpdateOperationsInput | number
timeSeconds?: Prisma.FloatFieldUpdateOperationsInput | number
won?: Prisma.BoolFieldUpdateOperationsInput | boolean
playedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type DailyResultCreateManyInput = {
id?: string
puzzleId: string
userId: string
path: string
clicks: number
timeSeconds: number
won: boolean
playedAt?: Date | string
}
export type DailyResultUpdateManyMutationInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
path?: Prisma.StringFieldUpdateOperationsInput | string
clicks?: Prisma.IntFieldUpdateOperationsInput | number
timeSeconds?: Prisma.FloatFieldUpdateOperationsInput | number
won?: Prisma.BoolFieldUpdateOperationsInput | boolean
playedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type DailyResultUncheckedUpdateManyInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
puzzleId?: Prisma.StringFieldUpdateOperationsInput | string
userId?: Prisma.StringFieldUpdateOperationsInput | string
path?: Prisma.StringFieldUpdateOperationsInput | string
clicks?: Prisma.IntFieldUpdateOperationsInput | number
timeSeconds?: Prisma.FloatFieldUpdateOperationsInput | number
won?: Prisma.BoolFieldUpdateOperationsInput | boolean
playedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type DailyResultListRelationFilter = {
every?: Prisma.DailyResultWhereInput
some?: Prisma.DailyResultWhereInput
none?: Prisma.DailyResultWhereInput
}
export type DailyResultOrderByRelationAggregateInput = {
_count?: Prisma.SortOrder
}
export type DailyResultPuzzleIdUserIdCompoundUniqueInput = {
puzzleId: string
userId: string
}
export type DailyResultCountOrderByAggregateInput = {
id?: Prisma.SortOrder
puzzleId?: Prisma.SortOrder
userId?: Prisma.SortOrder
path?: Prisma.SortOrder
clicks?: Prisma.SortOrder
timeSeconds?: Prisma.SortOrder
won?: Prisma.SortOrder
playedAt?: Prisma.SortOrder
}
export type DailyResultAvgOrderByAggregateInput = {
clicks?: Prisma.SortOrder
timeSeconds?: Prisma.SortOrder
}
export type DailyResultMaxOrderByAggregateInput = {
id?: Prisma.SortOrder
puzzleId?: Prisma.SortOrder
userId?: Prisma.SortOrder
path?: Prisma.SortOrder
clicks?: Prisma.SortOrder
timeSeconds?: Prisma.SortOrder
won?: Prisma.SortOrder
playedAt?: Prisma.SortOrder
}
export type DailyResultMinOrderByAggregateInput = {
id?: Prisma.SortOrder
puzzleId?: Prisma.SortOrder
userId?: Prisma.SortOrder
path?: Prisma.SortOrder
clicks?: Prisma.SortOrder
timeSeconds?: Prisma.SortOrder
won?: Prisma.SortOrder
playedAt?: Prisma.SortOrder
}
export type DailyResultSumOrderByAggregateInput = {
clicks?: Prisma.SortOrder
timeSeconds?: Prisma.SortOrder
}
export type DailyResultCreateNestedManyWithoutUserInput = {
create?: Prisma.XOR<Prisma.DailyResultCreateWithoutUserInput, Prisma.DailyResultUncheckedCreateWithoutUserInput> | Prisma.DailyResultCreateWithoutUserInput[] | Prisma.DailyResultUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.DailyResultCreateOrConnectWithoutUserInput | Prisma.DailyResultCreateOrConnectWithoutUserInput[]
createMany?: Prisma.DailyResultCreateManyUserInputEnvelope
connect?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
}
export type DailyResultUncheckedCreateNestedManyWithoutUserInput = {
create?: Prisma.XOR<Prisma.DailyResultCreateWithoutUserInput, Prisma.DailyResultUncheckedCreateWithoutUserInput> | Prisma.DailyResultCreateWithoutUserInput[] | Prisma.DailyResultUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.DailyResultCreateOrConnectWithoutUserInput | Prisma.DailyResultCreateOrConnectWithoutUserInput[]
createMany?: Prisma.DailyResultCreateManyUserInputEnvelope
connect?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
}
export type DailyResultUpdateManyWithoutUserNestedInput = {
create?: Prisma.XOR<Prisma.DailyResultCreateWithoutUserInput, Prisma.DailyResultUncheckedCreateWithoutUserInput> | Prisma.DailyResultCreateWithoutUserInput[] | Prisma.DailyResultUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.DailyResultCreateOrConnectWithoutUserInput | Prisma.DailyResultCreateOrConnectWithoutUserInput[]
upsert?: Prisma.DailyResultUpsertWithWhereUniqueWithoutUserInput | Prisma.DailyResultUpsertWithWhereUniqueWithoutUserInput[]
createMany?: Prisma.DailyResultCreateManyUserInputEnvelope
set?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
disconnect?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
delete?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
connect?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
update?: Prisma.DailyResultUpdateWithWhereUniqueWithoutUserInput | Prisma.DailyResultUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: Prisma.DailyResultUpdateManyWithWhereWithoutUserInput | Prisma.DailyResultUpdateManyWithWhereWithoutUserInput[]
deleteMany?: Prisma.DailyResultScalarWhereInput | Prisma.DailyResultScalarWhereInput[]
}
export type DailyResultUncheckedUpdateManyWithoutUserNestedInput = {
create?: Prisma.XOR<Prisma.DailyResultCreateWithoutUserInput, Prisma.DailyResultUncheckedCreateWithoutUserInput> | Prisma.DailyResultCreateWithoutUserInput[] | Prisma.DailyResultUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.DailyResultCreateOrConnectWithoutUserInput | Prisma.DailyResultCreateOrConnectWithoutUserInput[]
upsert?: Prisma.DailyResultUpsertWithWhereUniqueWithoutUserInput | Prisma.DailyResultUpsertWithWhereUniqueWithoutUserInput[]
createMany?: Prisma.DailyResultCreateManyUserInputEnvelope
set?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
disconnect?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
delete?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
connect?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
update?: Prisma.DailyResultUpdateWithWhereUniqueWithoutUserInput | Prisma.DailyResultUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: Prisma.DailyResultUpdateManyWithWhereWithoutUserInput | Prisma.DailyResultUpdateManyWithWhereWithoutUserInput[]
deleteMany?: Prisma.DailyResultScalarWhereInput | Prisma.DailyResultScalarWhereInput[]
}
export type DailyResultCreateNestedManyWithoutPuzzleInput = {
create?: Prisma.XOR<Prisma.DailyResultCreateWithoutPuzzleInput, Prisma.DailyResultUncheckedCreateWithoutPuzzleInput> | Prisma.DailyResultCreateWithoutPuzzleInput[] | Prisma.DailyResultUncheckedCreateWithoutPuzzleInput[]
connectOrCreate?: Prisma.DailyResultCreateOrConnectWithoutPuzzleInput | Prisma.DailyResultCreateOrConnectWithoutPuzzleInput[]
createMany?: Prisma.DailyResultCreateManyPuzzleInputEnvelope
connect?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
}
export type DailyResultUncheckedCreateNestedManyWithoutPuzzleInput = {
create?: Prisma.XOR<Prisma.DailyResultCreateWithoutPuzzleInput, Prisma.DailyResultUncheckedCreateWithoutPuzzleInput> | Prisma.DailyResultCreateWithoutPuzzleInput[] | Prisma.DailyResultUncheckedCreateWithoutPuzzleInput[]
connectOrCreate?: Prisma.DailyResultCreateOrConnectWithoutPuzzleInput | Prisma.DailyResultCreateOrConnectWithoutPuzzleInput[]
createMany?: Prisma.DailyResultCreateManyPuzzleInputEnvelope
connect?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
}
export type DailyResultUpdateManyWithoutPuzzleNestedInput = {
create?: Prisma.XOR<Prisma.DailyResultCreateWithoutPuzzleInput, Prisma.DailyResultUncheckedCreateWithoutPuzzleInput> | Prisma.DailyResultCreateWithoutPuzzleInput[] | Prisma.DailyResultUncheckedCreateWithoutPuzzleInput[]
connectOrCreate?: Prisma.DailyResultCreateOrConnectWithoutPuzzleInput | Prisma.DailyResultCreateOrConnectWithoutPuzzleInput[]
upsert?: Prisma.DailyResultUpsertWithWhereUniqueWithoutPuzzleInput | Prisma.DailyResultUpsertWithWhereUniqueWithoutPuzzleInput[]
createMany?: Prisma.DailyResultCreateManyPuzzleInputEnvelope
set?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
disconnect?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
delete?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
connect?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
update?: Prisma.DailyResultUpdateWithWhereUniqueWithoutPuzzleInput | Prisma.DailyResultUpdateWithWhereUniqueWithoutPuzzleInput[]
updateMany?: Prisma.DailyResultUpdateManyWithWhereWithoutPuzzleInput | Prisma.DailyResultUpdateManyWithWhereWithoutPuzzleInput[]
deleteMany?: Prisma.DailyResultScalarWhereInput | Prisma.DailyResultScalarWhereInput[]
}
export type DailyResultUncheckedUpdateManyWithoutPuzzleNestedInput = {
create?: Prisma.XOR<Prisma.DailyResultCreateWithoutPuzzleInput, Prisma.DailyResultUncheckedCreateWithoutPuzzleInput> | Prisma.DailyResultCreateWithoutPuzzleInput[] | Prisma.DailyResultUncheckedCreateWithoutPuzzleInput[]
connectOrCreate?: Prisma.DailyResultCreateOrConnectWithoutPuzzleInput | Prisma.DailyResultCreateOrConnectWithoutPuzzleInput[]
upsert?: Prisma.DailyResultUpsertWithWhereUniqueWithoutPuzzleInput | Prisma.DailyResultUpsertWithWhereUniqueWithoutPuzzleInput[]
createMany?: Prisma.DailyResultCreateManyPuzzleInputEnvelope
set?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
disconnect?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
delete?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
connect?: Prisma.DailyResultWhereUniqueInput | Prisma.DailyResultWhereUniqueInput[]
update?: Prisma.DailyResultUpdateWithWhereUniqueWithoutPuzzleInput | Prisma.DailyResultUpdateWithWhereUniqueWithoutPuzzleInput[]
updateMany?: Prisma.DailyResultUpdateManyWithWhereWithoutPuzzleInput | Prisma.DailyResultUpdateManyWithWhereWithoutPuzzleInput[]
deleteMany?: Prisma.DailyResultScalarWhereInput | Prisma.DailyResultScalarWhereInput[]
}
export type DailyResultCreateWithoutUserInput = {
id?: string
path: string
clicks: number
timeSeconds: number
won: boolean
playedAt?: Date | string
puzzle: Prisma.DailyPuzzleCreateNestedOneWithoutResultsInput
}
export type DailyResultUncheckedCreateWithoutUserInput = {
id?: string
puzzleId: string
path: string
clicks: number
timeSeconds: number
won: boolean
playedAt?: Date | string
}
export type DailyResultCreateOrConnectWithoutUserInput = {
where: Prisma.DailyResultWhereUniqueInput
create: Prisma.XOR<Prisma.DailyResultCreateWithoutUserInput, Prisma.DailyResultUncheckedCreateWithoutUserInput>
}
export type DailyResultCreateManyUserInputEnvelope = {
data: Prisma.DailyResultCreateManyUserInput | Prisma.DailyResultCreateManyUserInput[]
skipDuplicates?: boolean
}
export type DailyResultUpsertWithWhereUniqueWithoutUserInput = {
where: Prisma.DailyResultWhereUniqueInput
update: Prisma.XOR<Prisma.DailyResultUpdateWithoutUserInput, Prisma.DailyResultUncheckedUpdateWithoutUserInput>
create: Prisma.XOR<Prisma.DailyResultCreateWithoutUserInput, Prisma.DailyResultUncheckedCreateWithoutUserInput>
}
export type DailyResultUpdateWithWhereUniqueWithoutUserInput = {
where: Prisma.DailyResultWhereUniqueInput
data: Prisma.XOR<Prisma.DailyResultUpdateWithoutUserInput, Prisma.DailyResultUncheckedUpdateWithoutUserInput>
}
export type DailyResultUpdateManyWithWhereWithoutUserInput = {
where: Prisma.DailyResultScalarWhereInput
data: Prisma.XOR<Prisma.DailyResultUpdateManyMutationInput, Prisma.DailyResultUncheckedUpdateManyWithoutUserInput>
}
export type DailyResultScalarWhereInput = {
AND?: Prisma.DailyResultScalarWhereInput | Prisma.DailyResultScalarWhereInput[]
OR?: Prisma.DailyResultScalarWhereInput[]
NOT?: Prisma.DailyResultScalarWhereInput | Prisma.DailyResultScalarWhereInput[]
id?: Prisma.StringFilter<"DailyResult"> | string
puzzleId?: Prisma.StringFilter<"DailyResult"> | string
userId?: Prisma.StringFilter<"DailyResult"> | string
path?: Prisma.StringFilter<"DailyResult"> | string
clicks?: Prisma.IntFilter<"DailyResult"> | number
timeSeconds?: Prisma.FloatFilter<"DailyResult"> | number
won?: Prisma.BoolFilter<"DailyResult"> | boolean
playedAt?: Prisma.DateTimeFilter<"DailyResult"> | Date | string
}
export type DailyResultCreateWithoutPuzzleInput = {
id?: string
path: string
clicks: number
timeSeconds: number
won: boolean
playedAt?: Date | string
user: Prisma.UserCreateNestedOneWithoutDailyResultsInput
}
export type DailyResultUncheckedCreateWithoutPuzzleInput = {
id?: string
userId: string
path: string
clicks: number
timeSeconds: number
won: boolean
playedAt?: Date | string
}
export type DailyResultCreateOrConnectWithoutPuzzleInput = {
where: Prisma.DailyResultWhereUniqueInput
create: Prisma.XOR<Prisma.DailyResultCreateWithoutPuzzleInput, Prisma.DailyResultUncheckedCreateWithoutPuzzleInput>
}
export type DailyResultCreateManyPuzzleInputEnvelope = {
data: Prisma.DailyResultCreateManyPuzzleInput | Prisma.DailyResultCreateManyPuzzleInput[]
skipDuplicates?: boolean
}
export type DailyResultUpsertWithWhereUniqueWithoutPuzzleInput = {
where: Prisma.DailyResultWhereUniqueInput
update: Prisma.XOR<Prisma.DailyResultUpdateWithoutPuzzleInput, Prisma.DailyResultUncheckedUpdateWithoutPuzzleInput>
create: Prisma.XOR<Prisma.DailyResultCreateWithoutPuzzleInput, Prisma.DailyResultUncheckedCreateWithoutPuzzleInput>
}
export type DailyResultUpdateWithWhereUniqueWithoutPuzzleInput = {
where: Prisma.DailyResultWhereUniqueInput
data: Prisma.XOR<Prisma.DailyResultUpdateWithoutPuzzleInput, Prisma.DailyResultUncheckedUpdateWithoutPuzzleInput>
}
export type DailyResultUpdateManyWithWhereWithoutPuzzleInput = {
where: Prisma.DailyResultScalarWhereInput
data: Prisma.XOR<Prisma.DailyResultUpdateManyMutationInput, Prisma.DailyResultUncheckedUpdateManyWithoutPuzzleInput>
}
export type DailyResultCreateManyUserInput = {
id?: string
puzzleId: string
path: string
clicks: number
timeSeconds: number
won: boolean
playedAt?: Date | string
}
export type DailyResultUpdateWithoutUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
path?: Prisma.StringFieldUpdateOperationsInput | string
clicks?: Prisma.IntFieldUpdateOperationsInput | number
timeSeconds?: Prisma.FloatFieldUpdateOperationsInput | number
won?: Prisma.BoolFieldUpdateOperationsInput | boolean
playedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
puzzle?: Prisma.DailyPuzzleUpdateOneRequiredWithoutResultsNestedInput
}
export type DailyResultUncheckedUpdateWithoutUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
puzzleId?: Prisma.StringFieldUpdateOperationsInput | string
path?: Prisma.StringFieldUpdateOperationsInput | string
clicks?: Prisma.IntFieldUpdateOperationsInput | number
timeSeconds?: Prisma.FloatFieldUpdateOperationsInput | number
won?: Prisma.BoolFieldUpdateOperationsInput | boolean
playedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type DailyResultUncheckedUpdateManyWithoutUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
puzzleId?: Prisma.StringFieldUpdateOperationsInput | string
path?: Prisma.StringFieldUpdateOperationsInput | string
clicks?: Prisma.IntFieldUpdateOperationsInput | number
timeSeconds?: Prisma.FloatFieldUpdateOperationsInput | number
won?: Prisma.BoolFieldUpdateOperationsInput | boolean
playedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type DailyResultCreateManyPuzzleInput = {
id?: string
userId: string
path: string
clicks: number
timeSeconds: number
won: boolean
playedAt?: Date | string
}
export type DailyResultUpdateWithoutPuzzleInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
path?: Prisma.StringFieldUpdateOperationsInput | string
clicks?: Prisma.IntFieldUpdateOperationsInput | number
timeSeconds?: Prisma.FloatFieldUpdateOperationsInput | number
won?: Prisma.BoolFieldUpdateOperationsInput | boolean
playedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
user?: Prisma.UserUpdateOneRequiredWithoutDailyResultsNestedInput
}
export type DailyResultUncheckedUpdateWithoutPuzzleInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
userId?: Prisma.StringFieldUpdateOperationsInput | string
path?: Prisma.StringFieldUpdateOperationsInput | string
clicks?: Prisma.IntFieldUpdateOperationsInput | number
timeSeconds?: Prisma.FloatFieldUpdateOperationsInput | number
won?: Prisma.BoolFieldUpdateOperationsInput | boolean
playedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type DailyResultUncheckedUpdateManyWithoutPuzzleInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
userId?: Prisma.StringFieldUpdateOperationsInput | string
path?: Prisma.StringFieldUpdateOperationsInput | string
clicks?: Prisma.IntFieldUpdateOperationsInput | number
timeSeconds?: Prisma.FloatFieldUpdateOperationsInput | number
won?: Prisma.BoolFieldUpdateOperationsInput | boolean
playedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type DailyResultSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
puzzleId?: boolean
userId?: boolean
path?: boolean
clicks?: boolean
timeSeconds?: boolean
won?: boolean
playedAt?: boolean
puzzle?: boolean | Prisma.DailyPuzzleDefaultArgs<ExtArgs>
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}, ExtArgs["result"]["dailyResult"]>
export type DailyResultSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
puzzleId?: boolean
userId?: boolean
path?: boolean
clicks?: boolean
timeSeconds?: boolean
won?: boolean
playedAt?: boolean
puzzle?: boolean | Prisma.DailyPuzzleDefaultArgs<ExtArgs>
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}, ExtArgs["result"]["dailyResult"]>
export type DailyResultSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
puzzleId?: boolean
userId?: boolean
path?: boolean
clicks?: boolean
timeSeconds?: boolean
won?: boolean
playedAt?: boolean
puzzle?: boolean | Prisma.DailyPuzzleDefaultArgs<ExtArgs>
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}, ExtArgs["result"]["dailyResult"]>
export type DailyResultSelectScalar = {
id?: boolean
puzzleId?: boolean
userId?: boolean
path?: boolean
clicks?: boolean
timeSeconds?: boolean
won?: boolean
playedAt?: boolean
}
export type DailyResultOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "puzzleId" | "userId" | "path" | "clicks" | "timeSeconds" | "won" | "playedAt", ExtArgs["result"]["dailyResult"]>
export type DailyResultInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
puzzle?: boolean | Prisma.DailyPuzzleDefaultArgs<ExtArgs>
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}
export type DailyResultIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
puzzle?: boolean | Prisma.DailyPuzzleDefaultArgs<ExtArgs>
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}
export type DailyResultIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
puzzle?: boolean | Prisma.DailyPuzzleDefaultArgs<ExtArgs>
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}
export type $DailyResultPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "DailyResult"
objects: {
puzzle: Prisma.$DailyPuzzlePayload<ExtArgs>
user: Prisma.$UserPayload<ExtArgs>
}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: string
puzzleId: string
userId: string
path: string
clicks: number
timeSeconds: number
won: boolean
playedAt: Date
}, ExtArgs["result"]["dailyResult"]>
composites: {}
}
export type DailyResultGetPayload<S extends boolean | null | undefined | DailyResultDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$DailyResultPayload, S>
export type DailyResultCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
Omit<DailyResultFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
select?: DailyResultCountAggregateInputType | true
}
export interface DailyResultDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['DailyResult'], meta: { name: 'DailyResult' } }
/**
* Find zero or one DailyResult that matches the filter.
* @param {DailyResultFindUniqueArgs} args - Arguments to find a DailyResult
* @example
* // Get one DailyResult
* const dailyResult = await prisma.dailyResult.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends DailyResultFindUniqueArgs>(args: Prisma.SelectSubset<T, DailyResultFindUniqueArgs<ExtArgs>>): Prisma.Prisma__DailyResultClient<runtime.Types.Result.GetResult<Prisma.$DailyResultPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find one DailyResult that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {DailyResultFindUniqueOrThrowArgs} args - Arguments to find a DailyResult
* @example
* // Get one DailyResult
* const dailyResult = await prisma.dailyResult.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends DailyResultFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, DailyResultFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__DailyResultClient<runtime.Types.Result.GetResult<Prisma.$DailyResultPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find the first DailyResult that matches the filter.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {DailyResultFindFirstArgs} args - Arguments to find a DailyResult
* @example
* // Get one DailyResult
* const dailyResult = await prisma.dailyResult.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends DailyResultFindFirstArgs>(args?: Prisma.SelectSubset<T, DailyResultFindFirstArgs<ExtArgs>>): Prisma.Prisma__DailyResultClient<runtime.Types.Result.GetResult<Prisma.$DailyResultPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find the first DailyResult that matches the filter or
* throw `PrismaKnownClientError` with `P2025` code if no matches were found.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {DailyResultFindFirstOrThrowArgs} args - Arguments to find a DailyResult
* @example
* // Get one DailyResult
* const dailyResult = await prisma.dailyResult.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends DailyResultFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, DailyResultFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__DailyResultClient<runtime.Types.Result.GetResult<Prisma.$DailyResultPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find zero or more DailyResults that matches the filter.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {DailyResultFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all DailyResults
* const dailyResults = await prisma.dailyResult.findMany()
*
* // Get first 10 DailyResults
* const dailyResults = await prisma.dailyResult.findMany({ take: 10 })
*
* // Only select the `id`
* const dailyResultWithIdOnly = await prisma.dailyResult.findMany({ select: { id: true } })
*
*/
findMany<T extends DailyResultFindManyArgs>(args?: Prisma.SelectSubset<T, DailyResultFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$DailyResultPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
/**
* Create a DailyResult.
* @param {DailyResultCreateArgs} args - Arguments to create a DailyResult.
* @example
* // Create one DailyResult
* const DailyResult = await prisma.dailyResult.create({
* data: {
* // ... data to create a DailyResult
* }
* })
*
*/
create<T extends DailyResultCreateArgs>(args: Prisma.SelectSubset<T, DailyResultCreateArgs<ExtArgs>>): Prisma.Prisma__DailyResultClient<runtime.Types.Result.GetResult<Prisma.$DailyResultPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Create many DailyResults.
* @param {DailyResultCreateManyArgs} args - Arguments to create many DailyResults.
* @example
* // Create many DailyResults
* const dailyResult = await prisma.dailyResult.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends DailyResultCreateManyArgs>(args?: Prisma.SelectSubset<T, DailyResultCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create many DailyResults and returns the data saved in the database.
* @param {DailyResultCreateManyAndReturnArgs} args - Arguments to create many DailyResults.
* @example
* // Create many DailyResults
* const dailyResult = await prisma.dailyResult.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many DailyResults and only return the `id`
* const dailyResultWithIdOnly = await prisma.dailyResult.createManyAndReturn({
* select: { id: true },
* data: [
* // ... provide data here
* ]
* })
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
*
*/
createManyAndReturn<T extends DailyResultCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, DailyResultCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$DailyResultPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
/**
* Delete a DailyResult.
* @param {DailyResultDeleteArgs} args - Arguments to delete one DailyResult.
* @example
* // Delete one DailyResult
* const DailyResult = await prisma.dailyResult.delete({
* where: {
* // ... filter to delete one DailyResult
* }
* })
*
*/
delete<T extends DailyResultDeleteArgs>(args: Prisma.SelectSubset<T, DailyResultDeleteArgs<ExtArgs>>): Prisma.Prisma__DailyResultClient<runtime.Types.Result.GetResult<Prisma.$DailyResultPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Update one DailyResult.
* @param {DailyResultUpdateArgs} args - Arguments to update one DailyResult.
* @example
* // Update one DailyResult
* const dailyResult = await prisma.dailyResult.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends DailyResultUpdateArgs>(args: Prisma.SelectSubset<T, DailyResultUpdateArgs<ExtArgs>>): Prisma.Prisma__DailyResultClient<runtime.Types.Result.GetResult<Prisma.$DailyResultPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Delete zero or more DailyResults.
* @param {DailyResultDeleteManyArgs} args - Arguments to filter DailyResults to delete.
* @example
* // Delete a few DailyResults
* const { count } = await prisma.dailyResult.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends DailyResultDeleteManyArgs>(args?: Prisma.SelectSubset<T, DailyResultDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more DailyResults.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {DailyResultUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many DailyResults
* const dailyResult = await prisma.dailyResult.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends DailyResultUpdateManyArgs>(args: Prisma.SelectSubset<T, DailyResultUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more DailyResults and returns the data updated in the database.
* @param {DailyResultUpdateManyAndReturnArgs} args - Arguments to update many DailyResults.
* @example
* // Update many DailyResults
* const dailyResult = await prisma.dailyResult.updateManyAndReturn({
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
*
* // Update zero or more DailyResults and only return the `id`
* const dailyResultWithIdOnly = await prisma.dailyResult.updateManyAndReturn({
* select: { id: true },
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
*
*/
updateManyAndReturn<T extends DailyResultUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, DailyResultUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$DailyResultPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
/**
* Create or update one DailyResult.
* @param {DailyResultUpsertArgs} args - Arguments to update or create a DailyResult.
* @example
* // Update or create a DailyResult
* const dailyResult = await prisma.dailyResult.upsert({
* create: {
* // ... data to create a DailyResult
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the DailyResult we want to update
* }
* })
*/
upsert<T extends DailyResultUpsertArgs>(args: Prisma.SelectSubset<T, DailyResultUpsertArgs<ExtArgs>>): Prisma.Prisma__DailyResultClient<runtime.Types.Result.GetResult<Prisma.$DailyResultPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Count the number of DailyResults.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {DailyResultCountArgs} args - Arguments to filter DailyResults to count.
* @example
* // Count the number of DailyResults
* const count = await prisma.dailyResult.count({
* where: {
* // ... the filter for the DailyResults we want to count
* }
* })
**/
count<T extends DailyResultCountArgs>(
args?: Prisma.Subset<T, DailyResultCountArgs>,
): Prisma.PrismaPromise<
T extends runtime.Types.Utils.Record<'select', any>
? T['select'] extends true
? number
: Prisma.GetScalarType<T['select'], DailyResultCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a DailyResult.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {DailyResultAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
* @example
* // Ordered by age ascending
* // Where email contains prisma.io
* // Limited to the 10 users
* const aggregations = await prisma.user.aggregate({
* _avg: {
* age: true,
* },
* where: {
* email: {
* contains: "prisma.io",
* },
* },
* orderBy: {
* age: "asc",
* },
* take: 10,
* })
**/
aggregate<T extends DailyResultAggregateArgs>(args: Prisma.Subset<T, DailyResultAggregateArgs>): Prisma.PrismaPromise<GetDailyResultAggregateType<T>>
/**
* Group by DailyResult.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {DailyResultGroupByArgs} args - Group by arguments.
* @example
* // Group by city, order by createdAt, get count
* const result = await prisma.user.groupBy({
* by: ['city', 'createdAt'],
* orderBy: {
* createdAt: true
* },
* _count: {
* _all: true
* },
* })
*
**/
groupBy<
T extends DailyResultGroupByArgs,
HasSelectOrTake extends Prisma.Or<
Prisma.Extends<'skip', Prisma.Keys<T>>,
Prisma.Extends<'take', Prisma.Keys<T>>
>,
OrderByArg extends Prisma.True extends HasSelectOrTake
? { orderBy: DailyResultGroupByArgs['orderBy'] }
: { orderBy?: DailyResultGroupByArgs['orderBy'] },
OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
ByValid extends Prisma.Has<ByFields, OrderFields>,
HavingFields extends Prisma.GetHavingFields<T['having']>,
HavingValid extends Prisma.Has<ByFields, HavingFields>,
ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
InputErrors extends ByEmpty extends Prisma.True
? `Error: "by" must not be empty.`
: HavingValid extends Prisma.False
? {
[P in HavingFields]: P extends ByFields
? never
: P extends string
? `Error: Field "${P}" used in "having" needs to be provided in "by".`
: [
Error,
'Field ',
P,
` in "having" needs to be provided in "by"`,
]
}[HavingFields]
: 'take' extends Prisma.Keys<T>
? 'orderBy' extends Prisma.Keys<T>
? ByValid extends Prisma.True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
: 'Error: If you provide "take", you also need to provide "orderBy"'
: 'skip' extends Prisma.Keys<T>
? 'orderBy' extends Prisma.Keys<T>
? ByValid extends Prisma.True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
: 'Error: If you provide "skip", you also need to provide "orderBy"'
: ByValid extends Prisma.True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
>(args: Prisma.SubsetIntersection<T, DailyResultGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetDailyResultGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the DailyResult model
*/
readonly fields: DailyResultFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for DailyResult.
* Why is this prefixed with `Prisma__`?
* Because we want to prevent naming conflicts as mentioned in
* https://github.com/prisma/prisma-client-js/issues/707
*/
export interface Prisma__DailyResultClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
puzzle<T extends Prisma.DailyPuzzleDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.DailyPuzzleDefaultArgs<ExtArgs>>): Prisma.Prisma__DailyPuzzleClient<runtime.Types.Result.GetResult<Prisma.$DailyPuzzlePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
user<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
}
/**
* Fields of the DailyResult model
*/
export interface DailyResultFieldRefs {
readonly id: Prisma.FieldRef<"DailyResult", 'String'>
readonly puzzleId: Prisma.FieldRef<"DailyResult", 'String'>
readonly userId: Prisma.FieldRef<"DailyResult", 'String'>
readonly path: Prisma.FieldRef<"DailyResult", 'String'>
readonly clicks: Prisma.FieldRef<"DailyResult", 'Int'>
readonly timeSeconds: Prisma.FieldRef<"DailyResult", 'Float'>
readonly won: Prisma.FieldRef<"DailyResult", 'Boolean'>
readonly playedAt: Prisma.FieldRef<"DailyResult", 'DateTime'>
}
// Custom InputTypes
/**
* DailyResult findUnique
*/
export type DailyResultFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the DailyResult
*/
select?: Prisma.DailyResultSelect<ExtArgs> | null
/**
* Omit specific fields from the DailyResult
*/
omit?: Prisma.DailyResultOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.DailyResultInclude<ExtArgs> | null
/**
* Filter, which DailyResult to fetch.
*/
where: Prisma.DailyResultWhereUniqueInput
}
/**
* DailyResult findUniqueOrThrow
*/
export type DailyResultFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the DailyResult
*/
select?: Prisma.DailyResultSelect<ExtArgs> | null
/**
* Omit specific fields from the DailyResult
*/
omit?: Prisma.DailyResultOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.DailyResultInclude<ExtArgs> | null
/**
* Filter, which DailyResult to fetch.
*/
where: Prisma.DailyResultWhereUniqueInput
}
/**
* DailyResult findFirst
*/
export type DailyResultFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the DailyResult
*/
select?: Prisma.DailyResultSelect<ExtArgs> | null
/**
* Omit specific fields from the DailyResult
*/
omit?: Prisma.DailyResultOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.DailyResultInclude<ExtArgs> | null
/**
* Filter, which DailyResult to fetch.
*/
where?: Prisma.DailyResultWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of DailyResults to fetch.
*/
orderBy?: Prisma.DailyResultOrderByWithRelationInput | Prisma.DailyResultOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for DailyResults.
*/
cursor?: Prisma.DailyResultWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` DailyResults from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` DailyResults.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of DailyResults.
*/
distinct?: Prisma.DailyResultScalarFieldEnum | Prisma.DailyResultScalarFieldEnum[]
}
/**
* DailyResult findFirstOrThrow
*/
export type DailyResultFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the DailyResult
*/
select?: Prisma.DailyResultSelect<ExtArgs> | null
/**
* Omit specific fields from the DailyResult
*/
omit?: Prisma.DailyResultOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.DailyResultInclude<ExtArgs> | null
/**
* Filter, which DailyResult to fetch.
*/
where?: Prisma.DailyResultWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of DailyResults to fetch.
*/
orderBy?: Prisma.DailyResultOrderByWithRelationInput | Prisma.DailyResultOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for DailyResults.
*/
cursor?: Prisma.DailyResultWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` DailyResults from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` DailyResults.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of DailyResults.
*/
distinct?: Prisma.DailyResultScalarFieldEnum | Prisma.DailyResultScalarFieldEnum[]
}
/**
* DailyResult findMany
*/
export type DailyResultFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the DailyResult
*/
select?: Prisma.DailyResultSelect<ExtArgs> | null
/**
* Omit specific fields from the DailyResult
*/
omit?: Prisma.DailyResultOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.DailyResultInclude<ExtArgs> | null
/**
* Filter, which DailyResults to fetch.
*/
where?: Prisma.DailyResultWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of DailyResults to fetch.
*/
orderBy?: Prisma.DailyResultOrderByWithRelationInput | Prisma.DailyResultOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing DailyResults.
*/
cursor?: Prisma.DailyResultWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` DailyResults from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` DailyResults.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of DailyResults.
*/
distinct?: Prisma.DailyResultScalarFieldEnum | Prisma.DailyResultScalarFieldEnum[]
}
/**
* DailyResult create
*/
export type DailyResultCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the DailyResult
*/
select?: Prisma.DailyResultSelect<ExtArgs> | null
/**
* Omit specific fields from the DailyResult
*/
omit?: Prisma.DailyResultOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.DailyResultInclude<ExtArgs> | null
/**
* The data needed to create a DailyResult.
*/
data: Prisma.XOR<Prisma.DailyResultCreateInput, Prisma.DailyResultUncheckedCreateInput>
}
/**
* DailyResult createMany
*/
export type DailyResultCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to create many DailyResults.
*/
data: Prisma.DailyResultCreateManyInput | Prisma.DailyResultCreateManyInput[]
skipDuplicates?: boolean
}
/**
* DailyResult createManyAndReturn
*/
export type DailyResultCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the DailyResult
*/
select?: Prisma.DailyResultSelectCreateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the DailyResult
*/
omit?: Prisma.DailyResultOmit<ExtArgs> | null
/**
* The data used to create many DailyResults.
*/
data: Prisma.DailyResultCreateManyInput | Prisma.DailyResultCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.DailyResultIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
* DailyResult update
*/
export type DailyResultUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the DailyResult
*/
select?: Prisma.DailyResultSelect<ExtArgs> | null
/**
* Omit specific fields from the DailyResult
*/
omit?: Prisma.DailyResultOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.DailyResultInclude<ExtArgs> | null
/**
* The data needed to update a DailyResult.
*/
data: Prisma.XOR<Prisma.DailyResultUpdateInput, Prisma.DailyResultUncheckedUpdateInput>
/**
* Choose, which DailyResult to update.
*/
where: Prisma.DailyResultWhereUniqueInput
}
/**
* DailyResult updateMany
*/
export type DailyResultUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to update DailyResults.
*/
data: Prisma.XOR<Prisma.DailyResultUpdateManyMutationInput, Prisma.DailyResultUncheckedUpdateManyInput>
/**
* Filter which DailyResults to update
*/
where?: Prisma.DailyResultWhereInput
/**
* Limit how many DailyResults to update.
*/
limit?: number
}
/**
* DailyResult updateManyAndReturn
*/
export type DailyResultUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the DailyResult
*/
select?: Prisma.DailyResultSelectUpdateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the DailyResult
*/
omit?: Prisma.DailyResultOmit<ExtArgs> | null
/**
* The data used to update DailyResults.
*/
data: Prisma.XOR<Prisma.DailyResultUpdateManyMutationInput, Prisma.DailyResultUncheckedUpdateManyInput>
/**
* Filter which DailyResults to update
*/
where?: Prisma.DailyResultWhereInput
/**
* Limit how many DailyResults to update.
*/
limit?: number
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.DailyResultIncludeUpdateManyAndReturn<ExtArgs> | null
}
/**
* DailyResult upsert
*/
export type DailyResultUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the DailyResult
*/
select?: Prisma.DailyResultSelect<ExtArgs> | null
/**
* Omit specific fields from the DailyResult
*/
omit?: Prisma.DailyResultOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.DailyResultInclude<ExtArgs> | null
/**
* The filter to search for the DailyResult to update in case it exists.
*/
where: Prisma.DailyResultWhereUniqueInput
/**
* In case the DailyResult found by the `where` argument doesn't exist, create a new DailyResult with this data.
*/
create: Prisma.XOR<Prisma.DailyResultCreateInput, Prisma.DailyResultUncheckedCreateInput>
/**
* In case the DailyResult was found with the provided `where` argument, update it with this data.
*/
update: Prisma.XOR<Prisma.DailyResultUpdateInput, Prisma.DailyResultUncheckedUpdateInput>
}
/**
* DailyResult delete
*/
export type DailyResultDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the DailyResult
*/
select?: Prisma.DailyResultSelect<ExtArgs> | null
/**
* Omit specific fields from the DailyResult
*/
omit?: Prisma.DailyResultOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.DailyResultInclude<ExtArgs> | null
/**
* Filter which DailyResult to delete.
*/
where: Prisma.DailyResultWhereUniqueInput
}
/**
* DailyResult deleteMany
*/
export type DailyResultDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which DailyResults to delete
*/
where?: Prisma.DailyResultWhereInput
/**
* Limit how many DailyResults to delete.
*/
limit?: number
}
/**
* DailyResult without action
*/
export type DailyResultDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the DailyResult
*/
select?: Prisma.DailyResultSelect<ExtArgs> | null
/**
* Omit specific fields from the DailyResult
*/
omit?: Prisma.DailyResultOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.DailyResultInclude<ExtArgs> | null
}