
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `chapter` 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 chapter
 * 
 */
export type chapterModel = runtime.Types.Result.DefaultSelection<Prisma.$chapterPayload>

export type AggregateChapter = {
  _count: ChapterCountAggregateOutputType | null
  _avg: ChapterAvgAggregateOutputType | null
  _sum: ChapterSumAggregateOutputType | null
  _min: ChapterMinAggregateOutputType | null
  _max: ChapterMaxAggregateOutputType | null
}

export type ChapterAvgAggregateOutputType = {
  chapterNumber: number | null
}

export type ChapterSumAggregateOutputType = {
  chapterNumber: number | null
}

export type ChapterMinAggregateOutputType = {
  id: string | null
  bookId: string | null
  chapterNumber: number | null
  title: string | null
  content: string | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type ChapterMaxAggregateOutputType = {
  id: string | null
  bookId: string | null
  chapterNumber: number | null
  title: string | null
  content: string | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type ChapterCountAggregateOutputType = {
  id: number
  bookId: number
  chapterNumber: number
  title: number
  content: number
  createdAt: number
  updatedAt: number
  _all: number
}


export type ChapterAvgAggregateInputType = {
  chapterNumber?: true
}

export type ChapterSumAggregateInputType = {
  chapterNumber?: true
}

export type ChapterMinAggregateInputType = {
  id?: true
  bookId?: true
  chapterNumber?: true
  title?: true
  content?: true
  createdAt?: true
  updatedAt?: true
}

export type ChapterMaxAggregateInputType = {
  id?: true
  bookId?: true
  chapterNumber?: true
  title?: true
  content?: true
  createdAt?: true
  updatedAt?: true
}

export type ChapterCountAggregateInputType = {
  id?: true
  bookId?: true
  chapterNumber?: true
  title?: true
  content?: true
  createdAt?: true
  updatedAt?: true
  _all?: true
}

export type ChapterAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which chapter to aggregate.
   */
  where?: Prisma.chapterWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of chapters to fetch.
   */
  orderBy?: Prisma.chapterOrderByWithRelationInput | Prisma.chapterOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.chapterWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` chapters 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` chapters.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned chapters
  **/
  _count?: true | ChapterCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: ChapterAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: ChapterSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: ChapterMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: ChapterMaxAggregateInputType
}

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




export type chapterGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.chapterWhereInput
  orderBy?: Prisma.chapterOrderByWithAggregationInput | Prisma.chapterOrderByWithAggregationInput[]
  by: Prisma.ChapterScalarFieldEnum[] | Prisma.ChapterScalarFieldEnum
  having?: Prisma.chapterScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: ChapterCountAggregateInputType | true
  _avg?: ChapterAvgAggregateInputType
  _sum?: ChapterSumAggregateInputType
  _min?: ChapterMinAggregateInputType
  _max?: ChapterMaxAggregateInputType
}

export type ChapterGroupByOutputType = {
  id: string
  bookId: string
  chapterNumber: number
  title: string
  content: string
  createdAt: Date
  updatedAt: Date
  _count: ChapterCountAggregateOutputType | null
  _avg: ChapterAvgAggregateOutputType | null
  _sum: ChapterSumAggregateOutputType | null
  _min: ChapterMinAggregateOutputType | null
  _max: ChapterMaxAggregateOutputType | null
}

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



export type chapterWhereInput = {
  AND?: Prisma.chapterWhereInput | Prisma.chapterWhereInput[]
  OR?: Prisma.chapterWhereInput[]
  NOT?: Prisma.chapterWhereInput | Prisma.chapterWhereInput[]
  id?: Prisma.StringFilter<"chapter"> | string
  bookId?: Prisma.StringFilter<"chapter"> | string
  chapterNumber?: Prisma.IntFilter<"chapter"> | number
  title?: Prisma.StringFilter<"chapter"> | string
  content?: Prisma.StringFilter<"chapter"> | string
  createdAt?: Prisma.DateTimeFilter<"chapter"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"chapter"> | Date | string
  book?: Prisma.XOR<Prisma.BookScalarRelationFilter, Prisma.bookWhereInput>
}

export type chapterOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  bookId?: Prisma.SortOrder
  chapterNumber?: Prisma.SortOrder
  title?: Prisma.SortOrder
  content?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  book?: Prisma.bookOrderByWithRelationInput
}

export type chapterWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  bookId_chapterNumber?: Prisma.chapterBookIdChapterNumberCompoundUniqueInput
  AND?: Prisma.chapterWhereInput | Prisma.chapterWhereInput[]
  OR?: Prisma.chapterWhereInput[]
  NOT?: Prisma.chapterWhereInput | Prisma.chapterWhereInput[]
  bookId?: Prisma.StringFilter<"chapter"> | string
  chapterNumber?: Prisma.IntFilter<"chapter"> | number
  title?: Prisma.StringFilter<"chapter"> | string
  content?: Prisma.StringFilter<"chapter"> | string
  createdAt?: Prisma.DateTimeFilter<"chapter"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"chapter"> | Date | string
  book?: Prisma.XOR<Prisma.BookScalarRelationFilter, Prisma.bookWhereInput>
}, "id" | "bookId_chapterNumber">

export type chapterOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  bookId?: Prisma.SortOrder
  chapterNumber?: Prisma.SortOrder
  title?: Prisma.SortOrder
  content?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  _count?: Prisma.chapterCountOrderByAggregateInput
  _avg?: Prisma.chapterAvgOrderByAggregateInput
  _max?: Prisma.chapterMaxOrderByAggregateInput
  _min?: Prisma.chapterMinOrderByAggregateInput
  _sum?: Prisma.chapterSumOrderByAggregateInput
}

export type chapterScalarWhereWithAggregatesInput = {
  AND?: Prisma.chapterScalarWhereWithAggregatesInput | Prisma.chapterScalarWhereWithAggregatesInput[]
  OR?: Prisma.chapterScalarWhereWithAggregatesInput[]
  NOT?: Prisma.chapterScalarWhereWithAggregatesInput | Prisma.chapterScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"chapter"> | string
  bookId?: Prisma.StringWithAggregatesFilter<"chapter"> | string
  chapterNumber?: Prisma.IntWithAggregatesFilter<"chapter"> | number
  title?: Prisma.StringWithAggregatesFilter<"chapter"> | string
  content?: Prisma.StringWithAggregatesFilter<"chapter"> | string
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"chapter"> | Date | string
  updatedAt?: Prisma.DateTimeWithAggregatesFilter<"chapter"> | Date | string
}

export type chapterCreateInput = {
  id?: string
  chapterNumber: number
  title: string
  content: string
  createdAt?: Date | string
  updatedAt?: Date | string
  book: Prisma.bookCreateNestedOneWithoutChaptersInput
}

export type chapterUncheckedCreateInput = {
  id?: string
  bookId: string
  chapterNumber: number
  title: string
  content: string
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type chapterUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  chapterNumber?: Prisma.IntFieldUpdateOperationsInput | number
  title?: Prisma.StringFieldUpdateOperationsInput | string
  content?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  book?: Prisma.bookUpdateOneRequiredWithoutChaptersNestedInput
}

export type chapterUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  bookId?: Prisma.StringFieldUpdateOperationsInput | string
  chapterNumber?: Prisma.IntFieldUpdateOperationsInput | number
  title?: Prisma.StringFieldUpdateOperationsInput | string
  content?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type chapterCreateManyInput = {
  id?: string
  bookId: string
  chapterNumber: number
  title: string
  content: string
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type chapterUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  chapterNumber?: Prisma.IntFieldUpdateOperationsInput | number
  title?: Prisma.StringFieldUpdateOperationsInput | string
  content?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type chapterUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  bookId?: Prisma.StringFieldUpdateOperationsInput | string
  chapterNumber?: Prisma.IntFieldUpdateOperationsInput | number
  title?: Prisma.StringFieldUpdateOperationsInput | string
  content?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type ChapterListRelationFilter = {
  every?: Prisma.chapterWhereInput
  some?: Prisma.chapterWhereInput
  none?: Prisma.chapterWhereInput
}

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

export type chapterBookIdChapterNumberCompoundUniqueInput = {
  bookId: string
  chapterNumber: number
}

export type chapterCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  bookId?: Prisma.SortOrder
  chapterNumber?: Prisma.SortOrder
  title?: Prisma.SortOrder
  content?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type chapterAvgOrderByAggregateInput = {
  chapterNumber?: Prisma.SortOrder
}

export type chapterMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  bookId?: Prisma.SortOrder
  chapterNumber?: Prisma.SortOrder
  title?: Prisma.SortOrder
  content?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type chapterMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  bookId?: Prisma.SortOrder
  chapterNumber?: Prisma.SortOrder
  title?: Prisma.SortOrder
  content?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type chapterSumOrderByAggregateInput = {
  chapterNumber?: Prisma.SortOrder
}

export type chapterCreateNestedManyWithoutBookInput = {
  create?: Prisma.XOR<Prisma.chapterCreateWithoutBookInput, Prisma.chapterUncheckedCreateWithoutBookInput> | Prisma.chapterCreateWithoutBookInput[] | Prisma.chapterUncheckedCreateWithoutBookInput[]
  connectOrCreate?: Prisma.chapterCreateOrConnectWithoutBookInput | Prisma.chapterCreateOrConnectWithoutBookInput[]
  createMany?: Prisma.chapterCreateManyBookInputEnvelope
  connect?: Prisma.chapterWhereUniqueInput | Prisma.chapterWhereUniqueInput[]
}

export type chapterUncheckedCreateNestedManyWithoutBookInput = {
  create?: Prisma.XOR<Prisma.chapterCreateWithoutBookInput, Prisma.chapterUncheckedCreateWithoutBookInput> | Prisma.chapterCreateWithoutBookInput[] | Prisma.chapterUncheckedCreateWithoutBookInput[]
  connectOrCreate?: Prisma.chapterCreateOrConnectWithoutBookInput | Prisma.chapterCreateOrConnectWithoutBookInput[]
  createMany?: Prisma.chapterCreateManyBookInputEnvelope
  connect?: Prisma.chapterWhereUniqueInput | Prisma.chapterWhereUniqueInput[]
}

export type chapterUpdateManyWithoutBookNestedInput = {
  create?: Prisma.XOR<Prisma.chapterCreateWithoutBookInput, Prisma.chapterUncheckedCreateWithoutBookInput> | Prisma.chapterCreateWithoutBookInput[] | Prisma.chapterUncheckedCreateWithoutBookInput[]
  connectOrCreate?: Prisma.chapterCreateOrConnectWithoutBookInput | Prisma.chapterCreateOrConnectWithoutBookInput[]
  upsert?: Prisma.chapterUpsertWithWhereUniqueWithoutBookInput | Prisma.chapterUpsertWithWhereUniqueWithoutBookInput[]
  createMany?: Prisma.chapterCreateManyBookInputEnvelope
  set?: Prisma.chapterWhereUniqueInput | Prisma.chapterWhereUniqueInput[]
  disconnect?: Prisma.chapterWhereUniqueInput | Prisma.chapterWhereUniqueInput[]
  delete?: Prisma.chapterWhereUniqueInput | Prisma.chapterWhereUniqueInput[]
  connect?: Prisma.chapterWhereUniqueInput | Prisma.chapterWhereUniqueInput[]
  update?: Prisma.chapterUpdateWithWhereUniqueWithoutBookInput | Prisma.chapterUpdateWithWhereUniqueWithoutBookInput[]
  updateMany?: Prisma.chapterUpdateManyWithWhereWithoutBookInput | Prisma.chapterUpdateManyWithWhereWithoutBookInput[]
  deleteMany?: Prisma.chapterScalarWhereInput | Prisma.chapterScalarWhereInput[]
}

export type chapterUncheckedUpdateManyWithoutBookNestedInput = {
  create?: Prisma.XOR<Prisma.chapterCreateWithoutBookInput, Prisma.chapterUncheckedCreateWithoutBookInput> | Prisma.chapterCreateWithoutBookInput[] | Prisma.chapterUncheckedCreateWithoutBookInput[]
  connectOrCreate?: Prisma.chapterCreateOrConnectWithoutBookInput | Prisma.chapterCreateOrConnectWithoutBookInput[]
  upsert?: Prisma.chapterUpsertWithWhereUniqueWithoutBookInput | Prisma.chapterUpsertWithWhereUniqueWithoutBookInput[]
  createMany?: Prisma.chapterCreateManyBookInputEnvelope
  set?: Prisma.chapterWhereUniqueInput | Prisma.chapterWhereUniqueInput[]
  disconnect?: Prisma.chapterWhereUniqueInput | Prisma.chapterWhereUniqueInput[]
  delete?: Prisma.chapterWhereUniqueInput | Prisma.chapterWhereUniqueInput[]
  connect?: Prisma.chapterWhereUniqueInput | Prisma.chapterWhereUniqueInput[]
  update?: Prisma.chapterUpdateWithWhereUniqueWithoutBookInput | Prisma.chapterUpdateWithWhereUniqueWithoutBookInput[]
  updateMany?: Prisma.chapterUpdateManyWithWhereWithoutBookInput | Prisma.chapterUpdateManyWithWhereWithoutBookInput[]
  deleteMany?: Prisma.chapterScalarWhereInput | Prisma.chapterScalarWhereInput[]
}

export type chapterCreateWithoutBookInput = {
  id?: string
  chapterNumber: number
  title: string
  content: string
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type chapterUncheckedCreateWithoutBookInput = {
  id?: string
  chapterNumber: number
  title: string
  content: string
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type chapterCreateOrConnectWithoutBookInput = {
  where: Prisma.chapterWhereUniqueInput
  create: Prisma.XOR<Prisma.chapterCreateWithoutBookInput, Prisma.chapterUncheckedCreateWithoutBookInput>
}

export type chapterCreateManyBookInputEnvelope = {
  data: Prisma.chapterCreateManyBookInput | Prisma.chapterCreateManyBookInput[]
  skipDuplicates?: boolean
}

export type chapterUpsertWithWhereUniqueWithoutBookInput = {
  where: Prisma.chapterWhereUniqueInput
  update: Prisma.XOR<Prisma.chapterUpdateWithoutBookInput, Prisma.chapterUncheckedUpdateWithoutBookInput>
  create: Prisma.XOR<Prisma.chapterCreateWithoutBookInput, Prisma.chapterUncheckedCreateWithoutBookInput>
}

export type chapterUpdateWithWhereUniqueWithoutBookInput = {
  where: Prisma.chapterWhereUniqueInput
  data: Prisma.XOR<Prisma.chapterUpdateWithoutBookInput, Prisma.chapterUncheckedUpdateWithoutBookInput>
}

export type chapterUpdateManyWithWhereWithoutBookInput = {
  where: Prisma.chapterScalarWhereInput
  data: Prisma.XOR<Prisma.chapterUpdateManyMutationInput, Prisma.chapterUncheckedUpdateManyWithoutBookInput>
}

export type chapterScalarWhereInput = {
  AND?: Prisma.chapterScalarWhereInput | Prisma.chapterScalarWhereInput[]
  OR?: Prisma.chapterScalarWhereInput[]
  NOT?: Prisma.chapterScalarWhereInput | Prisma.chapterScalarWhereInput[]
  id?: Prisma.StringFilter<"chapter"> | string
  bookId?: Prisma.StringFilter<"chapter"> | string
  chapterNumber?: Prisma.IntFilter<"chapter"> | number
  title?: Prisma.StringFilter<"chapter"> | string
  content?: Prisma.StringFilter<"chapter"> | string
  createdAt?: Prisma.DateTimeFilter<"chapter"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"chapter"> | Date | string
}

export type chapterCreateManyBookInput = {
  id?: string
  chapterNumber: number
  title: string
  content: string
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type chapterUpdateWithoutBookInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  chapterNumber?: Prisma.IntFieldUpdateOperationsInput | number
  title?: Prisma.StringFieldUpdateOperationsInput | string
  content?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type chapterUncheckedUpdateWithoutBookInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  chapterNumber?: Prisma.IntFieldUpdateOperationsInput | number
  title?: Prisma.StringFieldUpdateOperationsInput | string
  content?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type chapterUncheckedUpdateManyWithoutBookInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  chapterNumber?: Prisma.IntFieldUpdateOperationsInput | number
  title?: Prisma.StringFieldUpdateOperationsInput | string
  content?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}



export type chapterSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  bookId?: boolean
  chapterNumber?: boolean
  title?: boolean
  content?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  book?: boolean | Prisma.bookDefaultArgs<ExtArgs>
}, ExtArgs["result"]["chapter"]>

export type chapterSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  bookId?: boolean
  chapterNumber?: boolean
  title?: boolean
  content?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  book?: boolean | Prisma.bookDefaultArgs<ExtArgs>
}, ExtArgs["result"]["chapter"]>

export type chapterSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  bookId?: boolean
  chapterNumber?: boolean
  title?: boolean
  content?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  book?: boolean | Prisma.bookDefaultArgs<ExtArgs>
}, ExtArgs["result"]["chapter"]>

export type chapterSelectScalar = {
  id?: boolean
  bookId?: boolean
  chapterNumber?: boolean
  title?: boolean
  content?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}

export type chapterOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "bookId" | "chapterNumber" | "title" | "content" | "createdAt" | "updatedAt", ExtArgs["result"]["chapter"]>
export type chapterInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  book?: boolean | Prisma.bookDefaultArgs<ExtArgs>
}
export type chapterIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  book?: boolean | Prisma.bookDefaultArgs<ExtArgs>
}
export type chapterIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  book?: boolean | Prisma.bookDefaultArgs<ExtArgs>
}

export type $chapterPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "chapter"
  objects: {
    book: Prisma.$bookPayload<ExtArgs>
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    bookId: string
    chapterNumber: number
    title: string
    content: string
    createdAt: Date
    updatedAt: Date
  }, ExtArgs["result"]["chapter"]>
  composites: {}
}

export type chapterGetPayload<S extends boolean | null | undefined | chapterDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$chapterPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for chapter.
 * 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__chapterClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  book<T extends Prisma.bookDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.bookDefaultArgs<ExtArgs>>): Prisma.Prisma__bookClient<runtime.Types.Result.GetResult<Prisma.$bookPayload<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 chapter model
 */
export interface chapterFieldRefs {
  readonly id: Prisma.FieldRef<"chapter", 'String'>
  readonly bookId: Prisma.FieldRef<"chapter", 'String'>
  readonly chapterNumber: Prisma.FieldRef<"chapter", 'Int'>
  readonly title: Prisma.FieldRef<"chapter", 'String'>
  readonly content: Prisma.FieldRef<"chapter", 'String'>
  readonly createdAt: Prisma.FieldRef<"chapter", 'DateTime'>
  readonly updatedAt: Prisma.FieldRef<"chapter", 'DateTime'>
}
    

// Custom InputTypes
/**
 * chapter findUnique
 */
export type chapterFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the chapter
   */
  select?: Prisma.chapterSelect<ExtArgs> | null
  /**
   * Omit specific fields from the chapter
   */
  omit?: Prisma.chapterOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.chapterInclude<ExtArgs> | null
  /**
   * Filter, which chapter to fetch.
   */
  where: Prisma.chapterWhereUniqueInput
}

/**
 * chapter findUniqueOrThrow
 */
export type chapterFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the chapter
   */
  select?: Prisma.chapterSelect<ExtArgs> | null
  /**
   * Omit specific fields from the chapter
   */
  omit?: Prisma.chapterOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.chapterInclude<ExtArgs> | null
  /**
   * Filter, which chapter to fetch.
   */
  where: Prisma.chapterWhereUniqueInput
}

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

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

/**
 * chapter findMany
 */
export type chapterFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the chapter
   */
  select?: Prisma.chapterSelect<ExtArgs> | null
  /**
   * Omit specific fields from the chapter
   */
  omit?: Prisma.chapterOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.chapterInclude<ExtArgs> | null
  /**
   * Filter, which chapters to fetch.
   */
  where?: Prisma.chapterWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of chapters to fetch.
   */
  orderBy?: Prisma.chapterOrderByWithRelationInput | Prisma.chapterOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing chapters.
   */
  cursor?: Prisma.chapterWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` chapters 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` chapters.
   */
  skip?: number
  distinct?: Prisma.ChapterScalarFieldEnum | Prisma.ChapterScalarFieldEnum[]
}

/**
 * chapter create
 */
export type chapterCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the chapter
   */
  select?: Prisma.chapterSelect<ExtArgs> | null
  /**
   * Omit specific fields from the chapter
   */
  omit?: Prisma.chapterOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.chapterInclude<ExtArgs> | null
  /**
   * The data needed to create a chapter.
   */
  data: Prisma.XOR<Prisma.chapterCreateInput, Prisma.chapterUncheckedCreateInput>
}

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

/**
 * chapter createManyAndReturn
 */
export type chapterCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the chapter
   */
  select?: Prisma.chapterSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the chapter
   */
  omit?: Prisma.chapterOmit<ExtArgs> | null
  /**
   * The data used to create many chapters.
   */
  data: Prisma.chapterCreateManyInput | Prisma.chapterCreateManyInput[]
  skipDuplicates?: boolean
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.chapterIncludeCreateManyAndReturn<ExtArgs> | null
}

/**
 * chapter update
 */
export type chapterUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the chapter
   */
  select?: Prisma.chapterSelect<ExtArgs> | null
  /**
   * Omit specific fields from the chapter
   */
  omit?: Prisma.chapterOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.chapterInclude<ExtArgs> | null
  /**
   * The data needed to update a chapter.
   */
  data: Prisma.XOR<Prisma.chapterUpdateInput, Prisma.chapterUncheckedUpdateInput>
  /**
   * Choose, which chapter to update.
   */
  where: Prisma.chapterWhereUniqueInput
}

/**
 * chapter updateMany
 */
export type chapterUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update chapters.
   */
  data: Prisma.XOR<Prisma.chapterUpdateManyMutationInput, Prisma.chapterUncheckedUpdateManyInput>
  /**
   * Filter which chapters to update
   */
  where?: Prisma.chapterWhereInput
  /**
   * Limit how many chapters to update.
   */
  limit?: number
}

/**
 * chapter updateManyAndReturn
 */
export type chapterUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the chapter
   */
  select?: Prisma.chapterSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the chapter
   */
  omit?: Prisma.chapterOmit<ExtArgs> | null
  /**
   * The data used to update chapters.
   */
  data: Prisma.XOR<Prisma.chapterUpdateManyMutationInput, Prisma.chapterUncheckedUpdateManyInput>
  /**
   * Filter which chapters to update
   */
  where?: Prisma.chapterWhereInput
  /**
   * Limit how many chapters to update.
   */
  limit?: number
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.chapterIncludeUpdateManyAndReturn<ExtArgs> | null
}

/**
 * chapter upsert
 */
export type chapterUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the chapter
   */
  select?: Prisma.chapterSelect<ExtArgs> | null
  /**
   * Omit specific fields from the chapter
   */
  omit?: Prisma.chapterOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.chapterInclude<ExtArgs> | null
  /**
   * The filter to search for the chapter to update in case it exists.
   */
  where: Prisma.chapterWhereUniqueInput
  /**
   * In case the chapter found by the `where` argument doesn't exist, create a new chapter with this data.
   */
  create: Prisma.XOR<Prisma.chapterCreateInput, Prisma.chapterUncheckedCreateInput>
  /**
   * In case the chapter was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.chapterUpdateInput, Prisma.chapterUncheckedUpdateInput>
}

/**
 * chapter delete
 */
export type chapterDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the chapter
   */
  select?: Prisma.chapterSelect<ExtArgs> | null
  /**
   * Omit specific fields from the chapter
   */
  omit?: Prisma.chapterOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.chapterInclude<ExtArgs> | null
  /**
   * Filter which chapter to delete.
   */
  where: Prisma.chapterWhereUniqueInput
}

/**
 * chapter deleteMany
 */
export type chapterDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which chapters to delete
   */
  where?: Prisma.chapterWhereInput
  /**
   * Limit how many chapters to delete.
   */
  limit?: number
}

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