
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `Contest` 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.ts"
import type * as Prisma from "../internal/prismaNamespace.ts"

/**
 * Model Contest
 * 
 */
export type ContestModel = runtime.Types.Result.DefaultSelection<Prisma.$ContestPayload>

export type AggregateContest = {
  _count: ContestCountAggregateOutputType | null
  _avg: ContestAvgAggregateOutputType | null
  _sum: ContestSumAggregateOutputType | null
  _min: ContestMinAggregateOutputType | null
  _max: ContestMaxAggregateOutputType | null
}

export type ContestAvgAggregateOutputType = {
  maxEntries: number | null
  entryCost: number | null
}

export type ContestSumAggregateOutputType = {
  maxEntries: number | null
  entryCost: number | null
}

export type ContestMinAggregateOutputType = {
  id: string | null
  matchId: string | null
  name: string | null
  maxEntries: number | null
  entryCost: number | null
  prizesDistributed: boolean | null
  createdAt: Date | null
}

export type ContestMaxAggregateOutputType = {
  id: string | null
  matchId: string | null
  name: string | null
  maxEntries: number | null
  entryCost: number | null
  prizesDistributed: boolean | null
  createdAt: Date | null
}

export type ContestCountAggregateOutputType = {
  id: number
  matchId: number
  name: number
  maxEntries: number
  entryCost: number
  prizeDistribution: number
  prizesDistributed: number
  createdAt: number
  _all: number
}


export type ContestAvgAggregateInputType = {
  maxEntries?: true
  entryCost?: true
}

export type ContestSumAggregateInputType = {
  maxEntries?: true
  entryCost?: true
}

export type ContestMinAggregateInputType = {
  id?: true
  matchId?: true
  name?: true
  maxEntries?: true
  entryCost?: true
  prizesDistributed?: true
  createdAt?: true
}

export type ContestMaxAggregateInputType = {
  id?: true
  matchId?: true
  name?: true
  maxEntries?: true
  entryCost?: true
  prizesDistributed?: true
  createdAt?: true
}

export type ContestCountAggregateInputType = {
  id?: true
  matchId?: true
  name?: true
  maxEntries?: true
  entryCost?: true
  prizeDistribution?: true
  prizesDistributed?: true
  createdAt?: true
  _all?: true
}

export type ContestAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Contest to aggregate.
   */
  where?: Prisma.ContestWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Contests to fetch.
   */
  orderBy?: Prisma.ContestOrderByWithRelationInput | Prisma.ContestOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.ContestWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Contests 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` Contests.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned Contests
  **/
  _count?: true | ContestCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: ContestAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: ContestSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: ContestMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: ContestMaxAggregateInputType
}

export type GetContestAggregateType<T extends ContestAggregateArgs> = {
      [P in keyof T & keyof AggregateContest]: P extends '_count' | 'count'
    ? T[P] extends true
      ? number
      : Prisma.GetScalarType<T[P], AggregateContest[P]>
    : Prisma.GetScalarType<T[P], AggregateContest[P]>
}




export type ContestGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.ContestWhereInput
  orderBy?: Prisma.ContestOrderByWithAggregationInput | Prisma.ContestOrderByWithAggregationInput[]
  by: Prisma.ContestScalarFieldEnum[] | Prisma.ContestScalarFieldEnum
  having?: Prisma.ContestScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: ContestCountAggregateInputType | true
  _avg?: ContestAvgAggregateInputType
  _sum?: ContestSumAggregateInputType
  _min?: ContestMinAggregateInputType
  _max?: ContestMaxAggregateInputType
}

export type ContestGroupByOutputType = {
  id: string
  matchId: string
  name: string
  maxEntries: number
  entryCost: number
  prizeDistribution: runtime.JsonValue
  prizesDistributed: boolean
  createdAt: Date
  _count: ContestCountAggregateOutputType | null
  _avg: ContestAvgAggregateOutputType | null
  _sum: ContestSumAggregateOutputType | null
  _min: ContestMinAggregateOutputType | null
  _max: ContestMaxAggregateOutputType | null
}

export type GetContestGroupByPayload<T extends ContestGroupByArgs> = Prisma.PrismaPromise<
  Array<
    Prisma.PickEnumerable<ContestGroupByOutputType, T['by']> &
      {
        [P in ((keyof T) & (keyof ContestGroupByOutputType))]: P extends '_count'
          ? T[P] extends boolean
            ? number
            : Prisma.GetScalarType<T[P], ContestGroupByOutputType[P]>
          : Prisma.GetScalarType<T[P], ContestGroupByOutputType[P]>
      }
    >
  >



export type ContestWhereInput = {
  AND?: Prisma.ContestWhereInput | Prisma.ContestWhereInput[]
  OR?: Prisma.ContestWhereInput[]
  NOT?: Prisma.ContestWhereInput | Prisma.ContestWhereInput[]
  id?: Prisma.StringFilter<"Contest"> | string
  matchId?: Prisma.StringFilter<"Contest"> | string
  name?: Prisma.StringFilter<"Contest"> | string
  maxEntries?: Prisma.IntFilter<"Contest"> | number
  entryCost?: Prisma.IntFilter<"Contest"> | number
  prizeDistribution?: Prisma.JsonFilter<"Contest">
  prizesDistributed?: Prisma.BoolFilter<"Contest"> | boolean
  createdAt?: Prisma.DateTimeFilter<"Contest"> | Date | string
  match?: Prisma.XOR<Prisma.MatchScalarRelationFilter, Prisma.MatchWhereInput>
  entries?: Prisma.ContestEntryListRelationFilter
}

export type ContestOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  matchId?: Prisma.SortOrder
  name?: Prisma.SortOrder
  maxEntries?: Prisma.SortOrder
  entryCost?: Prisma.SortOrder
  prizeDistribution?: Prisma.SortOrder
  prizesDistributed?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  match?: Prisma.MatchOrderByWithRelationInput
  entries?: Prisma.ContestEntryOrderByRelationAggregateInput
}

export type ContestWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  AND?: Prisma.ContestWhereInput | Prisma.ContestWhereInput[]
  OR?: Prisma.ContestWhereInput[]
  NOT?: Prisma.ContestWhereInput | Prisma.ContestWhereInput[]
  matchId?: Prisma.StringFilter<"Contest"> | string
  name?: Prisma.StringFilter<"Contest"> | string
  maxEntries?: Prisma.IntFilter<"Contest"> | number
  entryCost?: Prisma.IntFilter<"Contest"> | number
  prizeDistribution?: Prisma.JsonFilter<"Contest">
  prizesDistributed?: Prisma.BoolFilter<"Contest"> | boolean
  createdAt?: Prisma.DateTimeFilter<"Contest"> | Date | string
  match?: Prisma.XOR<Prisma.MatchScalarRelationFilter, Prisma.MatchWhereInput>
  entries?: Prisma.ContestEntryListRelationFilter
}, "id">

export type ContestOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  matchId?: Prisma.SortOrder
  name?: Prisma.SortOrder
  maxEntries?: Prisma.SortOrder
  entryCost?: Prisma.SortOrder
  prizeDistribution?: Prisma.SortOrder
  prizesDistributed?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  _count?: Prisma.ContestCountOrderByAggregateInput
  _avg?: Prisma.ContestAvgOrderByAggregateInput
  _max?: Prisma.ContestMaxOrderByAggregateInput
  _min?: Prisma.ContestMinOrderByAggregateInput
  _sum?: Prisma.ContestSumOrderByAggregateInput
}

export type ContestScalarWhereWithAggregatesInput = {
  AND?: Prisma.ContestScalarWhereWithAggregatesInput | Prisma.ContestScalarWhereWithAggregatesInput[]
  OR?: Prisma.ContestScalarWhereWithAggregatesInput[]
  NOT?: Prisma.ContestScalarWhereWithAggregatesInput | Prisma.ContestScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"Contest"> | string
  matchId?: Prisma.StringWithAggregatesFilter<"Contest"> | string
  name?: Prisma.StringWithAggregatesFilter<"Contest"> | string
  maxEntries?: Prisma.IntWithAggregatesFilter<"Contest"> | number
  entryCost?: Prisma.IntWithAggregatesFilter<"Contest"> | number
  prizeDistribution?: Prisma.JsonWithAggregatesFilter<"Contest">
  prizesDistributed?: Prisma.BoolWithAggregatesFilter<"Contest"> | boolean
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"Contest"> | Date | string
}

export type ContestCreateInput = {
  id?: string
  name: string
  maxEntries?: number
  entryCost?: number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: boolean
  createdAt?: Date | string
  match: Prisma.MatchCreateNestedOneWithoutContestsInput
  entries?: Prisma.ContestEntryCreateNestedManyWithoutContestInput
}

export type ContestUncheckedCreateInput = {
  id?: string
  matchId: string
  name: string
  maxEntries?: number
  entryCost?: number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: boolean
  createdAt?: Date | string
  entries?: Prisma.ContestEntryUncheckedCreateNestedManyWithoutContestInput
}

export type ContestUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  maxEntries?: Prisma.IntFieldUpdateOperationsInput | number
  entryCost?: Prisma.IntFieldUpdateOperationsInput | number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  match?: Prisma.MatchUpdateOneRequiredWithoutContestsNestedInput
  entries?: Prisma.ContestEntryUpdateManyWithoutContestNestedInput
}

export type ContestUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  matchId?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  maxEntries?: Prisma.IntFieldUpdateOperationsInput | number
  entryCost?: Prisma.IntFieldUpdateOperationsInput | number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  entries?: Prisma.ContestEntryUncheckedUpdateManyWithoutContestNestedInput
}

export type ContestCreateManyInput = {
  id?: string
  matchId: string
  name: string
  maxEntries?: number
  entryCost?: number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: boolean
  createdAt?: Date | string
}

export type ContestUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  maxEntries?: Prisma.IntFieldUpdateOperationsInput | number
  entryCost?: Prisma.IntFieldUpdateOperationsInput | number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type ContestUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  matchId?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  maxEntries?: Prisma.IntFieldUpdateOperationsInput | number
  entryCost?: Prisma.IntFieldUpdateOperationsInput | number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type ContestListRelationFilter = {
  every?: Prisma.ContestWhereInput
  some?: Prisma.ContestWhereInput
  none?: Prisma.ContestWhereInput
}

export type ContestOrderByRelationAggregateInput = {
  _count?: Prisma.SortOrder
}

export type ContestCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  matchId?: Prisma.SortOrder
  name?: Prisma.SortOrder
  maxEntries?: Prisma.SortOrder
  entryCost?: Prisma.SortOrder
  prizeDistribution?: Prisma.SortOrder
  prizesDistributed?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
}

export type ContestAvgOrderByAggregateInput = {
  maxEntries?: Prisma.SortOrder
  entryCost?: Prisma.SortOrder
}

export type ContestMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  matchId?: Prisma.SortOrder
  name?: Prisma.SortOrder
  maxEntries?: Prisma.SortOrder
  entryCost?: Prisma.SortOrder
  prizesDistributed?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
}

export type ContestMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  matchId?: Prisma.SortOrder
  name?: Prisma.SortOrder
  maxEntries?: Prisma.SortOrder
  entryCost?: Prisma.SortOrder
  prizesDistributed?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
}

export type ContestSumOrderByAggregateInput = {
  maxEntries?: Prisma.SortOrder
  entryCost?: Prisma.SortOrder
}

export type ContestScalarRelationFilter = {
  is?: Prisma.ContestWhereInput
  isNot?: Prisma.ContestWhereInput
}

export type ContestCreateNestedManyWithoutMatchInput = {
  create?: Prisma.XOR<Prisma.ContestCreateWithoutMatchInput, Prisma.ContestUncheckedCreateWithoutMatchInput> | Prisma.ContestCreateWithoutMatchInput[] | Prisma.ContestUncheckedCreateWithoutMatchInput[]
  connectOrCreate?: Prisma.ContestCreateOrConnectWithoutMatchInput | Prisma.ContestCreateOrConnectWithoutMatchInput[]
  createMany?: Prisma.ContestCreateManyMatchInputEnvelope
  connect?: Prisma.ContestWhereUniqueInput | Prisma.ContestWhereUniqueInput[]
}

export type ContestUncheckedCreateNestedManyWithoutMatchInput = {
  create?: Prisma.XOR<Prisma.ContestCreateWithoutMatchInput, Prisma.ContestUncheckedCreateWithoutMatchInput> | Prisma.ContestCreateWithoutMatchInput[] | Prisma.ContestUncheckedCreateWithoutMatchInput[]
  connectOrCreate?: Prisma.ContestCreateOrConnectWithoutMatchInput | Prisma.ContestCreateOrConnectWithoutMatchInput[]
  createMany?: Prisma.ContestCreateManyMatchInputEnvelope
  connect?: Prisma.ContestWhereUniqueInput | Prisma.ContestWhereUniqueInput[]
}

export type ContestUpdateManyWithoutMatchNestedInput = {
  create?: Prisma.XOR<Prisma.ContestCreateWithoutMatchInput, Prisma.ContestUncheckedCreateWithoutMatchInput> | Prisma.ContestCreateWithoutMatchInput[] | Prisma.ContestUncheckedCreateWithoutMatchInput[]
  connectOrCreate?: Prisma.ContestCreateOrConnectWithoutMatchInput | Prisma.ContestCreateOrConnectWithoutMatchInput[]
  upsert?: Prisma.ContestUpsertWithWhereUniqueWithoutMatchInput | Prisma.ContestUpsertWithWhereUniqueWithoutMatchInput[]
  createMany?: Prisma.ContestCreateManyMatchInputEnvelope
  set?: Prisma.ContestWhereUniqueInput | Prisma.ContestWhereUniqueInput[]
  disconnect?: Prisma.ContestWhereUniqueInput | Prisma.ContestWhereUniqueInput[]
  delete?: Prisma.ContestWhereUniqueInput | Prisma.ContestWhereUniqueInput[]
  connect?: Prisma.ContestWhereUniqueInput | Prisma.ContestWhereUniqueInput[]
  update?: Prisma.ContestUpdateWithWhereUniqueWithoutMatchInput | Prisma.ContestUpdateWithWhereUniqueWithoutMatchInput[]
  updateMany?: Prisma.ContestUpdateManyWithWhereWithoutMatchInput | Prisma.ContestUpdateManyWithWhereWithoutMatchInput[]
  deleteMany?: Prisma.ContestScalarWhereInput | Prisma.ContestScalarWhereInput[]
}

export type ContestUncheckedUpdateManyWithoutMatchNestedInput = {
  create?: Prisma.XOR<Prisma.ContestCreateWithoutMatchInput, Prisma.ContestUncheckedCreateWithoutMatchInput> | Prisma.ContestCreateWithoutMatchInput[] | Prisma.ContestUncheckedCreateWithoutMatchInput[]
  connectOrCreate?: Prisma.ContestCreateOrConnectWithoutMatchInput | Prisma.ContestCreateOrConnectWithoutMatchInput[]
  upsert?: Prisma.ContestUpsertWithWhereUniqueWithoutMatchInput | Prisma.ContestUpsertWithWhereUniqueWithoutMatchInput[]
  createMany?: Prisma.ContestCreateManyMatchInputEnvelope
  set?: Prisma.ContestWhereUniqueInput | Prisma.ContestWhereUniqueInput[]
  disconnect?: Prisma.ContestWhereUniqueInput | Prisma.ContestWhereUniqueInput[]
  delete?: Prisma.ContestWhereUniqueInput | Prisma.ContestWhereUniqueInput[]
  connect?: Prisma.ContestWhereUniqueInput | Prisma.ContestWhereUniqueInput[]
  update?: Prisma.ContestUpdateWithWhereUniqueWithoutMatchInput | Prisma.ContestUpdateWithWhereUniqueWithoutMatchInput[]
  updateMany?: Prisma.ContestUpdateManyWithWhereWithoutMatchInput | Prisma.ContestUpdateManyWithWhereWithoutMatchInput[]
  deleteMany?: Prisma.ContestScalarWhereInput | Prisma.ContestScalarWhereInput[]
}

export type ContestCreateNestedOneWithoutEntriesInput = {
  create?: Prisma.XOR<Prisma.ContestCreateWithoutEntriesInput, Prisma.ContestUncheckedCreateWithoutEntriesInput>
  connectOrCreate?: Prisma.ContestCreateOrConnectWithoutEntriesInput
  connect?: Prisma.ContestWhereUniqueInput
}

export type ContestUpdateOneRequiredWithoutEntriesNestedInput = {
  create?: Prisma.XOR<Prisma.ContestCreateWithoutEntriesInput, Prisma.ContestUncheckedCreateWithoutEntriesInput>
  connectOrCreate?: Prisma.ContestCreateOrConnectWithoutEntriesInput
  upsert?: Prisma.ContestUpsertWithoutEntriesInput
  connect?: Prisma.ContestWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.ContestUpdateToOneWithWhereWithoutEntriesInput, Prisma.ContestUpdateWithoutEntriesInput>, Prisma.ContestUncheckedUpdateWithoutEntriesInput>
}

export type ContestCreateWithoutMatchInput = {
  id?: string
  name: string
  maxEntries?: number
  entryCost?: number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: boolean
  createdAt?: Date | string
  entries?: Prisma.ContestEntryCreateNestedManyWithoutContestInput
}

export type ContestUncheckedCreateWithoutMatchInput = {
  id?: string
  name: string
  maxEntries?: number
  entryCost?: number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: boolean
  createdAt?: Date | string
  entries?: Prisma.ContestEntryUncheckedCreateNestedManyWithoutContestInput
}

export type ContestCreateOrConnectWithoutMatchInput = {
  where: Prisma.ContestWhereUniqueInput
  create: Prisma.XOR<Prisma.ContestCreateWithoutMatchInput, Prisma.ContestUncheckedCreateWithoutMatchInput>
}

export type ContestCreateManyMatchInputEnvelope = {
  data: Prisma.ContestCreateManyMatchInput | Prisma.ContestCreateManyMatchInput[]
  skipDuplicates?: boolean
}

export type ContestUpsertWithWhereUniqueWithoutMatchInput = {
  where: Prisma.ContestWhereUniqueInput
  update: Prisma.XOR<Prisma.ContestUpdateWithoutMatchInput, Prisma.ContestUncheckedUpdateWithoutMatchInput>
  create: Prisma.XOR<Prisma.ContestCreateWithoutMatchInput, Prisma.ContestUncheckedCreateWithoutMatchInput>
}

export type ContestUpdateWithWhereUniqueWithoutMatchInput = {
  where: Prisma.ContestWhereUniqueInput
  data: Prisma.XOR<Prisma.ContestUpdateWithoutMatchInput, Prisma.ContestUncheckedUpdateWithoutMatchInput>
}

export type ContestUpdateManyWithWhereWithoutMatchInput = {
  where: Prisma.ContestScalarWhereInput
  data: Prisma.XOR<Prisma.ContestUpdateManyMutationInput, Prisma.ContestUncheckedUpdateManyWithoutMatchInput>
}

export type ContestScalarWhereInput = {
  AND?: Prisma.ContestScalarWhereInput | Prisma.ContestScalarWhereInput[]
  OR?: Prisma.ContestScalarWhereInput[]
  NOT?: Prisma.ContestScalarWhereInput | Prisma.ContestScalarWhereInput[]
  id?: Prisma.StringFilter<"Contest"> | string
  matchId?: Prisma.StringFilter<"Contest"> | string
  name?: Prisma.StringFilter<"Contest"> | string
  maxEntries?: Prisma.IntFilter<"Contest"> | number
  entryCost?: Prisma.IntFilter<"Contest"> | number
  prizeDistribution?: Prisma.JsonFilter<"Contest">
  prizesDistributed?: Prisma.BoolFilter<"Contest"> | boolean
  createdAt?: Prisma.DateTimeFilter<"Contest"> | Date | string
}

export type ContestCreateWithoutEntriesInput = {
  id?: string
  name: string
  maxEntries?: number
  entryCost?: number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: boolean
  createdAt?: Date | string
  match: Prisma.MatchCreateNestedOneWithoutContestsInput
}

export type ContestUncheckedCreateWithoutEntriesInput = {
  id?: string
  matchId: string
  name: string
  maxEntries?: number
  entryCost?: number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: boolean
  createdAt?: Date | string
}

export type ContestCreateOrConnectWithoutEntriesInput = {
  where: Prisma.ContestWhereUniqueInput
  create: Prisma.XOR<Prisma.ContestCreateWithoutEntriesInput, Prisma.ContestUncheckedCreateWithoutEntriesInput>
}

export type ContestUpsertWithoutEntriesInput = {
  update: Prisma.XOR<Prisma.ContestUpdateWithoutEntriesInput, Prisma.ContestUncheckedUpdateWithoutEntriesInput>
  create: Prisma.XOR<Prisma.ContestCreateWithoutEntriesInput, Prisma.ContestUncheckedCreateWithoutEntriesInput>
  where?: Prisma.ContestWhereInput
}

export type ContestUpdateToOneWithWhereWithoutEntriesInput = {
  where?: Prisma.ContestWhereInput
  data: Prisma.XOR<Prisma.ContestUpdateWithoutEntriesInput, Prisma.ContestUncheckedUpdateWithoutEntriesInput>
}

export type ContestUpdateWithoutEntriesInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  maxEntries?: Prisma.IntFieldUpdateOperationsInput | number
  entryCost?: Prisma.IntFieldUpdateOperationsInput | number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  match?: Prisma.MatchUpdateOneRequiredWithoutContestsNestedInput
}

export type ContestUncheckedUpdateWithoutEntriesInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  matchId?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  maxEntries?: Prisma.IntFieldUpdateOperationsInput | number
  entryCost?: Prisma.IntFieldUpdateOperationsInput | number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type ContestCreateManyMatchInput = {
  id?: string
  name: string
  maxEntries?: number
  entryCost?: number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: boolean
  createdAt?: Date | string
}

export type ContestUpdateWithoutMatchInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  maxEntries?: Prisma.IntFieldUpdateOperationsInput | number
  entryCost?: Prisma.IntFieldUpdateOperationsInput | number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  entries?: Prisma.ContestEntryUpdateManyWithoutContestNestedInput
}

export type ContestUncheckedUpdateWithoutMatchInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  maxEntries?: Prisma.IntFieldUpdateOperationsInput | number
  entryCost?: Prisma.IntFieldUpdateOperationsInput | number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  entries?: Prisma.ContestEntryUncheckedUpdateManyWithoutContestNestedInput
}

export type ContestUncheckedUpdateManyWithoutMatchInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  maxEntries?: Prisma.IntFieldUpdateOperationsInput | number
  entryCost?: Prisma.IntFieldUpdateOperationsInput | number
  prizeDistribution?: Prisma.JsonNullValueInput | runtime.InputJsonValue
  prizesDistributed?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}


/**
 * Count Type ContestCountOutputType
 */

export type ContestCountOutputType = {
  entries: number
}

export type ContestCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  entries?: boolean | ContestCountOutputTypeCountEntriesArgs
}

/**
 * ContestCountOutputType without action
 */
export type ContestCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ContestCountOutputType
   */
  select?: Prisma.ContestCountOutputTypeSelect<ExtArgs> | null
}

/**
 * ContestCountOutputType without action
 */
export type ContestCountOutputTypeCountEntriesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.ContestEntryWhereInput
}


export type ContestSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  matchId?: boolean
  name?: boolean
  maxEntries?: boolean
  entryCost?: boolean
  prizeDistribution?: boolean
  prizesDistributed?: boolean
  createdAt?: boolean
  match?: boolean | Prisma.MatchDefaultArgs<ExtArgs>
  entries?: boolean | Prisma.Contest$entriesArgs<ExtArgs>
  _count?: boolean | Prisma.ContestCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["contest"]>

export type ContestSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  matchId?: boolean
  name?: boolean
  maxEntries?: boolean
  entryCost?: boolean
  prizeDistribution?: boolean
  prizesDistributed?: boolean
  createdAt?: boolean
  match?: boolean | Prisma.MatchDefaultArgs<ExtArgs>
}, ExtArgs["result"]["contest"]>

export type ContestSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  matchId?: boolean
  name?: boolean
  maxEntries?: boolean
  entryCost?: boolean
  prizeDistribution?: boolean
  prizesDistributed?: boolean
  createdAt?: boolean
  match?: boolean | Prisma.MatchDefaultArgs<ExtArgs>
}, ExtArgs["result"]["contest"]>

export type ContestSelectScalar = {
  id?: boolean
  matchId?: boolean
  name?: boolean
  maxEntries?: boolean
  entryCost?: boolean
  prizeDistribution?: boolean
  prizesDistributed?: boolean
  createdAt?: boolean
}

export type ContestOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "matchId" | "name" | "maxEntries" | "entryCost" | "prizeDistribution" | "prizesDistributed" | "createdAt", ExtArgs["result"]["contest"]>
export type ContestInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  match?: boolean | Prisma.MatchDefaultArgs<ExtArgs>
  entries?: boolean | Prisma.Contest$entriesArgs<ExtArgs>
  _count?: boolean | Prisma.ContestCountOutputTypeDefaultArgs<ExtArgs>
}
export type ContestIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  match?: boolean | Prisma.MatchDefaultArgs<ExtArgs>
}
export type ContestIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  match?: boolean | Prisma.MatchDefaultArgs<ExtArgs>
}

export type $ContestPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "Contest"
  objects: {
    match: Prisma.$MatchPayload<ExtArgs>
    entries: Prisma.$ContestEntryPayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    matchId: string
    name: string
    maxEntries: number
    entryCost: number
    prizeDistribution: runtime.JsonValue
    prizesDistributed: boolean
    createdAt: Date
  }, ExtArgs["result"]["contest"]>
  composites: {}
}

export type ContestGetPayload<S extends boolean | null | undefined | ContestDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$ContestPayload, S>

export type ContestCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
  Omit<ContestFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
    select?: ContestCountAggregateInputType | true
  }

export interface ContestDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
  [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Contest'], meta: { name: 'Contest' } }
  /**
   * Find zero or one Contest that matches the filter.
   * @param {ContestFindUniqueArgs} args - Arguments to find a Contest
   * @example
   * // Get one Contest
   * const contest = await prisma.contest.findUnique({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findUnique<T extends ContestFindUniqueArgs>(args: Prisma.SelectSubset<T, ContestFindUniqueArgs<ExtArgs>>): Prisma.Prisma__ContestClient<runtime.Types.Result.GetResult<Prisma.$ContestPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

  /**
   * Find one Contest that matches the filter or throw an error with `error.code='P2025'`
   * if no matches were found.
   * @param {ContestFindUniqueOrThrowArgs} args - Arguments to find a Contest
   * @example
   * // Get one Contest
   * const contest = await prisma.contest.findUniqueOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findUniqueOrThrow<T extends ContestFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, ContestFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__ContestClient<runtime.Types.Result.GetResult<Prisma.$ContestPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Find the first Contest 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 {ContestFindFirstArgs} args - Arguments to find a Contest
   * @example
   * // Get one Contest
   * const contest = await prisma.contest.findFirst({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirst<T extends ContestFindFirstArgs>(args?: Prisma.SelectSubset<T, ContestFindFirstArgs<ExtArgs>>): Prisma.Prisma__ContestClient<runtime.Types.Result.GetResult<Prisma.$ContestPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

  /**
   * Find the first Contest 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 {ContestFindFirstOrThrowArgs} args - Arguments to find a Contest
   * @example
   * // Get one Contest
   * const contest = await prisma.contest.findFirstOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirstOrThrow<T extends ContestFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, ContestFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__ContestClient<runtime.Types.Result.GetResult<Prisma.$ContestPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Find zero or more Contests 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 {ContestFindManyArgs} args - Arguments to filter and select certain fields only.
   * @example
   * // Get all Contests
   * const contests = await prisma.contest.findMany()
   * 
   * // Get first 10 Contests
   * const contests = await prisma.contest.findMany({ take: 10 })
   * 
   * // Only select the `id`
   * const contestWithIdOnly = await prisma.contest.findMany({ select: { id: true } })
   * 
   */
  findMany<T extends ContestFindManyArgs>(args?: Prisma.SelectSubset<T, ContestFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ContestPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

  /**
   * Create a Contest.
   * @param {ContestCreateArgs} args - Arguments to create a Contest.
   * @example
   * // Create one Contest
   * const Contest = await prisma.contest.create({
   *   data: {
   *     // ... data to create a Contest
   *   }
   * })
   * 
   */
  create<T extends ContestCreateArgs>(args: Prisma.SelectSubset<T, ContestCreateArgs<ExtArgs>>): Prisma.Prisma__ContestClient<runtime.Types.Result.GetResult<Prisma.$ContestPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Create many Contests.
   * @param {ContestCreateManyArgs} args - Arguments to create many Contests.
   * @example
   * // Create many Contests
   * const contest = await prisma.contest.createMany({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   *     
   */
  createMany<T extends ContestCreateManyArgs>(args?: Prisma.SelectSubset<T, ContestCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Create many Contests and returns the data saved in the database.
   * @param {ContestCreateManyAndReturnArgs} args - Arguments to create many Contests.
   * @example
   * // Create many Contests
   * const contest = await prisma.contest.createManyAndReturn({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Create many Contests and only return the `id`
   * const contestWithIdOnly = await prisma.contest.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 ContestCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, ContestCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ContestPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

  /**
   * Delete a Contest.
   * @param {ContestDeleteArgs} args - Arguments to delete one Contest.
   * @example
   * // Delete one Contest
   * const Contest = await prisma.contest.delete({
   *   where: {
   *     // ... filter to delete one Contest
   *   }
   * })
   * 
   */
  delete<T extends ContestDeleteArgs>(args: Prisma.SelectSubset<T, ContestDeleteArgs<ExtArgs>>): Prisma.Prisma__ContestClient<runtime.Types.Result.GetResult<Prisma.$ContestPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Update one Contest.
   * @param {ContestUpdateArgs} args - Arguments to update one Contest.
   * @example
   * // Update one Contest
   * const contest = await prisma.contest.update({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   * 
   */
  update<T extends ContestUpdateArgs>(args: Prisma.SelectSubset<T, ContestUpdateArgs<ExtArgs>>): Prisma.Prisma__ContestClient<runtime.Types.Result.GetResult<Prisma.$ContestPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Delete zero or more Contests.
   * @param {ContestDeleteManyArgs} args - Arguments to filter Contests to delete.
   * @example
   * // Delete a few Contests
   * const { count } = await prisma.contest.deleteMany({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   * 
   */
  deleteMany<T extends ContestDeleteManyArgs>(args?: Prisma.SelectSubset<T, ContestDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Update zero or more Contests.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {ContestUpdateManyArgs} args - Arguments to update one or more rows.
   * @example
   * // Update many Contests
   * const contest = await prisma.contest.updateMany({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   * 
   */
  updateMany<T extends ContestUpdateManyArgs>(args: Prisma.SelectSubset<T, ContestUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Update zero or more Contests and returns the data updated in the database.
   * @param {ContestUpdateManyAndReturnArgs} args - Arguments to update many Contests.
   * @example
   * // Update many Contests
   * const contest = await prisma.contest.updateManyAndReturn({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Update zero or more Contests and only return the `id`
   * const contestWithIdOnly = await prisma.contest.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 ContestUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, ContestUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ContestPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

  /**
   * Create or update one Contest.
   * @param {ContestUpsertArgs} args - Arguments to update or create a Contest.
   * @example
   * // Update or create a Contest
   * const contest = await prisma.contest.upsert({
   *   create: {
   *     // ... data to create a Contest
   *   },
   *   update: {
   *     // ... in case it already exists, update
   *   },
   *   where: {
   *     // ... the filter for the Contest we want to update
   *   }
   * })
   */
  upsert<T extends ContestUpsertArgs>(args: Prisma.SelectSubset<T, ContestUpsertArgs<ExtArgs>>): Prisma.Prisma__ContestClient<runtime.Types.Result.GetResult<Prisma.$ContestPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


  /**
   * Count the number of Contests.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {ContestCountArgs} args - Arguments to filter Contests to count.
   * @example
   * // Count the number of Contests
   * const count = await prisma.contest.count({
   *   where: {
   *     // ... the filter for the Contests we want to count
   *   }
   * })
  **/
  count<T extends ContestCountArgs>(
    args?: Prisma.Subset<T, ContestCountArgs>,
  ): Prisma.PrismaPromise<
    T extends runtime.Types.Utils.Record<'select', any>
      ? T['select'] extends true
        ? number
        : Prisma.GetScalarType<T['select'], ContestCountAggregateOutputType>
      : number
  >

  /**
   * Allows you to perform aggregations operations on a Contest.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {ContestAggregateArgs} 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 ContestAggregateArgs>(args: Prisma.Subset<T, ContestAggregateArgs>): Prisma.PrismaPromise<GetContestAggregateType<T>>

  /**
   * Group by Contest.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {ContestGroupByArgs} 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 ContestGroupByArgs,
    HasSelectOrTake extends Prisma.Or<
      Prisma.Extends<'skip', Prisma.Keys<T>>,
      Prisma.Extends<'take', Prisma.Keys<T>>
    >,
    OrderByArg extends Prisma.True extends HasSelectOrTake
      ? { orderBy: ContestGroupByArgs['orderBy'] }
      : { orderBy?: ContestGroupByArgs['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, ContestGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetContestGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
 * Fields of the Contest model
 */
readonly fields: ContestFieldRefs;
}

/**
 * The delegate class that acts as a "Promise-like" for Contest.
 * 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__ContestClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  match<T extends Prisma.MatchDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.MatchDefaultArgs<ExtArgs>>): Prisma.Prisma__MatchClient<runtime.Types.Result.GetResult<Prisma.$MatchPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
  entries<T extends Prisma.Contest$entriesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Contest$entriesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ContestEntryPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  /**
   * 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 Contest model
 */
export interface ContestFieldRefs {
  readonly id: Prisma.FieldRef<"Contest", 'String'>
  readonly matchId: Prisma.FieldRef<"Contest", 'String'>
  readonly name: Prisma.FieldRef<"Contest", 'String'>
  readonly maxEntries: Prisma.FieldRef<"Contest", 'Int'>
  readonly entryCost: Prisma.FieldRef<"Contest", 'Int'>
  readonly prizeDistribution: Prisma.FieldRef<"Contest", 'Json'>
  readonly prizesDistributed: Prisma.FieldRef<"Contest", 'Boolean'>
  readonly createdAt: Prisma.FieldRef<"Contest", 'DateTime'>
}
    

// Custom InputTypes
/**
 * Contest findUnique
 */
export type ContestFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Contest
   */
  select?: Prisma.ContestSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Contest
   */
  omit?: Prisma.ContestOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ContestInclude<ExtArgs> | null
  /**
   * Filter, which Contest to fetch.
   */
  where: Prisma.ContestWhereUniqueInput
}

/**
 * Contest findUniqueOrThrow
 */
export type ContestFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Contest
   */
  select?: Prisma.ContestSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Contest
   */
  omit?: Prisma.ContestOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ContestInclude<ExtArgs> | null
  /**
   * Filter, which Contest to fetch.
   */
  where: Prisma.ContestWhereUniqueInput
}

/**
 * Contest findFirst
 */
export type ContestFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Contest
   */
  select?: Prisma.ContestSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Contest
   */
  omit?: Prisma.ContestOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ContestInclude<ExtArgs> | null
  /**
   * Filter, which Contest to fetch.
   */
  where?: Prisma.ContestWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Contests to fetch.
   */
  orderBy?: Prisma.ContestOrderByWithRelationInput | Prisma.ContestOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for Contests.
   */
  cursor?: Prisma.ContestWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Contests 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` Contests.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of Contests.
   */
  distinct?: Prisma.ContestScalarFieldEnum | Prisma.ContestScalarFieldEnum[]
}

/**
 * Contest findFirstOrThrow
 */
export type ContestFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Contest
   */
  select?: Prisma.ContestSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Contest
   */
  omit?: Prisma.ContestOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ContestInclude<ExtArgs> | null
  /**
   * Filter, which Contest to fetch.
   */
  where?: Prisma.ContestWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Contests to fetch.
   */
  orderBy?: Prisma.ContestOrderByWithRelationInput | Prisma.ContestOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for Contests.
   */
  cursor?: Prisma.ContestWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Contests 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` Contests.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of Contests.
   */
  distinct?: Prisma.ContestScalarFieldEnum | Prisma.ContestScalarFieldEnum[]
}

/**
 * Contest findMany
 */
export type ContestFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Contest
   */
  select?: Prisma.ContestSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Contest
   */
  omit?: Prisma.ContestOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ContestInclude<ExtArgs> | null
  /**
   * Filter, which Contests to fetch.
   */
  where?: Prisma.ContestWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Contests to fetch.
   */
  orderBy?: Prisma.ContestOrderByWithRelationInput | Prisma.ContestOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing Contests.
   */
  cursor?: Prisma.ContestWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Contests 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` Contests.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of Contests.
   */
  distinct?: Prisma.ContestScalarFieldEnum | Prisma.ContestScalarFieldEnum[]
}

/**
 * Contest create
 */
export type ContestCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Contest
   */
  select?: Prisma.ContestSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Contest
   */
  omit?: Prisma.ContestOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ContestInclude<ExtArgs> | null
  /**
   * The data needed to create a Contest.
   */
  data: Prisma.XOR<Prisma.ContestCreateInput, Prisma.ContestUncheckedCreateInput>
}

/**
 * Contest createMany
 */
export type ContestCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to create many Contests.
   */
  data: Prisma.ContestCreateManyInput | Prisma.ContestCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * Contest createManyAndReturn
 */
export type ContestCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Contest
   */
  select?: Prisma.ContestSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Contest
   */
  omit?: Prisma.ContestOmit<ExtArgs> | null
  /**
   * The data used to create many Contests.
   */
  data: Prisma.ContestCreateManyInput | Prisma.ContestCreateManyInput[]
  skipDuplicates?: boolean
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ContestIncludeCreateManyAndReturn<ExtArgs> | null
}

/**
 * Contest update
 */
export type ContestUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Contest
   */
  select?: Prisma.ContestSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Contest
   */
  omit?: Prisma.ContestOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ContestInclude<ExtArgs> | null
  /**
   * The data needed to update a Contest.
   */
  data: Prisma.XOR<Prisma.ContestUpdateInput, Prisma.ContestUncheckedUpdateInput>
  /**
   * Choose, which Contest to update.
   */
  where: Prisma.ContestWhereUniqueInput
}

/**
 * Contest updateMany
 */
export type ContestUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update Contests.
   */
  data: Prisma.XOR<Prisma.ContestUpdateManyMutationInput, Prisma.ContestUncheckedUpdateManyInput>
  /**
   * Filter which Contests to update
   */
  where?: Prisma.ContestWhereInput
  /**
   * Limit how many Contests to update.
   */
  limit?: number
}

/**
 * Contest updateManyAndReturn
 */
export type ContestUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Contest
   */
  select?: Prisma.ContestSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Contest
   */
  omit?: Prisma.ContestOmit<ExtArgs> | null
  /**
   * The data used to update Contests.
   */
  data: Prisma.XOR<Prisma.ContestUpdateManyMutationInput, Prisma.ContestUncheckedUpdateManyInput>
  /**
   * Filter which Contests to update
   */
  where?: Prisma.ContestWhereInput
  /**
   * Limit how many Contests to update.
   */
  limit?: number
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ContestIncludeUpdateManyAndReturn<ExtArgs> | null
}

/**
 * Contest upsert
 */
export type ContestUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Contest
   */
  select?: Prisma.ContestSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Contest
   */
  omit?: Prisma.ContestOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ContestInclude<ExtArgs> | null
  /**
   * The filter to search for the Contest to update in case it exists.
   */
  where: Prisma.ContestWhereUniqueInput
  /**
   * In case the Contest found by the `where` argument doesn't exist, create a new Contest with this data.
   */
  create: Prisma.XOR<Prisma.ContestCreateInput, Prisma.ContestUncheckedCreateInput>
  /**
   * In case the Contest was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.ContestUpdateInput, Prisma.ContestUncheckedUpdateInput>
}

/**
 * Contest delete
 */
export type ContestDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Contest
   */
  select?: Prisma.ContestSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Contest
   */
  omit?: Prisma.ContestOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ContestInclude<ExtArgs> | null
  /**
   * Filter which Contest to delete.
   */
  where: Prisma.ContestWhereUniqueInput
}

/**
 * Contest deleteMany
 */
export type ContestDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Contests to delete
   */
  where?: Prisma.ContestWhereInput
  /**
   * Limit how many Contests to delete.
   */
  limit?: number
}

/**
 * Contest.entries
 */
export type Contest$entriesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ContestEntry
   */
  select?: Prisma.ContestEntrySelect<ExtArgs> | null
  /**
   * Omit specific fields from the ContestEntry
   */
  omit?: Prisma.ContestEntryOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ContestEntryInclude<ExtArgs> | null
  where?: Prisma.ContestEntryWhereInput
  orderBy?: Prisma.ContestEntryOrderByWithRelationInput | Prisma.ContestEntryOrderByWithRelationInput[]
  cursor?: Prisma.ContestEntryWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.ContestEntryScalarFieldEnum | Prisma.ContestEntryScalarFieldEnum[]
}

/**
 * Contest without action
 */
export type ContestDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Contest
   */
  select?: Prisma.ContestSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Contest
   */
  omit?: Prisma.ContestOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ContestInclude<ExtArgs> | null
}
