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

export type AggregateTag = {
  _count: TagCountAggregateOutputType | null
  _min: TagMinAggregateOutputType | null
  _max: TagMaxAggregateOutputType | null
}

export type TagMinAggregateOutputType = {
  id: string | null
  name: string | null
  creatorId: string | null
  createdAt: Date | null
}

export type TagMaxAggregateOutputType = {
  id: string | null
  name: string | null
  creatorId: string | null
  createdAt: Date | null
}

export type TagCountAggregateOutputType = {
  id: number
  name: number
  creatorId: number
  createdAt: number
  _all: number
}


export type TagMinAggregateInputType = {
  id?: true
  name?: true
  creatorId?: true
  createdAt?: true
}

export type TagMaxAggregateInputType = {
  id?: true
  name?: true
  creatorId?: true
  createdAt?: true
}

export type TagCountAggregateInputType = {
  id?: true
  name?: true
  creatorId?: true
  createdAt?: true
  _all?: true
}

export type TagAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which tag to aggregate.
   */
  where?: Prisma.tagWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of tags to fetch.
   */
  orderBy?: Prisma.tagOrderByWithRelationInput | Prisma.tagOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.tagWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` tags 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` tags.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned tags
  **/
  _count?: true | TagCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: TagMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: TagMaxAggregateInputType
}

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




export type tagGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.tagWhereInput
  orderBy?: Prisma.tagOrderByWithAggregationInput | Prisma.tagOrderByWithAggregationInput[]
  by: Prisma.TagScalarFieldEnum[] | Prisma.TagScalarFieldEnum
  having?: Prisma.tagScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: TagCountAggregateInputType | true
  _min?: TagMinAggregateInputType
  _max?: TagMaxAggregateInputType
}

export type TagGroupByOutputType = {
  id: string
  name: string
  creatorId: string | null
  createdAt: Date
  _count: TagCountAggregateOutputType | null
  _min: TagMinAggregateOutputType | null
  _max: TagMaxAggregateOutputType | null
}

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



export type tagWhereInput = {
  AND?: Prisma.tagWhereInput | Prisma.tagWhereInput[]
  OR?: Prisma.tagWhereInput[]
  NOT?: Prisma.tagWhereInput | Prisma.tagWhereInput[]
  id?: Prisma.StringFilter<"tag"> | string
  name?: Prisma.StringFilter<"tag"> | string
  creatorId?: Prisma.StringNullableFilter<"tag"> | string | null
  createdAt?: Prisma.DateTimeFilter<"tag"> | Date | string
  creator?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.userWhereInput> | null
  books?: Prisma.BookTagListRelationFilter
}

export type tagOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  creatorId?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  creator?: Prisma.userOrderByWithRelationInput
  books?: Prisma.bookTagOrderByRelationAggregateInput
}

export type tagWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  name?: string
  AND?: Prisma.tagWhereInput | Prisma.tagWhereInput[]
  OR?: Prisma.tagWhereInput[]
  NOT?: Prisma.tagWhereInput | Prisma.tagWhereInput[]
  creatorId?: Prisma.StringNullableFilter<"tag"> | string | null
  createdAt?: Prisma.DateTimeFilter<"tag"> | Date | string
  creator?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.userWhereInput> | null
  books?: Prisma.BookTagListRelationFilter
}, "id" | "name">

export type tagOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  creatorId?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  _count?: Prisma.tagCountOrderByAggregateInput
  _max?: Prisma.tagMaxOrderByAggregateInput
  _min?: Prisma.tagMinOrderByAggregateInput
}

export type tagScalarWhereWithAggregatesInput = {
  AND?: Prisma.tagScalarWhereWithAggregatesInput | Prisma.tagScalarWhereWithAggregatesInput[]
  OR?: Prisma.tagScalarWhereWithAggregatesInput[]
  NOT?: Prisma.tagScalarWhereWithAggregatesInput | Prisma.tagScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"tag"> | string
  name?: Prisma.StringWithAggregatesFilter<"tag"> | string
  creatorId?: Prisma.StringNullableWithAggregatesFilter<"tag"> | string | null
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"tag"> | Date | string
}

export type tagCreateInput = {
  id?: string
  name: string
  createdAt?: Date | string
  creator?: Prisma.userCreateNestedOneWithoutCreatedTagsInput
  books?: Prisma.bookTagCreateNestedManyWithoutTagInput
}

export type tagUncheckedCreateInput = {
  id?: string
  name: string
  creatorId?: string | null
  createdAt?: Date | string
  books?: Prisma.bookTagUncheckedCreateNestedManyWithoutTagInput
}

export type tagUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  creator?: Prisma.userUpdateOneWithoutCreatedTagsNestedInput
  books?: Prisma.bookTagUpdateManyWithoutTagNestedInput
}

export type tagUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  books?: Prisma.bookTagUncheckedUpdateManyWithoutTagNestedInput
}

export type tagCreateManyInput = {
  id?: string
  name: string
  creatorId?: string | null
  createdAt?: Date | string
}

export type tagUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type tagUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type TagListRelationFilter = {
  every?: Prisma.tagWhereInput
  some?: Prisma.tagWhereInput
  none?: Prisma.tagWhereInput
}

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

export type tagCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  creatorId?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
}

export type tagMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  creatorId?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
}

export type tagMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  creatorId?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
}

export type TagScalarRelationFilter = {
  is?: Prisma.tagWhereInput
  isNot?: Prisma.tagWhereInput
}

export type tagCreateNestedManyWithoutCreatorInput = {
  create?: Prisma.XOR<Prisma.tagCreateWithoutCreatorInput, Prisma.tagUncheckedCreateWithoutCreatorInput> | Prisma.tagCreateWithoutCreatorInput[] | Prisma.tagUncheckedCreateWithoutCreatorInput[]
  connectOrCreate?: Prisma.tagCreateOrConnectWithoutCreatorInput | Prisma.tagCreateOrConnectWithoutCreatorInput[]
  createMany?: Prisma.tagCreateManyCreatorInputEnvelope
  connect?: Prisma.tagWhereUniqueInput | Prisma.tagWhereUniqueInput[]
}

export type tagUncheckedCreateNestedManyWithoutCreatorInput = {
  create?: Prisma.XOR<Prisma.tagCreateWithoutCreatorInput, Prisma.tagUncheckedCreateWithoutCreatorInput> | Prisma.tagCreateWithoutCreatorInput[] | Prisma.tagUncheckedCreateWithoutCreatorInput[]
  connectOrCreate?: Prisma.tagCreateOrConnectWithoutCreatorInput | Prisma.tagCreateOrConnectWithoutCreatorInput[]
  createMany?: Prisma.tagCreateManyCreatorInputEnvelope
  connect?: Prisma.tagWhereUniqueInput | Prisma.tagWhereUniqueInput[]
}

export type tagUpdateManyWithoutCreatorNestedInput = {
  create?: Prisma.XOR<Prisma.tagCreateWithoutCreatorInput, Prisma.tagUncheckedCreateWithoutCreatorInput> | Prisma.tagCreateWithoutCreatorInput[] | Prisma.tagUncheckedCreateWithoutCreatorInput[]
  connectOrCreate?: Prisma.tagCreateOrConnectWithoutCreatorInput | Prisma.tagCreateOrConnectWithoutCreatorInput[]
  upsert?: Prisma.tagUpsertWithWhereUniqueWithoutCreatorInput | Prisma.tagUpsertWithWhereUniqueWithoutCreatorInput[]
  createMany?: Prisma.tagCreateManyCreatorInputEnvelope
  set?: Prisma.tagWhereUniqueInput | Prisma.tagWhereUniqueInput[]
  disconnect?: Prisma.tagWhereUniqueInput | Prisma.tagWhereUniqueInput[]
  delete?: Prisma.tagWhereUniqueInput | Prisma.tagWhereUniqueInput[]
  connect?: Prisma.tagWhereUniqueInput | Prisma.tagWhereUniqueInput[]
  update?: Prisma.tagUpdateWithWhereUniqueWithoutCreatorInput | Prisma.tagUpdateWithWhereUniqueWithoutCreatorInput[]
  updateMany?: Prisma.tagUpdateManyWithWhereWithoutCreatorInput | Prisma.tagUpdateManyWithWhereWithoutCreatorInput[]
  deleteMany?: Prisma.tagScalarWhereInput | Prisma.tagScalarWhereInput[]
}

export type tagUncheckedUpdateManyWithoutCreatorNestedInput = {
  create?: Prisma.XOR<Prisma.tagCreateWithoutCreatorInput, Prisma.tagUncheckedCreateWithoutCreatorInput> | Prisma.tagCreateWithoutCreatorInput[] | Prisma.tagUncheckedCreateWithoutCreatorInput[]
  connectOrCreate?: Prisma.tagCreateOrConnectWithoutCreatorInput | Prisma.tagCreateOrConnectWithoutCreatorInput[]
  upsert?: Prisma.tagUpsertWithWhereUniqueWithoutCreatorInput | Prisma.tagUpsertWithWhereUniqueWithoutCreatorInput[]
  createMany?: Prisma.tagCreateManyCreatorInputEnvelope
  set?: Prisma.tagWhereUniqueInput | Prisma.tagWhereUniqueInput[]
  disconnect?: Prisma.tagWhereUniqueInput | Prisma.tagWhereUniqueInput[]
  delete?: Prisma.tagWhereUniqueInput | Prisma.tagWhereUniqueInput[]
  connect?: Prisma.tagWhereUniqueInput | Prisma.tagWhereUniqueInput[]
  update?: Prisma.tagUpdateWithWhereUniqueWithoutCreatorInput | Prisma.tagUpdateWithWhereUniqueWithoutCreatorInput[]
  updateMany?: Prisma.tagUpdateManyWithWhereWithoutCreatorInput | Prisma.tagUpdateManyWithWhereWithoutCreatorInput[]
  deleteMany?: Prisma.tagScalarWhereInput | Prisma.tagScalarWhereInput[]
}

export type tagCreateNestedOneWithoutBooksInput = {
  create?: Prisma.XOR<Prisma.tagCreateWithoutBooksInput, Prisma.tagUncheckedCreateWithoutBooksInput>
  connectOrCreate?: Prisma.tagCreateOrConnectWithoutBooksInput
  connect?: Prisma.tagWhereUniqueInput
}

export type tagUpdateOneRequiredWithoutBooksNestedInput = {
  create?: Prisma.XOR<Prisma.tagCreateWithoutBooksInput, Prisma.tagUncheckedCreateWithoutBooksInput>
  connectOrCreate?: Prisma.tagCreateOrConnectWithoutBooksInput
  upsert?: Prisma.tagUpsertWithoutBooksInput
  connect?: Prisma.tagWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.tagUpdateToOneWithWhereWithoutBooksInput, Prisma.tagUpdateWithoutBooksInput>, Prisma.tagUncheckedUpdateWithoutBooksInput>
}

export type tagCreateWithoutCreatorInput = {
  id?: string
  name: string
  createdAt?: Date | string
  books?: Prisma.bookTagCreateNestedManyWithoutTagInput
}

export type tagUncheckedCreateWithoutCreatorInput = {
  id?: string
  name: string
  createdAt?: Date | string
  books?: Prisma.bookTagUncheckedCreateNestedManyWithoutTagInput
}

export type tagCreateOrConnectWithoutCreatorInput = {
  where: Prisma.tagWhereUniqueInput
  create: Prisma.XOR<Prisma.tagCreateWithoutCreatorInput, Prisma.tagUncheckedCreateWithoutCreatorInput>
}

export type tagCreateManyCreatorInputEnvelope = {
  data: Prisma.tagCreateManyCreatorInput | Prisma.tagCreateManyCreatorInput[]
  skipDuplicates?: boolean
}

export type tagUpsertWithWhereUniqueWithoutCreatorInput = {
  where: Prisma.tagWhereUniqueInput
  update: Prisma.XOR<Prisma.tagUpdateWithoutCreatorInput, Prisma.tagUncheckedUpdateWithoutCreatorInput>
  create: Prisma.XOR<Prisma.tagCreateWithoutCreatorInput, Prisma.tagUncheckedCreateWithoutCreatorInput>
}

export type tagUpdateWithWhereUniqueWithoutCreatorInput = {
  where: Prisma.tagWhereUniqueInput
  data: Prisma.XOR<Prisma.tagUpdateWithoutCreatorInput, Prisma.tagUncheckedUpdateWithoutCreatorInput>
}

export type tagUpdateManyWithWhereWithoutCreatorInput = {
  where: Prisma.tagScalarWhereInput
  data: Prisma.XOR<Prisma.tagUpdateManyMutationInput, Prisma.tagUncheckedUpdateManyWithoutCreatorInput>
}

export type tagScalarWhereInput = {
  AND?: Prisma.tagScalarWhereInput | Prisma.tagScalarWhereInput[]
  OR?: Prisma.tagScalarWhereInput[]
  NOT?: Prisma.tagScalarWhereInput | Prisma.tagScalarWhereInput[]
  id?: Prisma.StringFilter<"tag"> | string
  name?: Prisma.StringFilter<"tag"> | string
  creatorId?: Prisma.StringNullableFilter<"tag"> | string | null
  createdAt?: Prisma.DateTimeFilter<"tag"> | Date | string
}

export type tagCreateWithoutBooksInput = {
  id?: string
  name: string
  createdAt?: Date | string
  creator?: Prisma.userCreateNestedOneWithoutCreatedTagsInput
}

export type tagUncheckedCreateWithoutBooksInput = {
  id?: string
  name: string
  creatorId?: string | null
  createdAt?: Date | string
}

export type tagCreateOrConnectWithoutBooksInput = {
  where: Prisma.tagWhereUniqueInput
  create: Prisma.XOR<Prisma.tagCreateWithoutBooksInput, Prisma.tagUncheckedCreateWithoutBooksInput>
}

export type tagUpsertWithoutBooksInput = {
  update: Prisma.XOR<Prisma.tagUpdateWithoutBooksInput, Prisma.tagUncheckedUpdateWithoutBooksInput>
  create: Prisma.XOR<Prisma.tagCreateWithoutBooksInput, Prisma.tagUncheckedCreateWithoutBooksInput>
  where?: Prisma.tagWhereInput
}

export type tagUpdateToOneWithWhereWithoutBooksInput = {
  where?: Prisma.tagWhereInput
  data: Prisma.XOR<Prisma.tagUpdateWithoutBooksInput, Prisma.tagUncheckedUpdateWithoutBooksInput>
}

export type tagUpdateWithoutBooksInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  creator?: Prisma.userUpdateOneWithoutCreatedTagsNestedInput
}

export type tagUncheckedUpdateWithoutBooksInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type tagCreateManyCreatorInput = {
  id?: string
  name: string
  createdAt?: Date | string
}

export type tagUpdateWithoutCreatorInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  books?: Prisma.bookTagUpdateManyWithoutTagNestedInput
}

export type tagUncheckedUpdateWithoutCreatorInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  books?: Prisma.bookTagUncheckedUpdateManyWithoutTagNestedInput
}

export type tagUncheckedUpdateManyWithoutCreatorInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}


/**
 * Count Type TagCountOutputType
 */

export type TagCountOutputType = {
  books: number
}

export type TagCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  books?: boolean | TagCountOutputTypeCountBooksArgs
}

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

/**
 * TagCountOutputType without action
 */
export type TagCountOutputTypeCountBooksArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.bookTagWhereInput
}


export type tagSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  creatorId?: boolean
  createdAt?: boolean
  creator?: boolean | Prisma.tag$creatorArgs<ExtArgs>
  books?: boolean | Prisma.tag$booksArgs<ExtArgs>
  _count?: boolean | Prisma.TagCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["tag"]>

export type tagSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  creatorId?: boolean
  createdAt?: boolean
  creator?: boolean | Prisma.tag$creatorArgs<ExtArgs>
}, ExtArgs["result"]["tag"]>

export type tagSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  creatorId?: boolean
  createdAt?: boolean
  creator?: boolean | Prisma.tag$creatorArgs<ExtArgs>
}, ExtArgs["result"]["tag"]>

export type tagSelectScalar = {
  id?: boolean
  name?: boolean
  creatorId?: boolean
  createdAt?: boolean
}

export type tagOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "creatorId" | "createdAt", ExtArgs["result"]["tag"]>
export type tagInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  creator?: boolean | Prisma.tag$creatorArgs<ExtArgs>
  books?: boolean | Prisma.tag$booksArgs<ExtArgs>
  _count?: boolean | Prisma.TagCountOutputTypeDefaultArgs<ExtArgs>
}
export type tagIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  creator?: boolean | Prisma.tag$creatorArgs<ExtArgs>
}
export type tagIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  creator?: boolean | Prisma.tag$creatorArgs<ExtArgs>
}

export type $tagPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "tag"
  objects: {
    creator: Prisma.$userPayload<ExtArgs> | null
    books: Prisma.$bookTagPayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    name: string
    creatorId: string | null
    createdAt: Date
  }, ExtArgs["result"]["tag"]>
  composites: {}
}

export type tagGetPayload<S extends boolean | null | undefined | tagDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$tagPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for tag.
 * 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__tagClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  creator<T extends Prisma.tag$creatorArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.tag$creatorArgs<ExtArgs>>): Prisma.Prisma__userClient<runtime.Types.Result.GetResult<Prisma.$userPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
  books<T extends Prisma.tag$booksArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.tag$booksArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$bookTagPayload<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 tag model
 */
export interface tagFieldRefs {
  readonly id: Prisma.FieldRef<"tag", 'String'>
  readonly name: Prisma.FieldRef<"tag", 'String'>
  readonly creatorId: Prisma.FieldRef<"tag", 'String'>
  readonly createdAt: Prisma.FieldRef<"tag", 'DateTime'>
}
    

// Custom InputTypes
/**
 * tag findUnique
 */
export type tagFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the tag
   */
  select?: Prisma.tagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the tag
   */
  omit?: Prisma.tagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.tagInclude<ExtArgs> | null
  /**
   * Filter, which tag to fetch.
   */
  where: Prisma.tagWhereUniqueInput
}

/**
 * tag findUniqueOrThrow
 */
export type tagFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the tag
   */
  select?: Prisma.tagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the tag
   */
  omit?: Prisma.tagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.tagInclude<ExtArgs> | null
  /**
   * Filter, which tag to fetch.
   */
  where: Prisma.tagWhereUniqueInput
}

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

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

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

/**
 * tag create
 */
export type tagCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the tag
   */
  select?: Prisma.tagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the tag
   */
  omit?: Prisma.tagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.tagInclude<ExtArgs> | null
  /**
   * The data needed to create a tag.
   */
  data: Prisma.XOR<Prisma.tagCreateInput, Prisma.tagUncheckedCreateInput>
}

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

/**
 * tag createManyAndReturn
 */
export type tagCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the tag
   */
  select?: Prisma.tagSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the tag
   */
  omit?: Prisma.tagOmit<ExtArgs> | null
  /**
   * The data used to create many tags.
   */
  data: Prisma.tagCreateManyInput | Prisma.tagCreateManyInput[]
  skipDuplicates?: boolean
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.tagIncludeCreateManyAndReturn<ExtArgs> | null
}

/**
 * tag update
 */
export type tagUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the tag
   */
  select?: Prisma.tagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the tag
   */
  omit?: Prisma.tagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.tagInclude<ExtArgs> | null
  /**
   * The data needed to update a tag.
   */
  data: Prisma.XOR<Prisma.tagUpdateInput, Prisma.tagUncheckedUpdateInput>
  /**
   * Choose, which tag to update.
   */
  where: Prisma.tagWhereUniqueInput
}

/**
 * tag updateMany
 */
export type tagUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update tags.
   */
  data: Prisma.XOR<Prisma.tagUpdateManyMutationInput, Prisma.tagUncheckedUpdateManyInput>
  /**
   * Filter which tags to update
   */
  where?: Prisma.tagWhereInput
  /**
   * Limit how many tags to update.
   */
  limit?: number
}

/**
 * tag updateManyAndReturn
 */
export type tagUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the tag
   */
  select?: Prisma.tagSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the tag
   */
  omit?: Prisma.tagOmit<ExtArgs> | null
  /**
   * The data used to update tags.
   */
  data: Prisma.XOR<Prisma.tagUpdateManyMutationInput, Prisma.tagUncheckedUpdateManyInput>
  /**
   * Filter which tags to update
   */
  where?: Prisma.tagWhereInput
  /**
   * Limit how many tags to update.
   */
  limit?: number
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.tagIncludeUpdateManyAndReturn<ExtArgs> | null
}

/**
 * tag upsert
 */
export type tagUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the tag
   */
  select?: Prisma.tagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the tag
   */
  omit?: Prisma.tagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.tagInclude<ExtArgs> | null
  /**
   * The filter to search for the tag to update in case it exists.
   */
  where: Prisma.tagWhereUniqueInput
  /**
   * In case the tag found by the `where` argument doesn't exist, create a new tag with this data.
   */
  create: Prisma.XOR<Prisma.tagCreateInput, Prisma.tagUncheckedCreateInput>
  /**
   * In case the tag was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.tagUpdateInput, Prisma.tagUncheckedUpdateInput>
}

/**
 * tag delete
 */
export type tagDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the tag
   */
  select?: Prisma.tagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the tag
   */
  omit?: Prisma.tagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.tagInclude<ExtArgs> | null
  /**
   * Filter which tag to delete.
   */
  where: Prisma.tagWhereUniqueInput
}

/**
 * tag deleteMany
 */
export type tagDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which tags to delete
   */
  where?: Prisma.tagWhereInput
  /**
   * Limit how many tags to delete.
   */
  limit?: number
}

/**
 * tag.creator
 */
export type tag$creatorArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the user
   */
  select?: Prisma.userSelect<ExtArgs> | null
  /**
   * Omit specific fields from the user
   */
  omit?: Prisma.userOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.userInclude<ExtArgs> | null
  where?: Prisma.userWhereInput
}

/**
 * tag.books
 */
export type tag$booksArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the bookTag
   */
  select?: Prisma.bookTagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the bookTag
   */
  omit?: Prisma.bookTagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.bookTagInclude<ExtArgs> | null
  where?: Prisma.bookTagWhereInput
  orderBy?: Prisma.bookTagOrderByWithRelationInput | Prisma.bookTagOrderByWithRelationInput[]
  cursor?: Prisma.bookTagWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.BookTagScalarFieldEnum | Prisma.BookTagScalarFieldEnum[]
}

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