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

export type AggregateTaskDepartment = {
  _count: TaskDepartmentCountAggregateOutputType | null
  _avg: TaskDepartmentAvgAggregateOutputType | null
  _sum: TaskDepartmentSumAggregateOutputType | null
  _min: TaskDepartmentMinAggregateOutputType | null
  _max: TaskDepartmentMaxAggregateOutputType | null
}

export type TaskDepartmentAvgAggregateOutputType = {
  taskId: number | null
  departmentId: number | null
}

export type TaskDepartmentSumAggregateOutputType = {
  taskId: number | null
  departmentId: number | null
}

export type TaskDepartmentMinAggregateOutputType = {
  taskId: number | null
  departmentId: number | null
}

export type TaskDepartmentMaxAggregateOutputType = {
  taskId: number | null
  departmentId: number | null
}

export type TaskDepartmentCountAggregateOutputType = {
  taskId: number
  departmentId: number
  _all: number
}


export type TaskDepartmentAvgAggregateInputType = {
  taskId?: true
  departmentId?: true
}

export type TaskDepartmentSumAggregateInputType = {
  taskId?: true
  departmentId?: true
}

export type TaskDepartmentMinAggregateInputType = {
  taskId?: true
  departmentId?: true
}

export type TaskDepartmentMaxAggregateInputType = {
  taskId?: true
  departmentId?: true
}

export type TaskDepartmentCountAggregateInputType = {
  taskId?: true
  departmentId?: true
  _all?: true
}

export type TaskDepartmentAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which TaskDepartment to aggregate.
   */
  where?: Prisma.TaskDepartmentWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of TaskDepartments to fetch.
   */
  orderBy?: Prisma.TaskDepartmentOrderByWithRelationInput | Prisma.TaskDepartmentOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.TaskDepartmentWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` TaskDepartments 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` TaskDepartments.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned TaskDepartments
  **/
  _count?: true | TaskDepartmentCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: TaskDepartmentAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: TaskDepartmentSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: TaskDepartmentMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: TaskDepartmentMaxAggregateInputType
}

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




export type TaskDepartmentGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.TaskDepartmentWhereInput
  orderBy?: Prisma.TaskDepartmentOrderByWithAggregationInput | Prisma.TaskDepartmentOrderByWithAggregationInput[]
  by: Prisma.TaskDepartmentScalarFieldEnum[] | Prisma.TaskDepartmentScalarFieldEnum
  having?: Prisma.TaskDepartmentScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: TaskDepartmentCountAggregateInputType | true
  _avg?: TaskDepartmentAvgAggregateInputType
  _sum?: TaskDepartmentSumAggregateInputType
  _min?: TaskDepartmentMinAggregateInputType
  _max?: TaskDepartmentMaxAggregateInputType
}

export type TaskDepartmentGroupByOutputType = {
  taskId: number
  departmentId: number
  _count: TaskDepartmentCountAggregateOutputType | null
  _avg: TaskDepartmentAvgAggregateOutputType | null
  _sum: TaskDepartmentSumAggregateOutputType | null
  _min: TaskDepartmentMinAggregateOutputType | null
  _max: TaskDepartmentMaxAggregateOutputType | null
}

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



export type TaskDepartmentWhereInput = {
  AND?: Prisma.TaskDepartmentWhereInput | Prisma.TaskDepartmentWhereInput[]
  OR?: Prisma.TaskDepartmentWhereInput[]
  NOT?: Prisma.TaskDepartmentWhereInput | Prisma.TaskDepartmentWhereInput[]
  taskId?: Prisma.IntFilter<"TaskDepartment"> | number
  departmentId?: Prisma.IntFilter<"TaskDepartment"> | number
  task?: Prisma.XOR<Prisma.TaskScalarRelationFilter, Prisma.TaskWhereInput>
  department?: Prisma.XOR<Prisma.DepartmentScalarRelationFilter, Prisma.DepartmentWhereInput>
}

export type TaskDepartmentOrderByWithRelationInput = {
  taskId?: Prisma.SortOrder
  departmentId?: Prisma.SortOrder
  task?: Prisma.TaskOrderByWithRelationInput
  department?: Prisma.DepartmentOrderByWithRelationInput
}

export type TaskDepartmentWhereUniqueInput = Prisma.AtLeast<{
  taskId_departmentId?: Prisma.TaskDepartmentTaskIdDepartmentIdCompoundUniqueInput
  AND?: Prisma.TaskDepartmentWhereInput | Prisma.TaskDepartmentWhereInput[]
  OR?: Prisma.TaskDepartmentWhereInput[]
  NOT?: Prisma.TaskDepartmentWhereInput | Prisma.TaskDepartmentWhereInput[]
  taskId?: Prisma.IntFilter<"TaskDepartment"> | number
  departmentId?: Prisma.IntFilter<"TaskDepartment"> | number
  task?: Prisma.XOR<Prisma.TaskScalarRelationFilter, Prisma.TaskWhereInput>
  department?: Prisma.XOR<Prisma.DepartmentScalarRelationFilter, Prisma.DepartmentWhereInput>
}, "taskId_departmentId">

export type TaskDepartmentOrderByWithAggregationInput = {
  taskId?: Prisma.SortOrder
  departmentId?: Prisma.SortOrder
  _count?: Prisma.TaskDepartmentCountOrderByAggregateInput
  _avg?: Prisma.TaskDepartmentAvgOrderByAggregateInput
  _max?: Prisma.TaskDepartmentMaxOrderByAggregateInput
  _min?: Prisma.TaskDepartmentMinOrderByAggregateInput
  _sum?: Prisma.TaskDepartmentSumOrderByAggregateInput
}

export type TaskDepartmentScalarWhereWithAggregatesInput = {
  AND?: Prisma.TaskDepartmentScalarWhereWithAggregatesInput | Prisma.TaskDepartmentScalarWhereWithAggregatesInput[]
  OR?: Prisma.TaskDepartmentScalarWhereWithAggregatesInput[]
  NOT?: Prisma.TaskDepartmentScalarWhereWithAggregatesInput | Prisma.TaskDepartmentScalarWhereWithAggregatesInput[]
  taskId?: Prisma.IntWithAggregatesFilter<"TaskDepartment"> | number
  departmentId?: Prisma.IntWithAggregatesFilter<"TaskDepartment"> | number
}

export type TaskDepartmentCreateInput = {
  task: Prisma.TaskCreateNestedOneWithoutDepartmentsInput
  department: Prisma.DepartmentCreateNestedOneWithoutTasksInput
}

export type TaskDepartmentUncheckedCreateInput = {
  taskId: number
  departmentId: number
}

export type TaskDepartmentUpdateInput = {
  task?: Prisma.TaskUpdateOneRequiredWithoutDepartmentsNestedInput
  department?: Prisma.DepartmentUpdateOneRequiredWithoutTasksNestedInput
}

export type TaskDepartmentUncheckedUpdateInput = {
  taskId?: Prisma.IntFieldUpdateOperationsInput | number
  departmentId?: Prisma.IntFieldUpdateOperationsInput | number
}

export type TaskDepartmentCreateManyInput = {
  taskId: number
  departmentId: number
}

export type TaskDepartmentUpdateManyMutationInput = {

}

export type TaskDepartmentUncheckedUpdateManyInput = {
  taskId?: Prisma.IntFieldUpdateOperationsInput | number
  departmentId?: Prisma.IntFieldUpdateOperationsInput | number
}

export type TaskDepartmentListRelationFilter = {
  every?: Prisma.TaskDepartmentWhereInput
  some?: Prisma.TaskDepartmentWhereInput
  none?: Prisma.TaskDepartmentWhereInput
}

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

export type TaskDepartmentTaskIdDepartmentIdCompoundUniqueInput = {
  taskId: number
  departmentId: number
}

export type TaskDepartmentCountOrderByAggregateInput = {
  taskId?: Prisma.SortOrder
  departmentId?: Prisma.SortOrder
}

export type TaskDepartmentAvgOrderByAggregateInput = {
  taskId?: Prisma.SortOrder
  departmentId?: Prisma.SortOrder
}

export type TaskDepartmentMaxOrderByAggregateInput = {
  taskId?: Prisma.SortOrder
  departmentId?: Prisma.SortOrder
}

export type TaskDepartmentMinOrderByAggregateInput = {
  taskId?: Prisma.SortOrder
  departmentId?: Prisma.SortOrder
}

export type TaskDepartmentSumOrderByAggregateInput = {
  taskId?: Prisma.SortOrder
  departmentId?: Prisma.SortOrder
}

export type TaskDepartmentCreateNestedManyWithoutDepartmentInput = {
  create?: Prisma.XOR<Prisma.TaskDepartmentCreateWithoutDepartmentInput, Prisma.TaskDepartmentUncheckedCreateWithoutDepartmentInput> | Prisma.TaskDepartmentCreateWithoutDepartmentInput[] | Prisma.TaskDepartmentUncheckedCreateWithoutDepartmentInput[]
  connectOrCreate?: Prisma.TaskDepartmentCreateOrConnectWithoutDepartmentInput | Prisma.TaskDepartmentCreateOrConnectWithoutDepartmentInput[]
  createMany?: Prisma.TaskDepartmentCreateManyDepartmentInputEnvelope
  connect?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
}

export type TaskDepartmentUncheckedCreateNestedManyWithoutDepartmentInput = {
  create?: Prisma.XOR<Prisma.TaskDepartmentCreateWithoutDepartmentInput, Prisma.TaskDepartmentUncheckedCreateWithoutDepartmentInput> | Prisma.TaskDepartmentCreateWithoutDepartmentInput[] | Prisma.TaskDepartmentUncheckedCreateWithoutDepartmentInput[]
  connectOrCreate?: Prisma.TaskDepartmentCreateOrConnectWithoutDepartmentInput | Prisma.TaskDepartmentCreateOrConnectWithoutDepartmentInput[]
  createMany?: Prisma.TaskDepartmentCreateManyDepartmentInputEnvelope
  connect?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
}

export type TaskDepartmentUpdateManyWithoutDepartmentNestedInput = {
  create?: Prisma.XOR<Prisma.TaskDepartmentCreateWithoutDepartmentInput, Prisma.TaskDepartmentUncheckedCreateWithoutDepartmentInput> | Prisma.TaskDepartmentCreateWithoutDepartmentInput[] | Prisma.TaskDepartmentUncheckedCreateWithoutDepartmentInput[]
  connectOrCreate?: Prisma.TaskDepartmentCreateOrConnectWithoutDepartmentInput | Prisma.TaskDepartmentCreateOrConnectWithoutDepartmentInput[]
  upsert?: Prisma.TaskDepartmentUpsertWithWhereUniqueWithoutDepartmentInput | Prisma.TaskDepartmentUpsertWithWhereUniqueWithoutDepartmentInput[]
  createMany?: Prisma.TaskDepartmentCreateManyDepartmentInputEnvelope
  set?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  disconnect?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  delete?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  connect?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  update?: Prisma.TaskDepartmentUpdateWithWhereUniqueWithoutDepartmentInput | Prisma.TaskDepartmentUpdateWithWhereUniqueWithoutDepartmentInput[]
  updateMany?: Prisma.TaskDepartmentUpdateManyWithWhereWithoutDepartmentInput | Prisma.TaskDepartmentUpdateManyWithWhereWithoutDepartmentInput[]
  deleteMany?: Prisma.TaskDepartmentScalarWhereInput | Prisma.TaskDepartmentScalarWhereInput[]
}

export type TaskDepartmentUncheckedUpdateManyWithoutDepartmentNestedInput = {
  create?: Prisma.XOR<Prisma.TaskDepartmentCreateWithoutDepartmentInput, Prisma.TaskDepartmentUncheckedCreateWithoutDepartmentInput> | Prisma.TaskDepartmentCreateWithoutDepartmentInput[] | Prisma.TaskDepartmentUncheckedCreateWithoutDepartmentInput[]
  connectOrCreate?: Prisma.TaskDepartmentCreateOrConnectWithoutDepartmentInput | Prisma.TaskDepartmentCreateOrConnectWithoutDepartmentInput[]
  upsert?: Prisma.TaskDepartmentUpsertWithWhereUniqueWithoutDepartmentInput | Prisma.TaskDepartmentUpsertWithWhereUniqueWithoutDepartmentInput[]
  createMany?: Prisma.TaskDepartmentCreateManyDepartmentInputEnvelope
  set?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  disconnect?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  delete?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  connect?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  update?: Prisma.TaskDepartmentUpdateWithWhereUniqueWithoutDepartmentInput | Prisma.TaskDepartmentUpdateWithWhereUniqueWithoutDepartmentInput[]
  updateMany?: Prisma.TaskDepartmentUpdateManyWithWhereWithoutDepartmentInput | Prisma.TaskDepartmentUpdateManyWithWhereWithoutDepartmentInput[]
  deleteMany?: Prisma.TaskDepartmentScalarWhereInput | Prisma.TaskDepartmentScalarWhereInput[]
}

export type TaskDepartmentCreateNestedManyWithoutTaskInput = {
  create?: Prisma.XOR<Prisma.TaskDepartmentCreateWithoutTaskInput, Prisma.TaskDepartmentUncheckedCreateWithoutTaskInput> | Prisma.TaskDepartmentCreateWithoutTaskInput[] | Prisma.TaskDepartmentUncheckedCreateWithoutTaskInput[]
  connectOrCreate?: Prisma.TaskDepartmentCreateOrConnectWithoutTaskInput | Prisma.TaskDepartmentCreateOrConnectWithoutTaskInput[]
  createMany?: Prisma.TaskDepartmentCreateManyTaskInputEnvelope
  connect?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
}

export type TaskDepartmentUncheckedCreateNestedManyWithoutTaskInput = {
  create?: Prisma.XOR<Prisma.TaskDepartmentCreateWithoutTaskInput, Prisma.TaskDepartmentUncheckedCreateWithoutTaskInput> | Prisma.TaskDepartmentCreateWithoutTaskInput[] | Prisma.TaskDepartmentUncheckedCreateWithoutTaskInput[]
  connectOrCreate?: Prisma.TaskDepartmentCreateOrConnectWithoutTaskInput | Prisma.TaskDepartmentCreateOrConnectWithoutTaskInput[]
  createMany?: Prisma.TaskDepartmentCreateManyTaskInputEnvelope
  connect?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
}

export type TaskDepartmentUpdateManyWithoutTaskNestedInput = {
  create?: Prisma.XOR<Prisma.TaskDepartmentCreateWithoutTaskInput, Prisma.TaskDepartmentUncheckedCreateWithoutTaskInput> | Prisma.TaskDepartmentCreateWithoutTaskInput[] | Prisma.TaskDepartmentUncheckedCreateWithoutTaskInput[]
  connectOrCreate?: Prisma.TaskDepartmentCreateOrConnectWithoutTaskInput | Prisma.TaskDepartmentCreateOrConnectWithoutTaskInput[]
  upsert?: Prisma.TaskDepartmentUpsertWithWhereUniqueWithoutTaskInput | Prisma.TaskDepartmentUpsertWithWhereUniqueWithoutTaskInput[]
  createMany?: Prisma.TaskDepartmentCreateManyTaskInputEnvelope
  set?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  disconnect?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  delete?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  connect?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  update?: Prisma.TaskDepartmentUpdateWithWhereUniqueWithoutTaskInput | Prisma.TaskDepartmentUpdateWithWhereUniqueWithoutTaskInput[]
  updateMany?: Prisma.TaskDepartmentUpdateManyWithWhereWithoutTaskInput | Prisma.TaskDepartmentUpdateManyWithWhereWithoutTaskInput[]
  deleteMany?: Prisma.TaskDepartmentScalarWhereInput | Prisma.TaskDepartmentScalarWhereInput[]
}

export type TaskDepartmentUncheckedUpdateManyWithoutTaskNestedInput = {
  create?: Prisma.XOR<Prisma.TaskDepartmentCreateWithoutTaskInput, Prisma.TaskDepartmentUncheckedCreateWithoutTaskInput> | Prisma.TaskDepartmentCreateWithoutTaskInput[] | Prisma.TaskDepartmentUncheckedCreateWithoutTaskInput[]
  connectOrCreate?: Prisma.TaskDepartmentCreateOrConnectWithoutTaskInput | Prisma.TaskDepartmentCreateOrConnectWithoutTaskInput[]
  upsert?: Prisma.TaskDepartmentUpsertWithWhereUniqueWithoutTaskInput | Prisma.TaskDepartmentUpsertWithWhereUniqueWithoutTaskInput[]
  createMany?: Prisma.TaskDepartmentCreateManyTaskInputEnvelope
  set?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  disconnect?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  delete?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  connect?: Prisma.TaskDepartmentWhereUniqueInput | Prisma.TaskDepartmentWhereUniqueInput[]
  update?: Prisma.TaskDepartmentUpdateWithWhereUniqueWithoutTaskInput | Prisma.TaskDepartmentUpdateWithWhereUniqueWithoutTaskInput[]
  updateMany?: Prisma.TaskDepartmentUpdateManyWithWhereWithoutTaskInput | Prisma.TaskDepartmentUpdateManyWithWhereWithoutTaskInput[]
  deleteMany?: Prisma.TaskDepartmentScalarWhereInput | Prisma.TaskDepartmentScalarWhereInput[]
}

export type TaskDepartmentCreateWithoutDepartmentInput = {
  task: Prisma.TaskCreateNestedOneWithoutDepartmentsInput
}

export type TaskDepartmentUncheckedCreateWithoutDepartmentInput = {
  taskId: number
}

export type TaskDepartmentCreateOrConnectWithoutDepartmentInput = {
  where: Prisma.TaskDepartmentWhereUniqueInput
  create: Prisma.XOR<Prisma.TaskDepartmentCreateWithoutDepartmentInput, Prisma.TaskDepartmentUncheckedCreateWithoutDepartmentInput>
}

export type TaskDepartmentCreateManyDepartmentInputEnvelope = {
  data: Prisma.TaskDepartmentCreateManyDepartmentInput | Prisma.TaskDepartmentCreateManyDepartmentInput[]
  skipDuplicates?: boolean
}

export type TaskDepartmentUpsertWithWhereUniqueWithoutDepartmentInput = {
  where: Prisma.TaskDepartmentWhereUniqueInput
  update: Prisma.XOR<Prisma.TaskDepartmentUpdateWithoutDepartmentInput, Prisma.TaskDepartmentUncheckedUpdateWithoutDepartmentInput>
  create: Prisma.XOR<Prisma.TaskDepartmentCreateWithoutDepartmentInput, Prisma.TaskDepartmentUncheckedCreateWithoutDepartmentInput>
}

export type TaskDepartmentUpdateWithWhereUniqueWithoutDepartmentInput = {
  where: Prisma.TaskDepartmentWhereUniqueInput
  data: Prisma.XOR<Prisma.TaskDepartmentUpdateWithoutDepartmentInput, Prisma.TaskDepartmentUncheckedUpdateWithoutDepartmentInput>
}

export type TaskDepartmentUpdateManyWithWhereWithoutDepartmentInput = {
  where: Prisma.TaskDepartmentScalarWhereInput
  data: Prisma.XOR<Prisma.TaskDepartmentUpdateManyMutationInput, Prisma.TaskDepartmentUncheckedUpdateManyWithoutDepartmentInput>
}

export type TaskDepartmentScalarWhereInput = {
  AND?: Prisma.TaskDepartmentScalarWhereInput | Prisma.TaskDepartmentScalarWhereInput[]
  OR?: Prisma.TaskDepartmentScalarWhereInput[]
  NOT?: Prisma.TaskDepartmentScalarWhereInput | Prisma.TaskDepartmentScalarWhereInput[]
  taskId?: Prisma.IntFilter<"TaskDepartment"> | number
  departmentId?: Prisma.IntFilter<"TaskDepartment"> | number
}

export type TaskDepartmentCreateWithoutTaskInput = {
  department: Prisma.DepartmentCreateNestedOneWithoutTasksInput
}

export type TaskDepartmentUncheckedCreateWithoutTaskInput = {
  departmentId: number
}

export type TaskDepartmentCreateOrConnectWithoutTaskInput = {
  where: Prisma.TaskDepartmentWhereUniqueInput
  create: Prisma.XOR<Prisma.TaskDepartmentCreateWithoutTaskInput, Prisma.TaskDepartmentUncheckedCreateWithoutTaskInput>
}

export type TaskDepartmentCreateManyTaskInputEnvelope = {
  data: Prisma.TaskDepartmentCreateManyTaskInput | Prisma.TaskDepartmentCreateManyTaskInput[]
  skipDuplicates?: boolean
}

export type TaskDepartmentUpsertWithWhereUniqueWithoutTaskInput = {
  where: Prisma.TaskDepartmentWhereUniqueInput
  update: Prisma.XOR<Prisma.TaskDepartmentUpdateWithoutTaskInput, Prisma.TaskDepartmentUncheckedUpdateWithoutTaskInput>
  create: Prisma.XOR<Prisma.TaskDepartmentCreateWithoutTaskInput, Prisma.TaskDepartmentUncheckedCreateWithoutTaskInput>
}

export type TaskDepartmentUpdateWithWhereUniqueWithoutTaskInput = {
  where: Prisma.TaskDepartmentWhereUniqueInput
  data: Prisma.XOR<Prisma.TaskDepartmentUpdateWithoutTaskInput, Prisma.TaskDepartmentUncheckedUpdateWithoutTaskInput>
}

export type TaskDepartmentUpdateManyWithWhereWithoutTaskInput = {
  where: Prisma.TaskDepartmentScalarWhereInput
  data: Prisma.XOR<Prisma.TaskDepartmentUpdateManyMutationInput, Prisma.TaskDepartmentUncheckedUpdateManyWithoutTaskInput>
}

export type TaskDepartmentCreateManyDepartmentInput = {
  taskId: number
}

export type TaskDepartmentUpdateWithoutDepartmentInput = {
  task?: Prisma.TaskUpdateOneRequiredWithoutDepartmentsNestedInput
}

export type TaskDepartmentUncheckedUpdateWithoutDepartmentInput = {
  taskId?: Prisma.IntFieldUpdateOperationsInput | number
}

export type TaskDepartmentUncheckedUpdateManyWithoutDepartmentInput = {
  taskId?: Prisma.IntFieldUpdateOperationsInput | number
}

export type TaskDepartmentCreateManyTaskInput = {
  departmentId: number
}

export type TaskDepartmentUpdateWithoutTaskInput = {
  department?: Prisma.DepartmentUpdateOneRequiredWithoutTasksNestedInput
}

export type TaskDepartmentUncheckedUpdateWithoutTaskInput = {
  departmentId?: Prisma.IntFieldUpdateOperationsInput | number
}

export type TaskDepartmentUncheckedUpdateManyWithoutTaskInput = {
  departmentId?: Prisma.IntFieldUpdateOperationsInput | number
}



export type TaskDepartmentSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  taskId?: boolean
  departmentId?: boolean
  task?: boolean | Prisma.TaskDefaultArgs<ExtArgs>
  department?: boolean | Prisma.DepartmentDefaultArgs<ExtArgs>
}, ExtArgs["result"]["taskDepartment"]>

export type TaskDepartmentSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  taskId?: boolean
  departmentId?: boolean
  task?: boolean | Prisma.TaskDefaultArgs<ExtArgs>
  department?: boolean | Prisma.DepartmentDefaultArgs<ExtArgs>
}, ExtArgs["result"]["taskDepartment"]>

export type TaskDepartmentSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  taskId?: boolean
  departmentId?: boolean
  task?: boolean | Prisma.TaskDefaultArgs<ExtArgs>
  department?: boolean | Prisma.DepartmentDefaultArgs<ExtArgs>
}, ExtArgs["result"]["taskDepartment"]>

export type TaskDepartmentSelectScalar = {
  taskId?: boolean
  departmentId?: boolean
}

export type TaskDepartmentOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"taskId" | "departmentId", ExtArgs["result"]["taskDepartment"]>
export type TaskDepartmentInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  task?: boolean | Prisma.TaskDefaultArgs<ExtArgs>
  department?: boolean | Prisma.DepartmentDefaultArgs<ExtArgs>
}
export type TaskDepartmentIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  task?: boolean | Prisma.TaskDefaultArgs<ExtArgs>
  department?: boolean | Prisma.DepartmentDefaultArgs<ExtArgs>
}
export type TaskDepartmentIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  task?: boolean | Prisma.TaskDefaultArgs<ExtArgs>
  department?: boolean | Prisma.DepartmentDefaultArgs<ExtArgs>
}

export type $TaskDepartmentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "TaskDepartment"
  objects: {
    task: Prisma.$TaskPayload<ExtArgs>
    department: Prisma.$DepartmentPayload<ExtArgs>
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    taskId: number
    departmentId: number
  }, ExtArgs["result"]["taskDepartment"]>
  composites: {}
}

export type TaskDepartmentGetPayload<S extends boolean | null | undefined | TaskDepartmentDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$TaskDepartmentPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for TaskDepartment.
 * 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__TaskDepartmentClient<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>
  department<T extends Prisma.DepartmentDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.DepartmentDefaultArgs<ExtArgs>>): Prisma.Prisma__DepartmentClient<runtime.Types.Result.GetResult<Prisma.$DepartmentPayload<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 TaskDepartment model
 */
export interface TaskDepartmentFieldRefs {
  readonly taskId: Prisma.FieldRef<"TaskDepartment", 'Int'>
  readonly departmentId: Prisma.FieldRef<"TaskDepartment", 'Int'>
}
    

// Custom InputTypes
/**
 * TaskDepartment findUnique
 */
export type TaskDepartmentFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TaskDepartment
   */
  select?: Prisma.TaskDepartmentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the TaskDepartment
   */
  omit?: Prisma.TaskDepartmentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TaskDepartmentInclude<ExtArgs> | null
  /**
   * Filter, which TaskDepartment to fetch.
   */
  where: Prisma.TaskDepartmentWhereUniqueInput
}

/**
 * TaskDepartment findUniqueOrThrow
 */
export type TaskDepartmentFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TaskDepartment
   */
  select?: Prisma.TaskDepartmentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the TaskDepartment
   */
  omit?: Prisma.TaskDepartmentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TaskDepartmentInclude<ExtArgs> | null
  /**
   * Filter, which TaskDepartment to fetch.
   */
  where: Prisma.TaskDepartmentWhereUniqueInput
}

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

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

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

/**
 * TaskDepartment create
 */
export type TaskDepartmentCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TaskDepartment
   */
  select?: Prisma.TaskDepartmentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the TaskDepartment
   */
  omit?: Prisma.TaskDepartmentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TaskDepartmentInclude<ExtArgs> | null
  /**
   * The data needed to create a TaskDepartment.
   */
  data: Prisma.XOR<Prisma.TaskDepartmentCreateInput, Prisma.TaskDepartmentUncheckedCreateInput>
}

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

/**
 * TaskDepartment createManyAndReturn
 */
export type TaskDepartmentCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TaskDepartment
   */
  select?: Prisma.TaskDepartmentSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the TaskDepartment
   */
  omit?: Prisma.TaskDepartmentOmit<ExtArgs> | null
  /**
   * The data used to create many TaskDepartments.
   */
  data: Prisma.TaskDepartmentCreateManyInput | Prisma.TaskDepartmentCreateManyInput[]
  skipDuplicates?: boolean
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TaskDepartmentIncludeCreateManyAndReturn<ExtArgs> | null
}

/**
 * TaskDepartment update
 */
export type TaskDepartmentUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TaskDepartment
   */
  select?: Prisma.TaskDepartmentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the TaskDepartment
   */
  omit?: Prisma.TaskDepartmentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TaskDepartmentInclude<ExtArgs> | null
  /**
   * The data needed to update a TaskDepartment.
   */
  data: Prisma.XOR<Prisma.TaskDepartmentUpdateInput, Prisma.TaskDepartmentUncheckedUpdateInput>
  /**
   * Choose, which TaskDepartment to update.
   */
  where: Prisma.TaskDepartmentWhereUniqueInput
}

/**
 * TaskDepartment updateMany
 */
export type TaskDepartmentUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update TaskDepartments.
   */
  data: Prisma.XOR<Prisma.TaskDepartmentUpdateManyMutationInput, Prisma.TaskDepartmentUncheckedUpdateManyInput>
  /**
   * Filter which TaskDepartments to update
   */
  where?: Prisma.TaskDepartmentWhereInput
  /**
   * Limit how many TaskDepartments to update.
   */
  limit?: number
}

/**
 * TaskDepartment updateManyAndReturn
 */
export type TaskDepartmentUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TaskDepartment
   */
  select?: Prisma.TaskDepartmentSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the TaskDepartment
   */
  omit?: Prisma.TaskDepartmentOmit<ExtArgs> | null
  /**
   * The data used to update TaskDepartments.
   */
  data: Prisma.XOR<Prisma.TaskDepartmentUpdateManyMutationInput, Prisma.TaskDepartmentUncheckedUpdateManyInput>
  /**
   * Filter which TaskDepartments to update
   */
  where?: Prisma.TaskDepartmentWhereInput
  /**
   * Limit how many TaskDepartments to update.
   */
  limit?: number
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TaskDepartmentIncludeUpdateManyAndReturn<ExtArgs> | null
}

/**
 * TaskDepartment upsert
 */
export type TaskDepartmentUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TaskDepartment
   */
  select?: Prisma.TaskDepartmentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the TaskDepartment
   */
  omit?: Prisma.TaskDepartmentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TaskDepartmentInclude<ExtArgs> | null
  /**
   * The filter to search for the TaskDepartment to update in case it exists.
   */
  where: Prisma.TaskDepartmentWhereUniqueInput
  /**
   * In case the TaskDepartment found by the `where` argument doesn't exist, create a new TaskDepartment with this data.
   */
  create: Prisma.XOR<Prisma.TaskDepartmentCreateInput, Prisma.TaskDepartmentUncheckedCreateInput>
  /**
   * In case the TaskDepartment was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.TaskDepartmentUpdateInput, Prisma.TaskDepartmentUncheckedUpdateInput>
}

/**
 * TaskDepartment delete
 */
export type TaskDepartmentDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TaskDepartment
   */
  select?: Prisma.TaskDepartmentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the TaskDepartment
   */
  omit?: Prisma.TaskDepartmentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TaskDepartmentInclude<ExtArgs> | null
  /**
   * Filter which TaskDepartment to delete.
   */
  where: Prisma.TaskDepartmentWhereUniqueInput
}

/**
 * TaskDepartment deleteMany
 */
export type TaskDepartmentDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which TaskDepartments to delete
   */
  where?: Prisma.TaskDepartmentWhereInput
  /**
   * Limit how many TaskDepartments to delete.
   */
  limit?: number
}

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