
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `Attachment` model and its related types.
 *
 * 🟢 You can import this file directly.
 */
import type * as runtime from "@prisma/client/runtime/library"
import type * as $Enums from "../enums"
import type * as Prisma from "../internal/prismaNamespace"

/**
 * Model Attachment
 * 
 */
export type AttachmentModel = runtime.Types.Result.DefaultSelection<Prisma.$AttachmentPayload>

export type AggregateAttachment = {
  _count: AttachmentCountAggregateOutputType | null
  _avg: AttachmentAvgAggregateOutputType | null
  _sum: AttachmentSumAggregateOutputType | null
  _min: AttachmentMinAggregateOutputType | null
  _max: AttachmentMaxAggregateOutputType | null
}

export type AttachmentAvgAggregateOutputType = {
  id: number | null
  taskId: number | null
  uploaderId: number | null
}

export type AttachmentSumAggregateOutputType = {
  id: number | null
  taskId: number | null
  uploaderId: number | null
}

export type AttachmentMinAggregateOutputType = {
  id: number | null
  taskId: number | null
  uploaderId: number | null
  filename: string | null
  objectKey: string | null
  createdAt: Date | null
}

export type AttachmentMaxAggregateOutputType = {
  id: number | null
  taskId: number | null
  uploaderId: number | null
  filename: string | null
  objectKey: string | null
  createdAt: Date | null
}

export type AttachmentCountAggregateOutputType = {
  id: number
  taskId: number
  uploaderId: number
  filename: number
  objectKey: number
  createdAt: number
  _all: number
}


export type AttachmentAvgAggregateInputType = {
  id?: true
  taskId?: true
  uploaderId?: true
}

export type AttachmentSumAggregateInputType = {
  id?: true
  taskId?: true
  uploaderId?: true
}

export type AttachmentMinAggregateInputType = {
  id?: true
  taskId?: true
  uploaderId?: true
  filename?: true
  objectKey?: true
  createdAt?: true
}

export type AttachmentMaxAggregateInputType = {
  id?: true
  taskId?: true
  uploaderId?: true
  filename?: true
  objectKey?: true
  createdAt?: true
}

export type AttachmentCountAggregateInputType = {
  id?: true
  taskId?: true
  uploaderId?: true
  filename?: true
  objectKey?: true
  createdAt?: true
  _all?: true
}

export type AttachmentAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Attachment to aggregate.
   */
  where?: Prisma.AttachmentWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Attachments to fetch.
   */
  orderBy?: Prisma.AttachmentOrderByWithRelationInput | Prisma.AttachmentOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.AttachmentWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Attachments 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` Attachments.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned Attachments
  **/
  _count?: true | AttachmentCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: AttachmentAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: AttachmentSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: AttachmentMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: AttachmentMaxAggregateInputType
}

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




export type AttachmentGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.AttachmentWhereInput
  orderBy?: Prisma.AttachmentOrderByWithAggregationInput | Prisma.AttachmentOrderByWithAggregationInput[]
  by: Prisma.AttachmentScalarFieldEnum[] | Prisma.AttachmentScalarFieldEnum
  having?: Prisma.AttachmentScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: AttachmentCountAggregateInputType | true
  _avg?: AttachmentAvgAggregateInputType
  _sum?: AttachmentSumAggregateInputType
  _min?: AttachmentMinAggregateInputType
  _max?: AttachmentMaxAggregateInputType
}

export type AttachmentGroupByOutputType = {
  id: number
  taskId: number
  uploaderId: number
  filename: string
  objectKey: string
  createdAt: Date
  _count: AttachmentCountAggregateOutputType | null
  _avg: AttachmentAvgAggregateOutputType | null
  _sum: AttachmentSumAggregateOutputType | null
  _min: AttachmentMinAggregateOutputType | null
  _max: AttachmentMaxAggregateOutputType | null
}

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



export type AttachmentWhereInput = {
  AND?: Prisma.AttachmentWhereInput | Prisma.AttachmentWhereInput[]
  OR?: Prisma.AttachmentWhereInput[]
  NOT?: Prisma.AttachmentWhereInput | Prisma.AttachmentWhereInput[]
  id?: Prisma.IntFilter<"Attachment"> | number
  taskId?: Prisma.IntFilter<"Attachment"> | number
  uploaderId?: Prisma.IntFilter<"Attachment"> | number
  filename?: Prisma.StringFilter<"Attachment"> | string
  objectKey?: Prisma.StringFilter<"Attachment"> | string
  createdAt?: Prisma.DateTimeFilter<"Attachment"> | Date | string
  task?: Prisma.XOR<Prisma.TaskScalarRelationFilter, Prisma.TaskWhereInput>
  uploader?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
}

export type AttachmentOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  taskId?: Prisma.SortOrder
  uploaderId?: Prisma.SortOrder
  filename?: Prisma.SortOrder
  objectKey?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  task?: Prisma.TaskOrderByWithRelationInput
  uploader?: Prisma.UserOrderByWithRelationInput
}

export type AttachmentWhereUniqueInput = Prisma.AtLeast<{
  id?: number
  AND?: Prisma.AttachmentWhereInput | Prisma.AttachmentWhereInput[]
  OR?: Prisma.AttachmentWhereInput[]
  NOT?: Prisma.AttachmentWhereInput | Prisma.AttachmentWhereInput[]
  taskId?: Prisma.IntFilter<"Attachment"> | number
  uploaderId?: Prisma.IntFilter<"Attachment"> | number
  filename?: Prisma.StringFilter<"Attachment"> | string
  objectKey?: Prisma.StringFilter<"Attachment"> | string
  createdAt?: Prisma.DateTimeFilter<"Attachment"> | Date | string
  task?: Prisma.XOR<Prisma.TaskScalarRelationFilter, Prisma.TaskWhereInput>
  uploader?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
}, "id">

export type AttachmentOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  taskId?: Prisma.SortOrder
  uploaderId?: Prisma.SortOrder
  filename?: Prisma.SortOrder
  objectKey?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  _count?: Prisma.AttachmentCountOrderByAggregateInput
  _avg?: Prisma.AttachmentAvgOrderByAggregateInput
  _max?: Prisma.AttachmentMaxOrderByAggregateInput
  _min?: Prisma.AttachmentMinOrderByAggregateInput
  _sum?: Prisma.AttachmentSumOrderByAggregateInput
}

export type AttachmentScalarWhereWithAggregatesInput = {
  AND?: Prisma.AttachmentScalarWhereWithAggregatesInput | Prisma.AttachmentScalarWhereWithAggregatesInput[]
  OR?: Prisma.AttachmentScalarWhereWithAggregatesInput[]
  NOT?: Prisma.AttachmentScalarWhereWithAggregatesInput | Prisma.AttachmentScalarWhereWithAggregatesInput[]
  id?: Prisma.IntWithAggregatesFilter<"Attachment"> | number
  taskId?: Prisma.IntWithAggregatesFilter<"Attachment"> | number
  uploaderId?: Prisma.IntWithAggregatesFilter<"Attachment"> | number
  filename?: Prisma.StringWithAggregatesFilter<"Attachment"> | string
  objectKey?: Prisma.StringWithAggregatesFilter<"Attachment"> | string
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"Attachment"> | Date | string
}

export type AttachmentCreateInput = {
  filename: string
  objectKey: string
  createdAt?: Date | string
  task: Prisma.TaskCreateNestedOneWithoutAttachmentsInput
  uploader: Prisma.UserCreateNestedOneWithoutAttachmentsInput
}

export type AttachmentUncheckedCreateInput = {
  id?: number
  taskId: number
  uploaderId: number
  filename: string
  objectKey: string
  createdAt?: Date | string
}

export type AttachmentUpdateInput = {
  filename?: Prisma.StringFieldUpdateOperationsInput | string
  objectKey?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  task?: Prisma.TaskUpdateOneRequiredWithoutAttachmentsNestedInput
  uploader?: Prisma.UserUpdateOneRequiredWithoutAttachmentsNestedInput
}

export type AttachmentUncheckedUpdateInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  taskId?: Prisma.IntFieldUpdateOperationsInput | number
  uploaderId?: Prisma.IntFieldUpdateOperationsInput | number
  filename?: Prisma.StringFieldUpdateOperationsInput | string
  objectKey?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type AttachmentCreateManyInput = {
  id?: number
  taskId: number
  uploaderId: number
  filename: string
  objectKey: string
  createdAt?: Date | string
}

export type AttachmentUpdateManyMutationInput = {
  filename?: Prisma.StringFieldUpdateOperationsInput | string
  objectKey?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type AttachmentUncheckedUpdateManyInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  taskId?: Prisma.IntFieldUpdateOperationsInput | number
  uploaderId?: Prisma.IntFieldUpdateOperationsInput | number
  filename?: Prisma.StringFieldUpdateOperationsInput | string
  objectKey?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type AttachmentListRelationFilter = {
  every?: Prisma.AttachmentWhereInput
  some?: Prisma.AttachmentWhereInput
  none?: Prisma.AttachmentWhereInput
}

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

export type AttachmentCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  taskId?: Prisma.SortOrder
  uploaderId?: Prisma.SortOrder
  filename?: Prisma.SortOrder
  objectKey?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
}

export type AttachmentAvgOrderByAggregateInput = {
  id?: Prisma.SortOrder
  taskId?: Prisma.SortOrder
  uploaderId?: Prisma.SortOrder
}

export type AttachmentMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  taskId?: Prisma.SortOrder
  uploaderId?: Prisma.SortOrder
  filename?: Prisma.SortOrder
  objectKey?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
}

export type AttachmentMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  taskId?: Prisma.SortOrder
  uploaderId?: Prisma.SortOrder
  filename?: Prisma.SortOrder
  objectKey?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
}

export type AttachmentSumOrderByAggregateInput = {
  id?: Prisma.SortOrder
  taskId?: Prisma.SortOrder
  uploaderId?: Prisma.SortOrder
}

export type AttachmentCreateNestedManyWithoutUploaderInput = {
  create?: Prisma.XOR<Prisma.AttachmentCreateWithoutUploaderInput, Prisma.AttachmentUncheckedCreateWithoutUploaderInput> | Prisma.AttachmentCreateWithoutUploaderInput[] | Prisma.AttachmentUncheckedCreateWithoutUploaderInput[]
  connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutUploaderInput | Prisma.AttachmentCreateOrConnectWithoutUploaderInput[]
  createMany?: Prisma.AttachmentCreateManyUploaderInputEnvelope
  connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
}

export type AttachmentUncheckedCreateNestedManyWithoutUploaderInput = {
  create?: Prisma.XOR<Prisma.AttachmentCreateWithoutUploaderInput, Prisma.AttachmentUncheckedCreateWithoutUploaderInput> | Prisma.AttachmentCreateWithoutUploaderInput[] | Prisma.AttachmentUncheckedCreateWithoutUploaderInput[]
  connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutUploaderInput | Prisma.AttachmentCreateOrConnectWithoutUploaderInput[]
  createMany?: Prisma.AttachmentCreateManyUploaderInputEnvelope
  connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
}

export type AttachmentUpdateManyWithoutUploaderNestedInput = {
  create?: Prisma.XOR<Prisma.AttachmentCreateWithoutUploaderInput, Prisma.AttachmentUncheckedCreateWithoutUploaderInput> | Prisma.AttachmentCreateWithoutUploaderInput[] | Prisma.AttachmentUncheckedCreateWithoutUploaderInput[]
  connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutUploaderInput | Prisma.AttachmentCreateOrConnectWithoutUploaderInput[]
  upsert?: Prisma.AttachmentUpsertWithWhereUniqueWithoutUploaderInput | Prisma.AttachmentUpsertWithWhereUniqueWithoutUploaderInput[]
  createMany?: Prisma.AttachmentCreateManyUploaderInputEnvelope
  set?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  disconnect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  delete?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  update?: Prisma.AttachmentUpdateWithWhereUniqueWithoutUploaderInput | Prisma.AttachmentUpdateWithWhereUniqueWithoutUploaderInput[]
  updateMany?: Prisma.AttachmentUpdateManyWithWhereWithoutUploaderInput | Prisma.AttachmentUpdateManyWithWhereWithoutUploaderInput[]
  deleteMany?: Prisma.AttachmentScalarWhereInput | Prisma.AttachmentScalarWhereInput[]
}

export type AttachmentUncheckedUpdateManyWithoutUploaderNestedInput = {
  create?: Prisma.XOR<Prisma.AttachmentCreateWithoutUploaderInput, Prisma.AttachmentUncheckedCreateWithoutUploaderInput> | Prisma.AttachmentCreateWithoutUploaderInput[] | Prisma.AttachmentUncheckedCreateWithoutUploaderInput[]
  connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutUploaderInput | Prisma.AttachmentCreateOrConnectWithoutUploaderInput[]
  upsert?: Prisma.AttachmentUpsertWithWhereUniqueWithoutUploaderInput | Prisma.AttachmentUpsertWithWhereUniqueWithoutUploaderInput[]
  createMany?: Prisma.AttachmentCreateManyUploaderInputEnvelope
  set?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  disconnect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  delete?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  update?: Prisma.AttachmentUpdateWithWhereUniqueWithoutUploaderInput | Prisma.AttachmentUpdateWithWhereUniqueWithoutUploaderInput[]
  updateMany?: Prisma.AttachmentUpdateManyWithWhereWithoutUploaderInput | Prisma.AttachmentUpdateManyWithWhereWithoutUploaderInput[]
  deleteMany?: Prisma.AttachmentScalarWhereInput | Prisma.AttachmentScalarWhereInput[]
}

export type AttachmentCreateNestedManyWithoutTaskInput = {
  create?: Prisma.XOR<Prisma.AttachmentCreateWithoutTaskInput, Prisma.AttachmentUncheckedCreateWithoutTaskInput> | Prisma.AttachmentCreateWithoutTaskInput[] | Prisma.AttachmentUncheckedCreateWithoutTaskInput[]
  connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutTaskInput | Prisma.AttachmentCreateOrConnectWithoutTaskInput[]
  createMany?: Prisma.AttachmentCreateManyTaskInputEnvelope
  connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
}

export type AttachmentUncheckedCreateNestedManyWithoutTaskInput = {
  create?: Prisma.XOR<Prisma.AttachmentCreateWithoutTaskInput, Prisma.AttachmentUncheckedCreateWithoutTaskInput> | Prisma.AttachmentCreateWithoutTaskInput[] | Prisma.AttachmentUncheckedCreateWithoutTaskInput[]
  connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutTaskInput | Prisma.AttachmentCreateOrConnectWithoutTaskInput[]
  createMany?: Prisma.AttachmentCreateManyTaskInputEnvelope
  connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
}

export type AttachmentUpdateManyWithoutTaskNestedInput = {
  create?: Prisma.XOR<Prisma.AttachmentCreateWithoutTaskInput, Prisma.AttachmentUncheckedCreateWithoutTaskInput> | Prisma.AttachmentCreateWithoutTaskInput[] | Prisma.AttachmentUncheckedCreateWithoutTaskInput[]
  connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutTaskInput | Prisma.AttachmentCreateOrConnectWithoutTaskInput[]
  upsert?: Prisma.AttachmentUpsertWithWhereUniqueWithoutTaskInput | Prisma.AttachmentUpsertWithWhereUniqueWithoutTaskInput[]
  createMany?: Prisma.AttachmentCreateManyTaskInputEnvelope
  set?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  disconnect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  delete?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  update?: Prisma.AttachmentUpdateWithWhereUniqueWithoutTaskInput | Prisma.AttachmentUpdateWithWhereUniqueWithoutTaskInput[]
  updateMany?: Prisma.AttachmentUpdateManyWithWhereWithoutTaskInput | Prisma.AttachmentUpdateManyWithWhereWithoutTaskInput[]
  deleteMany?: Prisma.AttachmentScalarWhereInput | Prisma.AttachmentScalarWhereInput[]
}

export type AttachmentUncheckedUpdateManyWithoutTaskNestedInput = {
  create?: Prisma.XOR<Prisma.AttachmentCreateWithoutTaskInput, Prisma.AttachmentUncheckedCreateWithoutTaskInput> | Prisma.AttachmentCreateWithoutTaskInput[] | Prisma.AttachmentUncheckedCreateWithoutTaskInput[]
  connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutTaskInput | Prisma.AttachmentCreateOrConnectWithoutTaskInput[]
  upsert?: Prisma.AttachmentUpsertWithWhereUniqueWithoutTaskInput | Prisma.AttachmentUpsertWithWhereUniqueWithoutTaskInput[]
  createMany?: Prisma.AttachmentCreateManyTaskInputEnvelope
  set?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  disconnect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  delete?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[]
  update?: Prisma.AttachmentUpdateWithWhereUniqueWithoutTaskInput | Prisma.AttachmentUpdateWithWhereUniqueWithoutTaskInput[]
  updateMany?: Prisma.AttachmentUpdateManyWithWhereWithoutTaskInput | Prisma.AttachmentUpdateManyWithWhereWithoutTaskInput[]
  deleteMany?: Prisma.AttachmentScalarWhereInput | Prisma.AttachmentScalarWhereInput[]
}

export type AttachmentCreateWithoutUploaderInput = {
  filename: string
  objectKey: string
  createdAt?: Date | string
  task: Prisma.TaskCreateNestedOneWithoutAttachmentsInput
}

export type AttachmentUncheckedCreateWithoutUploaderInput = {
  id?: number
  taskId: number
  filename: string
  objectKey: string
  createdAt?: Date | string
}

export type AttachmentCreateOrConnectWithoutUploaderInput = {
  where: Prisma.AttachmentWhereUniqueInput
  create: Prisma.XOR<Prisma.AttachmentCreateWithoutUploaderInput, Prisma.AttachmentUncheckedCreateWithoutUploaderInput>
}

export type AttachmentCreateManyUploaderInputEnvelope = {
  data: Prisma.AttachmentCreateManyUploaderInput | Prisma.AttachmentCreateManyUploaderInput[]
  skipDuplicates?: boolean
}

export type AttachmentUpsertWithWhereUniqueWithoutUploaderInput = {
  where: Prisma.AttachmentWhereUniqueInput
  update: Prisma.XOR<Prisma.AttachmentUpdateWithoutUploaderInput, Prisma.AttachmentUncheckedUpdateWithoutUploaderInput>
  create: Prisma.XOR<Prisma.AttachmentCreateWithoutUploaderInput, Prisma.AttachmentUncheckedCreateWithoutUploaderInput>
}

export type AttachmentUpdateWithWhereUniqueWithoutUploaderInput = {
  where: Prisma.AttachmentWhereUniqueInput
  data: Prisma.XOR<Prisma.AttachmentUpdateWithoutUploaderInput, Prisma.AttachmentUncheckedUpdateWithoutUploaderInput>
}

export type AttachmentUpdateManyWithWhereWithoutUploaderInput = {
  where: Prisma.AttachmentScalarWhereInput
  data: Prisma.XOR<Prisma.AttachmentUpdateManyMutationInput, Prisma.AttachmentUncheckedUpdateManyWithoutUploaderInput>
}

export type AttachmentScalarWhereInput = {
  AND?: Prisma.AttachmentScalarWhereInput | Prisma.AttachmentScalarWhereInput[]
  OR?: Prisma.AttachmentScalarWhereInput[]
  NOT?: Prisma.AttachmentScalarWhereInput | Prisma.AttachmentScalarWhereInput[]
  id?: Prisma.IntFilter<"Attachment"> | number
  taskId?: Prisma.IntFilter<"Attachment"> | number
  uploaderId?: Prisma.IntFilter<"Attachment"> | number
  filename?: Prisma.StringFilter<"Attachment"> | string
  objectKey?: Prisma.StringFilter<"Attachment"> | string
  createdAt?: Prisma.DateTimeFilter<"Attachment"> | Date | string
}

export type AttachmentCreateWithoutTaskInput = {
  filename: string
  objectKey: string
  createdAt?: Date | string
  uploader: Prisma.UserCreateNestedOneWithoutAttachmentsInput
}

export type AttachmentUncheckedCreateWithoutTaskInput = {
  id?: number
  uploaderId: number
  filename: string
  objectKey: string
  createdAt?: Date | string
}

export type AttachmentCreateOrConnectWithoutTaskInput = {
  where: Prisma.AttachmentWhereUniqueInput
  create: Prisma.XOR<Prisma.AttachmentCreateWithoutTaskInput, Prisma.AttachmentUncheckedCreateWithoutTaskInput>
}

export type AttachmentCreateManyTaskInputEnvelope = {
  data: Prisma.AttachmentCreateManyTaskInput | Prisma.AttachmentCreateManyTaskInput[]
  skipDuplicates?: boolean
}

export type AttachmentUpsertWithWhereUniqueWithoutTaskInput = {
  where: Prisma.AttachmentWhereUniqueInput
  update: Prisma.XOR<Prisma.AttachmentUpdateWithoutTaskInput, Prisma.AttachmentUncheckedUpdateWithoutTaskInput>
  create: Prisma.XOR<Prisma.AttachmentCreateWithoutTaskInput, Prisma.AttachmentUncheckedCreateWithoutTaskInput>
}

export type AttachmentUpdateWithWhereUniqueWithoutTaskInput = {
  where: Prisma.AttachmentWhereUniqueInput
  data: Prisma.XOR<Prisma.AttachmentUpdateWithoutTaskInput, Prisma.AttachmentUncheckedUpdateWithoutTaskInput>
}

export type AttachmentUpdateManyWithWhereWithoutTaskInput = {
  where: Prisma.AttachmentScalarWhereInput
  data: Prisma.XOR<Prisma.AttachmentUpdateManyMutationInput, Prisma.AttachmentUncheckedUpdateManyWithoutTaskInput>
}

export type AttachmentCreateManyUploaderInput = {
  id?: number
  taskId: number
  filename: string
  objectKey: string
  createdAt?: Date | string
}

export type AttachmentUpdateWithoutUploaderInput = {
  filename?: Prisma.StringFieldUpdateOperationsInput | string
  objectKey?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  task?: Prisma.TaskUpdateOneRequiredWithoutAttachmentsNestedInput
}

export type AttachmentUncheckedUpdateWithoutUploaderInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  taskId?: Prisma.IntFieldUpdateOperationsInput | number
  filename?: Prisma.StringFieldUpdateOperationsInput | string
  objectKey?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type AttachmentUncheckedUpdateManyWithoutUploaderInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  taskId?: Prisma.IntFieldUpdateOperationsInput | number
  filename?: Prisma.StringFieldUpdateOperationsInput | string
  objectKey?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type AttachmentCreateManyTaskInput = {
  id?: number
  uploaderId: number
  filename: string
  objectKey: string
  createdAt?: Date | string
}

export type AttachmentUpdateWithoutTaskInput = {
  filename?: Prisma.StringFieldUpdateOperationsInput | string
  objectKey?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  uploader?: Prisma.UserUpdateOneRequiredWithoutAttachmentsNestedInput
}

export type AttachmentUncheckedUpdateWithoutTaskInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  uploaderId?: Prisma.IntFieldUpdateOperationsInput | number
  filename?: Prisma.StringFieldUpdateOperationsInput | string
  objectKey?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type AttachmentUncheckedUpdateManyWithoutTaskInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  uploaderId?: Prisma.IntFieldUpdateOperationsInput | number
  filename?: Prisma.StringFieldUpdateOperationsInput | string
  objectKey?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}



export type AttachmentSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  taskId?: boolean
  uploaderId?: boolean
  filename?: boolean
  objectKey?: boolean
  createdAt?: boolean
  task?: boolean | Prisma.TaskDefaultArgs<ExtArgs>
  uploader?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}, ExtArgs["result"]["attachment"]>

export type AttachmentSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  taskId?: boolean
  uploaderId?: boolean
  filename?: boolean
  objectKey?: boolean
  createdAt?: boolean
  task?: boolean | Prisma.TaskDefaultArgs<ExtArgs>
  uploader?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}, ExtArgs["result"]["attachment"]>

export type AttachmentSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  taskId?: boolean
  uploaderId?: boolean
  filename?: boolean
  objectKey?: boolean
  createdAt?: boolean
  task?: boolean | Prisma.TaskDefaultArgs<ExtArgs>
  uploader?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}, ExtArgs["result"]["attachment"]>

export type AttachmentSelectScalar = {
  id?: boolean
  taskId?: boolean
  uploaderId?: boolean
  filename?: boolean
  objectKey?: boolean
  createdAt?: boolean
}

export type AttachmentOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "taskId" | "uploaderId" | "filename" | "objectKey" | "createdAt", ExtArgs["result"]["attachment"]>
export type AttachmentInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  task?: boolean | Prisma.TaskDefaultArgs<ExtArgs>
  uploader?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}
export type AttachmentIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  task?: boolean | Prisma.TaskDefaultArgs<ExtArgs>
  uploader?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}
export type AttachmentIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  task?: boolean | Prisma.TaskDefaultArgs<ExtArgs>
  uploader?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}

export type $AttachmentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "Attachment"
  objects: {
    task: Prisma.$TaskPayload<ExtArgs>
    uploader: Prisma.$UserPayload<ExtArgs>
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: number
    taskId: number
    uploaderId: number
    filename: string
    objectKey: string
    createdAt: Date
  }, ExtArgs["result"]["attachment"]>
  composites: {}
}

export type AttachmentGetPayload<S extends boolean | null | undefined | AttachmentDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$AttachmentPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for Attachment.
 * 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__AttachmentClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  task<T extends Prisma.TaskDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.TaskDefaultArgs<ExtArgs>>): Prisma.Prisma__TaskClient<runtime.Types.Result.GetResult<Prisma.$TaskPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
  uploader<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
  /**
   * Attaches callbacks for the resolution and/or rejection of the Promise.
   * @param onfulfilled The callback to execute when the Promise is resolved.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of which ever callback is executed.
   */
  then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
  /**
   * Attaches a callback for only the rejection of the Promise.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of the callback.
   */
  catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
  /**
   * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
   * resolved value cannot be modified from the callback.
   * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
   * @returns A Promise for the completion of the callback.
   */
  finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
}




/**
 * Fields of the Attachment model
 */
export interface AttachmentFieldRefs {
  readonly id: Prisma.FieldRef<"Attachment", 'Int'>
  readonly taskId: Prisma.FieldRef<"Attachment", 'Int'>
  readonly uploaderId: Prisma.FieldRef<"Attachment", 'Int'>
  readonly filename: Prisma.FieldRef<"Attachment", 'String'>
  readonly objectKey: Prisma.FieldRef<"Attachment", 'String'>
  readonly createdAt: Prisma.FieldRef<"Attachment", 'DateTime'>
}
    

// Custom InputTypes
/**
 * Attachment findUnique
 */
export type AttachmentFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachment
   */
  select?: Prisma.AttachmentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Attachment
   */
  omit?: Prisma.AttachmentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentInclude<ExtArgs> | null
  /**
   * Filter, which Attachment to fetch.
   */
  where: Prisma.AttachmentWhereUniqueInput
}

/**
 * Attachment findUniqueOrThrow
 */
export type AttachmentFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachment
   */
  select?: Prisma.AttachmentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Attachment
   */
  omit?: Prisma.AttachmentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentInclude<ExtArgs> | null
  /**
   * Filter, which Attachment to fetch.
   */
  where: Prisma.AttachmentWhereUniqueInput
}

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

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

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

/**
 * Attachment create
 */
export type AttachmentCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachment
   */
  select?: Prisma.AttachmentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Attachment
   */
  omit?: Prisma.AttachmentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentInclude<ExtArgs> | null
  /**
   * The data needed to create a Attachment.
   */
  data: Prisma.XOR<Prisma.AttachmentCreateInput, Prisma.AttachmentUncheckedCreateInput>
}

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

/**
 * Attachment createManyAndReturn
 */
export type AttachmentCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachment
   */
  select?: Prisma.AttachmentSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Attachment
   */
  omit?: Prisma.AttachmentOmit<ExtArgs> | null
  /**
   * The data used to create many Attachments.
   */
  data: Prisma.AttachmentCreateManyInput | Prisma.AttachmentCreateManyInput[]
  skipDuplicates?: boolean
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentIncludeCreateManyAndReturn<ExtArgs> | null
}

/**
 * Attachment update
 */
export type AttachmentUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachment
   */
  select?: Prisma.AttachmentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Attachment
   */
  omit?: Prisma.AttachmentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentInclude<ExtArgs> | null
  /**
   * The data needed to update a Attachment.
   */
  data: Prisma.XOR<Prisma.AttachmentUpdateInput, Prisma.AttachmentUncheckedUpdateInput>
  /**
   * Choose, which Attachment to update.
   */
  where: Prisma.AttachmentWhereUniqueInput
}

/**
 * Attachment updateMany
 */
export type AttachmentUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update Attachments.
   */
  data: Prisma.XOR<Prisma.AttachmentUpdateManyMutationInput, Prisma.AttachmentUncheckedUpdateManyInput>
  /**
   * Filter which Attachments to update
   */
  where?: Prisma.AttachmentWhereInput
  /**
   * Limit how many Attachments to update.
   */
  limit?: number
}

/**
 * Attachment updateManyAndReturn
 */
export type AttachmentUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachment
   */
  select?: Prisma.AttachmentSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Attachment
   */
  omit?: Prisma.AttachmentOmit<ExtArgs> | null
  /**
   * The data used to update Attachments.
   */
  data: Prisma.XOR<Prisma.AttachmentUpdateManyMutationInput, Prisma.AttachmentUncheckedUpdateManyInput>
  /**
   * Filter which Attachments to update
   */
  where?: Prisma.AttachmentWhereInput
  /**
   * Limit how many Attachments to update.
   */
  limit?: number
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentIncludeUpdateManyAndReturn<ExtArgs> | null
}

/**
 * Attachment upsert
 */
export type AttachmentUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachment
   */
  select?: Prisma.AttachmentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Attachment
   */
  omit?: Prisma.AttachmentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentInclude<ExtArgs> | null
  /**
   * The filter to search for the Attachment to update in case it exists.
   */
  where: Prisma.AttachmentWhereUniqueInput
  /**
   * In case the Attachment found by the `where` argument doesn't exist, create a new Attachment with this data.
   */
  create: Prisma.XOR<Prisma.AttachmentCreateInput, Prisma.AttachmentUncheckedCreateInput>
  /**
   * In case the Attachment was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.AttachmentUpdateInput, Prisma.AttachmentUncheckedUpdateInput>
}

/**
 * Attachment delete
 */
export type AttachmentDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachment
   */
  select?: Prisma.AttachmentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Attachment
   */
  omit?: Prisma.AttachmentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentInclude<ExtArgs> | null
  /**
   * Filter which Attachment to delete.
   */
  where: Prisma.AttachmentWhereUniqueInput
}

/**
 * Attachment deleteMany
 */
export type AttachmentDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Attachments to delete
   */
  where?: Prisma.AttachmentWhereInput
  /**
   * Limit how many Attachments to delete.
   */
  limit?: number
}

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