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

export type AggregateMonitorPlan = {
  _count: MonitorPlanCountAggregateOutputType | null
  _avg: MonitorPlanAvgAggregateOutputType | null
  _sum: MonitorPlanSumAggregateOutputType | null
  _min: MonitorPlanMinAggregateOutputType | null
  _max: MonitorPlanMaxAggregateOutputType | null
}

export type MonitorPlanAvgAggregateOutputType = {
  id: number | null
  sourceTaskId: number | null
  ownerDeptId: number | null
  createdBy: number | null
  updatedBy: number | null
}

export type MonitorPlanSumAggregateOutputType = {
  id: number | null
  sourceTaskId: number | null
  ownerDeptId: number | null
  createdBy: number | null
  updatedBy: number | null
}

export type MonitorPlanMinAggregateOutputType = {
  id: number | null
  planCode: string | null
  planName: string | null
  planType: string | null
  sourceTaskId: number | null
  ownerDeptId: number | null
  ownerDeptName: string | null
  startDate: Date | null
  endDate: Date | null
  status: $Enums.MonitorPlanStatus | null
  remark: string | null
  createdBy: number | null
  createdAt: Date | null
  updatedBy: number | null
  updatedAt: Date | null
  deletedFlag: boolean | null
}

export type MonitorPlanMaxAggregateOutputType = {
  id: number | null
  planCode: string | null
  planName: string | null
  planType: string | null
  sourceTaskId: number | null
  ownerDeptId: number | null
  ownerDeptName: string | null
  startDate: Date | null
  endDate: Date | null
  status: $Enums.MonitorPlanStatus | null
  remark: string | null
  createdBy: number | null
  createdAt: Date | null
  updatedBy: number | null
  updatedAt: Date | null
  deletedFlag: boolean | null
}

export type MonitorPlanCountAggregateOutputType = {
  id: number
  planCode: number
  planName: number
  planType: number
  sourceTaskId: number
  ownerDeptId: number
  ownerDeptName: number
  startDate: number
  endDate: number
  status: number
  remark: number
  createdBy: number
  createdAt: number
  updatedBy: number
  updatedAt: number
  deletedFlag: number
  _all: number
}


export type MonitorPlanAvgAggregateInputType = {
  id?: true
  sourceTaskId?: true
  ownerDeptId?: true
  createdBy?: true
  updatedBy?: true
}

export type MonitorPlanSumAggregateInputType = {
  id?: true
  sourceTaskId?: true
  ownerDeptId?: true
  createdBy?: true
  updatedBy?: true
}

export type MonitorPlanMinAggregateInputType = {
  id?: true
  planCode?: true
  planName?: true
  planType?: true
  sourceTaskId?: true
  ownerDeptId?: true
  ownerDeptName?: true
  startDate?: true
  endDate?: true
  status?: true
  remark?: true
  createdBy?: true
  createdAt?: true
  updatedBy?: true
  updatedAt?: true
  deletedFlag?: true
}

export type MonitorPlanMaxAggregateInputType = {
  id?: true
  planCode?: true
  planName?: true
  planType?: true
  sourceTaskId?: true
  ownerDeptId?: true
  ownerDeptName?: true
  startDate?: true
  endDate?: true
  status?: true
  remark?: true
  createdBy?: true
  createdAt?: true
  updatedBy?: true
  updatedAt?: true
  deletedFlag?: true
}

export type MonitorPlanCountAggregateInputType = {
  id?: true
  planCode?: true
  planName?: true
  planType?: true
  sourceTaskId?: true
  ownerDeptId?: true
  ownerDeptName?: true
  startDate?: true
  endDate?: true
  status?: true
  remark?: true
  createdBy?: true
  createdAt?: true
  updatedBy?: true
  updatedAt?: true
  deletedFlag?: true
  _all?: true
}

export type MonitorPlanAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which MonitorPlan to aggregate.
   */
  where?: Prisma.MonitorPlanWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of MonitorPlans to fetch.
   */
  orderBy?: Prisma.MonitorPlanOrderByWithRelationInput | Prisma.MonitorPlanOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.MonitorPlanWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` MonitorPlans 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` MonitorPlans.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned MonitorPlans
  **/
  _count?: true | MonitorPlanCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: MonitorPlanAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: MonitorPlanSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: MonitorPlanMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: MonitorPlanMaxAggregateInputType
}

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




export type MonitorPlanGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.MonitorPlanWhereInput
  orderBy?: Prisma.MonitorPlanOrderByWithAggregationInput | Prisma.MonitorPlanOrderByWithAggregationInput[]
  by: Prisma.MonitorPlanScalarFieldEnum[] | Prisma.MonitorPlanScalarFieldEnum
  having?: Prisma.MonitorPlanScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: MonitorPlanCountAggregateInputType | true
  _avg?: MonitorPlanAvgAggregateInputType
  _sum?: MonitorPlanSumAggregateInputType
  _min?: MonitorPlanMinAggregateInputType
  _max?: MonitorPlanMaxAggregateInputType
}

export type MonitorPlanGroupByOutputType = {
  id: number
  planCode: string
  planName: string
  planType: string | null
  sourceTaskId: number | null
  ownerDeptId: number
  ownerDeptName: string
  startDate: Date
  endDate: Date | null
  status: $Enums.MonitorPlanStatus
  remark: string | null
  createdBy: number | null
  createdAt: Date
  updatedBy: number | null
  updatedAt: Date
  deletedFlag: boolean
  _count: MonitorPlanCountAggregateOutputType | null
  _avg: MonitorPlanAvgAggregateOutputType | null
  _sum: MonitorPlanSumAggregateOutputType | null
  _min: MonitorPlanMinAggregateOutputType | null
  _max: MonitorPlanMaxAggregateOutputType | null
}

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



export type MonitorPlanWhereInput = {
  AND?: Prisma.MonitorPlanWhereInput | Prisma.MonitorPlanWhereInput[]
  OR?: Prisma.MonitorPlanWhereInput[]
  NOT?: Prisma.MonitorPlanWhereInput | Prisma.MonitorPlanWhereInput[]
  id?: Prisma.IntFilter<"MonitorPlan"> | number
  planCode?: Prisma.StringFilter<"MonitorPlan"> | string
  planName?: Prisma.StringFilter<"MonitorPlan"> | string
  planType?: Prisma.StringNullableFilter<"MonitorPlan"> | string | null
  sourceTaskId?: Prisma.IntNullableFilter<"MonitorPlan"> | number | null
  ownerDeptId?: Prisma.IntFilter<"MonitorPlan"> | number
  ownerDeptName?: Prisma.StringFilter<"MonitorPlan"> | string
  startDate?: Prisma.DateTimeFilter<"MonitorPlan"> | Date | string
  endDate?: Prisma.DateTimeNullableFilter<"MonitorPlan"> | Date | string | null
  status?: Prisma.EnumMonitorPlanStatusFilter<"MonitorPlan"> | $Enums.MonitorPlanStatus
  remark?: Prisma.StringNullableFilter<"MonitorPlan"> | string | null
  createdBy?: Prisma.IntNullableFilter<"MonitorPlan"> | number | null
  createdAt?: Prisma.DateTimeFilter<"MonitorPlan"> | Date | string
  updatedBy?: Prisma.IntNullableFilter<"MonitorPlan"> | number | null
  updatedAt?: Prisma.DateTimeFilter<"MonitorPlan"> | Date | string
  deletedFlag?: Prisma.BoolFilter<"MonitorPlan"> | boolean
  items?: Prisma.MonitorItemListRelationFilter
  instances?: Prisma.MonitorInstanceListRelationFilter
  operateLogs?: Prisma.MonitorOperateLogListRelationFilter
}

export type MonitorPlanOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  planCode?: Prisma.SortOrder
  planName?: Prisma.SortOrder
  planType?: Prisma.SortOrderInput | Prisma.SortOrder
  sourceTaskId?: Prisma.SortOrderInput | Prisma.SortOrder
  ownerDeptId?: Prisma.SortOrder
  ownerDeptName?: Prisma.SortOrder
  startDate?: Prisma.SortOrder
  endDate?: Prisma.SortOrderInput | Prisma.SortOrder
  status?: Prisma.SortOrder
  remark?: Prisma.SortOrderInput | Prisma.SortOrder
  createdBy?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedBy?: Prisma.SortOrderInput | Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  deletedFlag?: Prisma.SortOrder
  items?: Prisma.MonitorItemOrderByRelationAggregateInput
  instances?: Prisma.MonitorInstanceOrderByRelationAggregateInput
  operateLogs?: Prisma.MonitorOperateLogOrderByRelationAggregateInput
}

export type MonitorPlanWhereUniqueInput = Prisma.AtLeast<{
  id?: number
  planCode?: string
  AND?: Prisma.MonitorPlanWhereInput | Prisma.MonitorPlanWhereInput[]
  OR?: Prisma.MonitorPlanWhereInput[]
  NOT?: Prisma.MonitorPlanWhereInput | Prisma.MonitorPlanWhereInput[]
  planName?: Prisma.StringFilter<"MonitorPlan"> | string
  planType?: Prisma.StringNullableFilter<"MonitorPlan"> | string | null
  sourceTaskId?: Prisma.IntNullableFilter<"MonitorPlan"> | number | null
  ownerDeptId?: Prisma.IntFilter<"MonitorPlan"> | number
  ownerDeptName?: Prisma.StringFilter<"MonitorPlan"> | string
  startDate?: Prisma.DateTimeFilter<"MonitorPlan"> | Date | string
  endDate?: Prisma.DateTimeNullableFilter<"MonitorPlan"> | Date | string | null
  status?: Prisma.EnumMonitorPlanStatusFilter<"MonitorPlan"> | $Enums.MonitorPlanStatus
  remark?: Prisma.StringNullableFilter<"MonitorPlan"> | string | null
  createdBy?: Prisma.IntNullableFilter<"MonitorPlan"> | number | null
  createdAt?: Prisma.DateTimeFilter<"MonitorPlan"> | Date | string
  updatedBy?: Prisma.IntNullableFilter<"MonitorPlan"> | number | null
  updatedAt?: Prisma.DateTimeFilter<"MonitorPlan"> | Date | string
  deletedFlag?: Prisma.BoolFilter<"MonitorPlan"> | boolean
  items?: Prisma.MonitorItemListRelationFilter
  instances?: Prisma.MonitorInstanceListRelationFilter
  operateLogs?: Prisma.MonitorOperateLogListRelationFilter
}, "id" | "planCode">

export type MonitorPlanOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  planCode?: Prisma.SortOrder
  planName?: Prisma.SortOrder
  planType?: Prisma.SortOrderInput | Prisma.SortOrder
  sourceTaskId?: Prisma.SortOrderInput | Prisma.SortOrder
  ownerDeptId?: Prisma.SortOrder
  ownerDeptName?: Prisma.SortOrder
  startDate?: Prisma.SortOrder
  endDate?: Prisma.SortOrderInput | Prisma.SortOrder
  status?: Prisma.SortOrder
  remark?: Prisma.SortOrderInput | Prisma.SortOrder
  createdBy?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedBy?: Prisma.SortOrderInput | Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  deletedFlag?: Prisma.SortOrder
  _count?: Prisma.MonitorPlanCountOrderByAggregateInput
  _avg?: Prisma.MonitorPlanAvgOrderByAggregateInput
  _max?: Prisma.MonitorPlanMaxOrderByAggregateInput
  _min?: Prisma.MonitorPlanMinOrderByAggregateInput
  _sum?: Prisma.MonitorPlanSumOrderByAggregateInput
}

export type MonitorPlanScalarWhereWithAggregatesInput = {
  AND?: Prisma.MonitorPlanScalarWhereWithAggregatesInput | Prisma.MonitorPlanScalarWhereWithAggregatesInput[]
  OR?: Prisma.MonitorPlanScalarWhereWithAggregatesInput[]
  NOT?: Prisma.MonitorPlanScalarWhereWithAggregatesInput | Prisma.MonitorPlanScalarWhereWithAggregatesInput[]
  id?: Prisma.IntWithAggregatesFilter<"MonitorPlan"> | number
  planCode?: Prisma.StringWithAggregatesFilter<"MonitorPlan"> | string
  planName?: Prisma.StringWithAggregatesFilter<"MonitorPlan"> | string
  planType?: Prisma.StringNullableWithAggregatesFilter<"MonitorPlan"> | string | null
  sourceTaskId?: Prisma.IntNullableWithAggregatesFilter<"MonitorPlan"> | number | null
  ownerDeptId?: Prisma.IntWithAggregatesFilter<"MonitorPlan"> | number
  ownerDeptName?: Prisma.StringWithAggregatesFilter<"MonitorPlan"> | string
  startDate?: Prisma.DateTimeWithAggregatesFilter<"MonitorPlan"> | Date | string
  endDate?: Prisma.DateTimeNullableWithAggregatesFilter<"MonitorPlan"> | Date | string | null
  status?: Prisma.EnumMonitorPlanStatusWithAggregatesFilter<"MonitorPlan"> | $Enums.MonitorPlanStatus
  remark?: Prisma.StringNullableWithAggregatesFilter<"MonitorPlan"> | string | null
  createdBy?: Prisma.IntNullableWithAggregatesFilter<"MonitorPlan"> | number | null
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"MonitorPlan"> | Date | string
  updatedBy?: Prisma.IntNullableWithAggregatesFilter<"MonitorPlan"> | number | null
  updatedAt?: Prisma.DateTimeWithAggregatesFilter<"MonitorPlan"> | Date | string
  deletedFlag?: Prisma.BoolWithAggregatesFilter<"MonitorPlan"> | boolean
}

export type MonitorPlanCreateInput = {
  planCode: string
  planName: string
  planType?: string | null
  sourceTaskId?: number | null
  ownerDeptId: number
  ownerDeptName: string
  startDate: Date | string
  endDate?: Date | string | null
  status?: $Enums.MonitorPlanStatus
  remark?: string | null
  createdBy?: number | null
  createdAt?: Date | string
  updatedBy?: number | null
  updatedAt?: Date | string
  deletedFlag?: boolean
  items?: Prisma.MonitorItemCreateNestedManyWithoutPlanInput
  instances?: Prisma.MonitorInstanceCreateNestedManyWithoutPlanInput
  operateLogs?: Prisma.MonitorOperateLogCreateNestedManyWithoutPlanInput
}

export type MonitorPlanUncheckedCreateInput = {
  id?: number
  planCode: string
  planName: string
  planType?: string | null
  sourceTaskId?: number | null
  ownerDeptId: number
  ownerDeptName: string
  startDate: Date | string
  endDate?: Date | string | null
  status?: $Enums.MonitorPlanStatus
  remark?: string | null
  createdBy?: number | null
  createdAt?: Date | string
  updatedBy?: number | null
  updatedAt?: Date | string
  deletedFlag?: boolean
  items?: Prisma.MonitorItemUncheckedCreateNestedManyWithoutPlanInput
  instances?: Prisma.MonitorInstanceUncheckedCreateNestedManyWithoutPlanInput
  operateLogs?: Prisma.MonitorOperateLogUncheckedCreateNestedManyWithoutPlanInput
}

export type MonitorPlanUpdateInput = {
  planCode?: Prisma.StringFieldUpdateOperationsInput | string
  planName?: Prisma.StringFieldUpdateOperationsInput | string
  planType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sourceTaskId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  ownerDeptId?: Prisma.IntFieldUpdateOperationsInput | number
  ownerDeptName?: Prisma.StringFieldUpdateOperationsInput | string
  startDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  status?: Prisma.EnumMonitorPlanStatusFieldUpdateOperationsInput | $Enums.MonitorPlanStatus
  remark?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  deletedFlag?: Prisma.BoolFieldUpdateOperationsInput | boolean
  items?: Prisma.MonitorItemUpdateManyWithoutPlanNestedInput
  instances?: Prisma.MonitorInstanceUpdateManyWithoutPlanNestedInput
  operateLogs?: Prisma.MonitorOperateLogUpdateManyWithoutPlanNestedInput
}

export type MonitorPlanUncheckedUpdateInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  planCode?: Prisma.StringFieldUpdateOperationsInput | string
  planName?: Prisma.StringFieldUpdateOperationsInput | string
  planType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sourceTaskId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  ownerDeptId?: Prisma.IntFieldUpdateOperationsInput | number
  ownerDeptName?: Prisma.StringFieldUpdateOperationsInput | string
  startDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  status?: Prisma.EnumMonitorPlanStatusFieldUpdateOperationsInput | $Enums.MonitorPlanStatus
  remark?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  deletedFlag?: Prisma.BoolFieldUpdateOperationsInput | boolean
  items?: Prisma.MonitorItemUncheckedUpdateManyWithoutPlanNestedInput
  instances?: Prisma.MonitorInstanceUncheckedUpdateManyWithoutPlanNestedInput
  operateLogs?: Prisma.MonitorOperateLogUncheckedUpdateManyWithoutPlanNestedInput
}

export type MonitorPlanCreateManyInput = {
  id?: number
  planCode: string
  planName: string
  planType?: string | null
  sourceTaskId?: number | null
  ownerDeptId: number
  ownerDeptName: string
  startDate: Date | string
  endDate?: Date | string | null
  status?: $Enums.MonitorPlanStatus
  remark?: string | null
  createdBy?: number | null
  createdAt?: Date | string
  updatedBy?: number | null
  updatedAt?: Date | string
  deletedFlag?: boolean
}

export type MonitorPlanUpdateManyMutationInput = {
  planCode?: Prisma.StringFieldUpdateOperationsInput | string
  planName?: Prisma.StringFieldUpdateOperationsInput | string
  planType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sourceTaskId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  ownerDeptId?: Prisma.IntFieldUpdateOperationsInput | number
  ownerDeptName?: Prisma.StringFieldUpdateOperationsInput | string
  startDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  status?: Prisma.EnumMonitorPlanStatusFieldUpdateOperationsInput | $Enums.MonitorPlanStatus
  remark?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  deletedFlag?: Prisma.BoolFieldUpdateOperationsInput | boolean
}

export type MonitorPlanUncheckedUpdateManyInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  planCode?: Prisma.StringFieldUpdateOperationsInput | string
  planName?: Prisma.StringFieldUpdateOperationsInput | string
  planType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sourceTaskId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  ownerDeptId?: Prisma.IntFieldUpdateOperationsInput | number
  ownerDeptName?: Prisma.StringFieldUpdateOperationsInput | string
  startDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  status?: Prisma.EnumMonitorPlanStatusFieldUpdateOperationsInput | $Enums.MonitorPlanStatus
  remark?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  deletedFlag?: Prisma.BoolFieldUpdateOperationsInput | boolean
}

export type MonitorPlanCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  planCode?: Prisma.SortOrder
  planName?: Prisma.SortOrder
  planType?: Prisma.SortOrder
  sourceTaskId?: Prisma.SortOrder
  ownerDeptId?: Prisma.SortOrder
  ownerDeptName?: Prisma.SortOrder
  startDate?: Prisma.SortOrder
  endDate?: Prisma.SortOrder
  status?: Prisma.SortOrder
  remark?: Prisma.SortOrder
  createdBy?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedBy?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  deletedFlag?: Prisma.SortOrder
}

export type MonitorPlanAvgOrderByAggregateInput = {
  id?: Prisma.SortOrder
  sourceTaskId?: Prisma.SortOrder
  ownerDeptId?: Prisma.SortOrder
  createdBy?: Prisma.SortOrder
  updatedBy?: Prisma.SortOrder
}

export type MonitorPlanMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  planCode?: Prisma.SortOrder
  planName?: Prisma.SortOrder
  planType?: Prisma.SortOrder
  sourceTaskId?: Prisma.SortOrder
  ownerDeptId?: Prisma.SortOrder
  ownerDeptName?: Prisma.SortOrder
  startDate?: Prisma.SortOrder
  endDate?: Prisma.SortOrder
  status?: Prisma.SortOrder
  remark?: Prisma.SortOrder
  createdBy?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedBy?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  deletedFlag?: Prisma.SortOrder
}

export type MonitorPlanMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  planCode?: Prisma.SortOrder
  planName?: Prisma.SortOrder
  planType?: Prisma.SortOrder
  sourceTaskId?: Prisma.SortOrder
  ownerDeptId?: Prisma.SortOrder
  ownerDeptName?: Prisma.SortOrder
  startDate?: Prisma.SortOrder
  endDate?: Prisma.SortOrder
  status?: Prisma.SortOrder
  remark?: Prisma.SortOrder
  createdBy?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedBy?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  deletedFlag?: Prisma.SortOrder
}

export type MonitorPlanSumOrderByAggregateInput = {
  id?: Prisma.SortOrder
  sourceTaskId?: Prisma.SortOrder
  ownerDeptId?: Prisma.SortOrder
  createdBy?: Prisma.SortOrder
  updatedBy?: Prisma.SortOrder
}

export type MonitorPlanScalarRelationFilter = {
  is?: Prisma.MonitorPlanWhereInput
  isNot?: Prisma.MonitorPlanWhereInput
}

export type MonitorPlanNullableScalarRelationFilter = {
  is?: Prisma.MonitorPlanWhereInput | null
  isNot?: Prisma.MonitorPlanWhereInput | null
}

export type EnumMonitorPlanStatusFieldUpdateOperationsInput = {
  set?: $Enums.MonitorPlanStatus
}

export type MonitorPlanCreateNestedOneWithoutItemsInput = {
  create?: Prisma.XOR<Prisma.MonitorPlanCreateWithoutItemsInput, Prisma.MonitorPlanUncheckedCreateWithoutItemsInput>
  connectOrCreate?: Prisma.MonitorPlanCreateOrConnectWithoutItemsInput
  connect?: Prisma.MonitorPlanWhereUniqueInput
}

export type MonitorPlanUpdateOneRequiredWithoutItemsNestedInput = {
  create?: Prisma.XOR<Prisma.MonitorPlanCreateWithoutItemsInput, Prisma.MonitorPlanUncheckedCreateWithoutItemsInput>
  connectOrCreate?: Prisma.MonitorPlanCreateOrConnectWithoutItemsInput
  upsert?: Prisma.MonitorPlanUpsertWithoutItemsInput
  connect?: Prisma.MonitorPlanWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.MonitorPlanUpdateToOneWithWhereWithoutItemsInput, Prisma.MonitorPlanUpdateWithoutItemsInput>, Prisma.MonitorPlanUncheckedUpdateWithoutItemsInput>
}

export type MonitorPlanCreateNestedOneWithoutInstancesInput = {
  create?: Prisma.XOR<Prisma.MonitorPlanCreateWithoutInstancesInput, Prisma.MonitorPlanUncheckedCreateWithoutInstancesInput>
  connectOrCreate?: Prisma.MonitorPlanCreateOrConnectWithoutInstancesInput
  connect?: Prisma.MonitorPlanWhereUniqueInput
}

export type MonitorPlanUpdateOneRequiredWithoutInstancesNestedInput = {
  create?: Prisma.XOR<Prisma.MonitorPlanCreateWithoutInstancesInput, Prisma.MonitorPlanUncheckedCreateWithoutInstancesInput>
  connectOrCreate?: Prisma.MonitorPlanCreateOrConnectWithoutInstancesInput
  upsert?: Prisma.MonitorPlanUpsertWithoutInstancesInput
  connect?: Prisma.MonitorPlanWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.MonitorPlanUpdateToOneWithWhereWithoutInstancesInput, Prisma.MonitorPlanUpdateWithoutInstancesInput>, Prisma.MonitorPlanUncheckedUpdateWithoutInstancesInput>
}

export type MonitorPlanCreateNestedOneWithoutOperateLogsInput = {
  create?: Prisma.XOR<Prisma.MonitorPlanCreateWithoutOperateLogsInput, Prisma.MonitorPlanUncheckedCreateWithoutOperateLogsInput>
  connectOrCreate?: Prisma.MonitorPlanCreateOrConnectWithoutOperateLogsInput
  connect?: Prisma.MonitorPlanWhereUniqueInput
}

export type MonitorPlanUpdateOneWithoutOperateLogsNestedInput = {
  create?: Prisma.XOR<Prisma.MonitorPlanCreateWithoutOperateLogsInput, Prisma.MonitorPlanUncheckedCreateWithoutOperateLogsInput>
  connectOrCreate?: Prisma.MonitorPlanCreateOrConnectWithoutOperateLogsInput
  upsert?: Prisma.MonitorPlanUpsertWithoutOperateLogsInput
  disconnect?: Prisma.MonitorPlanWhereInput | boolean
  delete?: Prisma.MonitorPlanWhereInput | boolean
  connect?: Prisma.MonitorPlanWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.MonitorPlanUpdateToOneWithWhereWithoutOperateLogsInput, Prisma.MonitorPlanUpdateWithoutOperateLogsInput>, Prisma.MonitorPlanUncheckedUpdateWithoutOperateLogsInput>
}

export type MonitorPlanCreateWithoutItemsInput = {
  planCode: string
  planName: string
  planType?: string | null
  sourceTaskId?: number | null
  ownerDeptId: number
  ownerDeptName: string
  startDate: Date | string
  endDate?: Date | string | null
  status?: $Enums.MonitorPlanStatus
  remark?: string | null
  createdBy?: number | null
  createdAt?: Date | string
  updatedBy?: number | null
  updatedAt?: Date | string
  deletedFlag?: boolean
  instances?: Prisma.MonitorInstanceCreateNestedManyWithoutPlanInput
  operateLogs?: Prisma.MonitorOperateLogCreateNestedManyWithoutPlanInput
}

export type MonitorPlanUncheckedCreateWithoutItemsInput = {
  id?: number
  planCode: string
  planName: string
  planType?: string | null
  sourceTaskId?: number | null
  ownerDeptId: number
  ownerDeptName: string
  startDate: Date | string
  endDate?: Date | string | null
  status?: $Enums.MonitorPlanStatus
  remark?: string | null
  createdBy?: number | null
  createdAt?: Date | string
  updatedBy?: number | null
  updatedAt?: Date | string
  deletedFlag?: boolean
  instances?: Prisma.MonitorInstanceUncheckedCreateNestedManyWithoutPlanInput
  operateLogs?: Prisma.MonitorOperateLogUncheckedCreateNestedManyWithoutPlanInput
}

export type MonitorPlanCreateOrConnectWithoutItemsInput = {
  where: Prisma.MonitorPlanWhereUniqueInput
  create: Prisma.XOR<Prisma.MonitorPlanCreateWithoutItemsInput, Prisma.MonitorPlanUncheckedCreateWithoutItemsInput>
}

export type MonitorPlanUpsertWithoutItemsInput = {
  update: Prisma.XOR<Prisma.MonitorPlanUpdateWithoutItemsInput, Prisma.MonitorPlanUncheckedUpdateWithoutItemsInput>
  create: Prisma.XOR<Prisma.MonitorPlanCreateWithoutItemsInput, Prisma.MonitorPlanUncheckedCreateWithoutItemsInput>
  where?: Prisma.MonitorPlanWhereInput
}

export type MonitorPlanUpdateToOneWithWhereWithoutItemsInput = {
  where?: Prisma.MonitorPlanWhereInput
  data: Prisma.XOR<Prisma.MonitorPlanUpdateWithoutItemsInput, Prisma.MonitorPlanUncheckedUpdateWithoutItemsInput>
}

export type MonitorPlanUpdateWithoutItemsInput = {
  planCode?: Prisma.StringFieldUpdateOperationsInput | string
  planName?: Prisma.StringFieldUpdateOperationsInput | string
  planType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sourceTaskId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  ownerDeptId?: Prisma.IntFieldUpdateOperationsInput | number
  ownerDeptName?: Prisma.StringFieldUpdateOperationsInput | string
  startDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  status?: Prisma.EnumMonitorPlanStatusFieldUpdateOperationsInput | $Enums.MonitorPlanStatus
  remark?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  deletedFlag?: Prisma.BoolFieldUpdateOperationsInput | boolean
  instances?: Prisma.MonitorInstanceUpdateManyWithoutPlanNestedInput
  operateLogs?: Prisma.MonitorOperateLogUpdateManyWithoutPlanNestedInput
}

export type MonitorPlanUncheckedUpdateWithoutItemsInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  planCode?: Prisma.StringFieldUpdateOperationsInput | string
  planName?: Prisma.StringFieldUpdateOperationsInput | string
  planType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sourceTaskId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  ownerDeptId?: Prisma.IntFieldUpdateOperationsInput | number
  ownerDeptName?: Prisma.StringFieldUpdateOperationsInput | string
  startDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  status?: Prisma.EnumMonitorPlanStatusFieldUpdateOperationsInput | $Enums.MonitorPlanStatus
  remark?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  deletedFlag?: Prisma.BoolFieldUpdateOperationsInput | boolean
  instances?: Prisma.MonitorInstanceUncheckedUpdateManyWithoutPlanNestedInput
  operateLogs?: Prisma.MonitorOperateLogUncheckedUpdateManyWithoutPlanNestedInput
}

export type MonitorPlanCreateWithoutInstancesInput = {
  planCode: string
  planName: string
  planType?: string | null
  sourceTaskId?: number | null
  ownerDeptId: number
  ownerDeptName: string
  startDate: Date | string
  endDate?: Date | string | null
  status?: $Enums.MonitorPlanStatus
  remark?: string | null
  createdBy?: number | null
  createdAt?: Date | string
  updatedBy?: number | null
  updatedAt?: Date | string
  deletedFlag?: boolean
  items?: Prisma.MonitorItemCreateNestedManyWithoutPlanInput
  operateLogs?: Prisma.MonitorOperateLogCreateNestedManyWithoutPlanInput
}

export type MonitorPlanUncheckedCreateWithoutInstancesInput = {
  id?: number
  planCode: string
  planName: string
  planType?: string | null
  sourceTaskId?: number | null
  ownerDeptId: number
  ownerDeptName: string
  startDate: Date | string
  endDate?: Date | string | null
  status?: $Enums.MonitorPlanStatus
  remark?: string | null
  createdBy?: number | null
  createdAt?: Date | string
  updatedBy?: number | null
  updatedAt?: Date | string
  deletedFlag?: boolean
  items?: Prisma.MonitorItemUncheckedCreateNestedManyWithoutPlanInput
  operateLogs?: Prisma.MonitorOperateLogUncheckedCreateNestedManyWithoutPlanInput
}

export type MonitorPlanCreateOrConnectWithoutInstancesInput = {
  where: Prisma.MonitorPlanWhereUniqueInput
  create: Prisma.XOR<Prisma.MonitorPlanCreateWithoutInstancesInput, Prisma.MonitorPlanUncheckedCreateWithoutInstancesInput>
}

export type MonitorPlanUpsertWithoutInstancesInput = {
  update: Prisma.XOR<Prisma.MonitorPlanUpdateWithoutInstancesInput, Prisma.MonitorPlanUncheckedUpdateWithoutInstancesInput>
  create: Prisma.XOR<Prisma.MonitorPlanCreateWithoutInstancesInput, Prisma.MonitorPlanUncheckedCreateWithoutInstancesInput>
  where?: Prisma.MonitorPlanWhereInput
}

export type MonitorPlanUpdateToOneWithWhereWithoutInstancesInput = {
  where?: Prisma.MonitorPlanWhereInput
  data: Prisma.XOR<Prisma.MonitorPlanUpdateWithoutInstancesInput, Prisma.MonitorPlanUncheckedUpdateWithoutInstancesInput>
}

export type MonitorPlanUpdateWithoutInstancesInput = {
  planCode?: Prisma.StringFieldUpdateOperationsInput | string
  planName?: Prisma.StringFieldUpdateOperationsInput | string
  planType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sourceTaskId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  ownerDeptId?: Prisma.IntFieldUpdateOperationsInput | number
  ownerDeptName?: Prisma.StringFieldUpdateOperationsInput | string
  startDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  status?: Prisma.EnumMonitorPlanStatusFieldUpdateOperationsInput | $Enums.MonitorPlanStatus
  remark?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  deletedFlag?: Prisma.BoolFieldUpdateOperationsInput | boolean
  items?: Prisma.MonitorItemUpdateManyWithoutPlanNestedInput
  operateLogs?: Prisma.MonitorOperateLogUpdateManyWithoutPlanNestedInput
}

export type MonitorPlanUncheckedUpdateWithoutInstancesInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  planCode?: Prisma.StringFieldUpdateOperationsInput | string
  planName?: Prisma.StringFieldUpdateOperationsInput | string
  planType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sourceTaskId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  ownerDeptId?: Prisma.IntFieldUpdateOperationsInput | number
  ownerDeptName?: Prisma.StringFieldUpdateOperationsInput | string
  startDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  status?: Prisma.EnumMonitorPlanStatusFieldUpdateOperationsInput | $Enums.MonitorPlanStatus
  remark?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  deletedFlag?: Prisma.BoolFieldUpdateOperationsInput | boolean
  items?: Prisma.MonitorItemUncheckedUpdateManyWithoutPlanNestedInput
  operateLogs?: Prisma.MonitorOperateLogUncheckedUpdateManyWithoutPlanNestedInput
}

export type MonitorPlanCreateWithoutOperateLogsInput = {
  planCode: string
  planName: string
  planType?: string | null
  sourceTaskId?: number | null
  ownerDeptId: number
  ownerDeptName: string
  startDate: Date | string
  endDate?: Date | string | null
  status?: $Enums.MonitorPlanStatus
  remark?: string | null
  createdBy?: number | null
  createdAt?: Date | string
  updatedBy?: number | null
  updatedAt?: Date | string
  deletedFlag?: boolean
  items?: Prisma.MonitorItemCreateNestedManyWithoutPlanInput
  instances?: Prisma.MonitorInstanceCreateNestedManyWithoutPlanInput
}

export type MonitorPlanUncheckedCreateWithoutOperateLogsInput = {
  id?: number
  planCode: string
  planName: string
  planType?: string | null
  sourceTaskId?: number | null
  ownerDeptId: number
  ownerDeptName: string
  startDate: Date | string
  endDate?: Date | string | null
  status?: $Enums.MonitorPlanStatus
  remark?: string | null
  createdBy?: number | null
  createdAt?: Date | string
  updatedBy?: number | null
  updatedAt?: Date | string
  deletedFlag?: boolean
  items?: Prisma.MonitorItemUncheckedCreateNestedManyWithoutPlanInput
  instances?: Prisma.MonitorInstanceUncheckedCreateNestedManyWithoutPlanInput
}

export type MonitorPlanCreateOrConnectWithoutOperateLogsInput = {
  where: Prisma.MonitorPlanWhereUniqueInput
  create: Prisma.XOR<Prisma.MonitorPlanCreateWithoutOperateLogsInput, Prisma.MonitorPlanUncheckedCreateWithoutOperateLogsInput>
}

export type MonitorPlanUpsertWithoutOperateLogsInput = {
  update: Prisma.XOR<Prisma.MonitorPlanUpdateWithoutOperateLogsInput, Prisma.MonitorPlanUncheckedUpdateWithoutOperateLogsInput>
  create: Prisma.XOR<Prisma.MonitorPlanCreateWithoutOperateLogsInput, Prisma.MonitorPlanUncheckedCreateWithoutOperateLogsInput>
  where?: Prisma.MonitorPlanWhereInput
}

export type MonitorPlanUpdateToOneWithWhereWithoutOperateLogsInput = {
  where?: Prisma.MonitorPlanWhereInput
  data: Prisma.XOR<Prisma.MonitorPlanUpdateWithoutOperateLogsInput, Prisma.MonitorPlanUncheckedUpdateWithoutOperateLogsInput>
}

export type MonitorPlanUpdateWithoutOperateLogsInput = {
  planCode?: Prisma.StringFieldUpdateOperationsInput | string
  planName?: Prisma.StringFieldUpdateOperationsInput | string
  planType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sourceTaskId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  ownerDeptId?: Prisma.IntFieldUpdateOperationsInput | number
  ownerDeptName?: Prisma.StringFieldUpdateOperationsInput | string
  startDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  status?: Prisma.EnumMonitorPlanStatusFieldUpdateOperationsInput | $Enums.MonitorPlanStatus
  remark?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  deletedFlag?: Prisma.BoolFieldUpdateOperationsInput | boolean
  items?: Prisma.MonitorItemUpdateManyWithoutPlanNestedInput
  instances?: Prisma.MonitorInstanceUpdateManyWithoutPlanNestedInput
}

export type MonitorPlanUncheckedUpdateWithoutOperateLogsInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  planCode?: Prisma.StringFieldUpdateOperationsInput | string
  planName?: Prisma.StringFieldUpdateOperationsInput | string
  planType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sourceTaskId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  ownerDeptId?: Prisma.IntFieldUpdateOperationsInput | number
  ownerDeptName?: Prisma.StringFieldUpdateOperationsInput | string
  startDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  status?: Prisma.EnumMonitorPlanStatusFieldUpdateOperationsInput | $Enums.MonitorPlanStatus
  remark?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedBy?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  deletedFlag?: Prisma.BoolFieldUpdateOperationsInput | boolean
  items?: Prisma.MonitorItemUncheckedUpdateManyWithoutPlanNestedInput
  instances?: Prisma.MonitorInstanceUncheckedUpdateManyWithoutPlanNestedInput
}


/**
 * Count Type MonitorPlanCountOutputType
 */

export type MonitorPlanCountOutputType = {
  items: number
  instances: number
  operateLogs: number
}

export type MonitorPlanCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  items?: boolean | MonitorPlanCountOutputTypeCountItemsArgs
  instances?: boolean | MonitorPlanCountOutputTypeCountInstancesArgs
  operateLogs?: boolean | MonitorPlanCountOutputTypeCountOperateLogsArgs
}

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

/**
 * MonitorPlanCountOutputType without action
 */
export type MonitorPlanCountOutputTypeCountItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.MonitorItemWhereInput
}

/**
 * MonitorPlanCountOutputType without action
 */
export type MonitorPlanCountOutputTypeCountInstancesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.MonitorInstanceWhereInput
}

/**
 * MonitorPlanCountOutputType without action
 */
export type MonitorPlanCountOutputTypeCountOperateLogsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.MonitorOperateLogWhereInput
}


export type MonitorPlanSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  planCode?: boolean
  planName?: boolean
  planType?: boolean
  sourceTaskId?: boolean
  ownerDeptId?: boolean
  ownerDeptName?: boolean
  startDate?: boolean
  endDate?: boolean
  status?: boolean
  remark?: boolean
  createdBy?: boolean
  createdAt?: boolean
  updatedBy?: boolean
  updatedAt?: boolean
  deletedFlag?: boolean
  items?: boolean | Prisma.MonitorPlan$itemsArgs<ExtArgs>
  instances?: boolean | Prisma.MonitorPlan$instancesArgs<ExtArgs>
  operateLogs?: boolean | Prisma.MonitorPlan$operateLogsArgs<ExtArgs>
  _count?: boolean | Prisma.MonitorPlanCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["monitorPlan"]>

export type MonitorPlanSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  planCode?: boolean
  planName?: boolean
  planType?: boolean
  sourceTaskId?: boolean
  ownerDeptId?: boolean
  ownerDeptName?: boolean
  startDate?: boolean
  endDate?: boolean
  status?: boolean
  remark?: boolean
  createdBy?: boolean
  createdAt?: boolean
  updatedBy?: boolean
  updatedAt?: boolean
  deletedFlag?: boolean
}, ExtArgs["result"]["monitorPlan"]>

export type MonitorPlanSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  planCode?: boolean
  planName?: boolean
  planType?: boolean
  sourceTaskId?: boolean
  ownerDeptId?: boolean
  ownerDeptName?: boolean
  startDate?: boolean
  endDate?: boolean
  status?: boolean
  remark?: boolean
  createdBy?: boolean
  createdAt?: boolean
  updatedBy?: boolean
  updatedAt?: boolean
  deletedFlag?: boolean
}, ExtArgs["result"]["monitorPlan"]>

export type MonitorPlanSelectScalar = {
  id?: boolean
  planCode?: boolean
  planName?: boolean
  planType?: boolean
  sourceTaskId?: boolean
  ownerDeptId?: boolean
  ownerDeptName?: boolean
  startDate?: boolean
  endDate?: boolean
  status?: boolean
  remark?: boolean
  createdBy?: boolean
  createdAt?: boolean
  updatedBy?: boolean
  updatedAt?: boolean
  deletedFlag?: boolean
}

export type MonitorPlanOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "planCode" | "planName" | "planType" | "sourceTaskId" | "ownerDeptId" | "ownerDeptName" | "startDate" | "endDate" | "status" | "remark" | "createdBy" | "createdAt" | "updatedBy" | "updatedAt" | "deletedFlag", ExtArgs["result"]["monitorPlan"]>
export type MonitorPlanInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  items?: boolean | Prisma.MonitorPlan$itemsArgs<ExtArgs>
  instances?: boolean | Prisma.MonitorPlan$instancesArgs<ExtArgs>
  operateLogs?: boolean | Prisma.MonitorPlan$operateLogsArgs<ExtArgs>
  _count?: boolean | Prisma.MonitorPlanCountOutputTypeDefaultArgs<ExtArgs>
}
export type MonitorPlanIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}
export type MonitorPlanIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}

export type $MonitorPlanPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "MonitorPlan"
  objects: {
    items: Prisma.$MonitorItemPayload<ExtArgs>[]
    instances: Prisma.$MonitorInstancePayload<ExtArgs>[]
    operateLogs: Prisma.$MonitorOperateLogPayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: number
    planCode: string
    planName: string
    planType: string | null
    sourceTaskId: number | null
    ownerDeptId: number
    ownerDeptName: string
    startDate: Date
    endDate: Date | null
    status: $Enums.MonitorPlanStatus
    remark: string | null
    createdBy: number | null
    createdAt: Date
    updatedBy: number | null
    updatedAt: Date
    deletedFlag: boolean
  }, ExtArgs["result"]["monitorPlan"]>
  composites: {}
}

export type MonitorPlanGetPayload<S extends boolean | null | undefined | MonitorPlanDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$MonitorPlanPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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




/**
 * Fields of the MonitorPlan model
 */
export interface MonitorPlanFieldRefs {
  readonly id: Prisma.FieldRef<"MonitorPlan", 'Int'>
  readonly planCode: Prisma.FieldRef<"MonitorPlan", 'String'>
  readonly planName: Prisma.FieldRef<"MonitorPlan", 'String'>
  readonly planType: Prisma.FieldRef<"MonitorPlan", 'String'>
  readonly sourceTaskId: Prisma.FieldRef<"MonitorPlan", 'Int'>
  readonly ownerDeptId: Prisma.FieldRef<"MonitorPlan", 'Int'>
  readonly ownerDeptName: Prisma.FieldRef<"MonitorPlan", 'String'>
  readonly startDate: Prisma.FieldRef<"MonitorPlan", 'DateTime'>
  readonly endDate: Prisma.FieldRef<"MonitorPlan", 'DateTime'>
  readonly status: Prisma.FieldRef<"MonitorPlan", 'MonitorPlanStatus'>
  readonly remark: Prisma.FieldRef<"MonitorPlan", 'String'>
  readonly createdBy: Prisma.FieldRef<"MonitorPlan", 'Int'>
  readonly createdAt: Prisma.FieldRef<"MonitorPlan", 'DateTime'>
  readonly updatedBy: Prisma.FieldRef<"MonitorPlan", 'Int'>
  readonly updatedAt: Prisma.FieldRef<"MonitorPlan", 'DateTime'>
  readonly deletedFlag: Prisma.FieldRef<"MonitorPlan", 'Boolean'>
}
    

// Custom InputTypes
/**
 * MonitorPlan findUnique
 */
export type MonitorPlanFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the MonitorPlan
   */
  select?: Prisma.MonitorPlanSelect<ExtArgs> | null
  /**
   * Omit specific fields from the MonitorPlan
   */
  omit?: Prisma.MonitorPlanOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.MonitorPlanInclude<ExtArgs> | null
  /**
   * Filter, which MonitorPlan to fetch.
   */
  where: Prisma.MonitorPlanWhereUniqueInput
}

/**
 * MonitorPlan findUniqueOrThrow
 */
export type MonitorPlanFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the MonitorPlan
   */
  select?: Prisma.MonitorPlanSelect<ExtArgs> | null
  /**
   * Omit specific fields from the MonitorPlan
   */
  omit?: Prisma.MonitorPlanOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.MonitorPlanInclude<ExtArgs> | null
  /**
   * Filter, which MonitorPlan to fetch.
   */
  where: Prisma.MonitorPlanWhereUniqueInput
}

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

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

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

/**
 * MonitorPlan create
 */
export type MonitorPlanCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the MonitorPlan
   */
  select?: Prisma.MonitorPlanSelect<ExtArgs> | null
  /**
   * Omit specific fields from the MonitorPlan
   */
  omit?: Prisma.MonitorPlanOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.MonitorPlanInclude<ExtArgs> | null
  /**
   * The data needed to create a MonitorPlan.
   */
  data: Prisma.XOR<Prisma.MonitorPlanCreateInput, Prisma.MonitorPlanUncheckedCreateInput>
}

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

/**
 * MonitorPlan createManyAndReturn
 */
export type MonitorPlanCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the MonitorPlan
   */
  select?: Prisma.MonitorPlanSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the MonitorPlan
   */
  omit?: Prisma.MonitorPlanOmit<ExtArgs> | null
  /**
   * The data used to create many MonitorPlans.
   */
  data: Prisma.MonitorPlanCreateManyInput | Prisma.MonitorPlanCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * MonitorPlan update
 */
export type MonitorPlanUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the MonitorPlan
   */
  select?: Prisma.MonitorPlanSelect<ExtArgs> | null
  /**
   * Omit specific fields from the MonitorPlan
   */
  omit?: Prisma.MonitorPlanOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.MonitorPlanInclude<ExtArgs> | null
  /**
   * The data needed to update a MonitorPlan.
   */
  data: Prisma.XOR<Prisma.MonitorPlanUpdateInput, Prisma.MonitorPlanUncheckedUpdateInput>
  /**
   * Choose, which MonitorPlan to update.
   */
  where: Prisma.MonitorPlanWhereUniqueInput
}

/**
 * MonitorPlan updateMany
 */
export type MonitorPlanUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update MonitorPlans.
   */
  data: Prisma.XOR<Prisma.MonitorPlanUpdateManyMutationInput, Prisma.MonitorPlanUncheckedUpdateManyInput>
  /**
   * Filter which MonitorPlans to update
   */
  where?: Prisma.MonitorPlanWhereInput
  /**
   * Limit how many MonitorPlans to update.
   */
  limit?: number
}

/**
 * MonitorPlan updateManyAndReturn
 */
export type MonitorPlanUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the MonitorPlan
   */
  select?: Prisma.MonitorPlanSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the MonitorPlan
   */
  omit?: Prisma.MonitorPlanOmit<ExtArgs> | null
  /**
   * The data used to update MonitorPlans.
   */
  data: Prisma.XOR<Prisma.MonitorPlanUpdateManyMutationInput, Prisma.MonitorPlanUncheckedUpdateManyInput>
  /**
   * Filter which MonitorPlans to update
   */
  where?: Prisma.MonitorPlanWhereInput
  /**
   * Limit how many MonitorPlans to update.
   */
  limit?: number
}

/**
 * MonitorPlan upsert
 */
export type MonitorPlanUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the MonitorPlan
   */
  select?: Prisma.MonitorPlanSelect<ExtArgs> | null
  /**
   * Omit specific fields from the MonitorPlan
   */
  omit?: Prisma.MonitorPlanOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.MonitorPlanInclude<ExtArgs> | null
  /**
   * The filter to search for the MonitorPlan to update in case it exists.
   */
  where: Prisma.MonitorPlanWhereUniqueInput
  /**
   * In case the MonitorPlan found by the `where` argument doesn't exist, create a new MonitorPlan with this data.
   */
  create: Prisma.XOR<Prisma.MonitorPlanCreateInput, Prisma.MonitorPlanUncheckedCreateInput>
  /**
   * In case the MonitorPlan was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.MonitorPlanUpdateInput, Prisma.MonitorPlanUncheckedUpdateInput>
}

/**
 * MonitorPlan delete
 */
export type MonitorPlanDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the MonitorPlan
   */
  select?: Prisma.MonitorPlanSelect<ExtArgs> | null
  /**
   * Omit specific fields from the MonitorPlan
   */
  omit?: Prisma.MonitorPlanOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.MonitorPlanInclude<ExtArgs> | null
  /**
   * Filter which MonitorPlan to delete.
   */
  where: Prisma.MonitorPlanWhereUniqueInput
}

/**
 * MonitorPlan deleteMany
 */
export type MonitorPlanDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which MonitorPlans to delete
   */
  where?: Prisma.MonitorPlanWhereInput
  /**
   * Limit how many MonitorPlans to delete.
   */
  limit?: number
}

/**
 * MonitorPlan.items
 */
export type MonitorPlan$itemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the MonitorItem
   */
  select?: Prisma.MonitorItemSelect<ExtArgs> | null
  /**
   * Omit specific fields from the MonitorItem
   */
  omit?: Prisma.MonitorItemOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.MonitorItemInclude<ExtArgs> | null
  where?: Prisma.MonitorItemWhereInput
  orderBy?: Prisma.MonitorItemOrderByWithRelationInput | Prisma.MonitorItemOrderByWithRelationInput[]
  cursor?: Prisma.MonitorItemWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.MonitorItemScalarFieldEnum | Prisma.MonitorItemScalarFieldEnum[]
}

/**
 * MonitorPlan.instances
 */
export type MonitorPlan$instancesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the MonitorInstance
   */
  select?: Prisma.MonitorInstanceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the MonitorInstance
   */
  omit?: Prisma.MonitorInstanceOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.MonitorInstanceInclude<ExtArgs> | null
  where?: Prisma.MonitorInstanceWhereInput
  orderBy?: Prisma.MonitorInstanceOrderByWithRelationInput | Prisma.MonitorInstanceOrderByWithRelationInput[]
  cursor?: Prisma.MonitorInstanceWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.MonitorInstanceScalarFieldEnum | Prisma.MonitorInstanceScalarFieldEnum[]
}

/**
 * MonitorPlan.operateLogs
 */
export type MonitorPlan$operateLogsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the MonitorOperateLog
   */
  select?: Prisma.MonitorOperateLogSelect<ExtArgs> | null
  /**
   * Omit specific fields from the MonitorOperateLog
   */
  omit?: Prisma.MonitorOperateLogOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.MonitorOperateLogInclude<ExtArgs> | null
  where?: Prisma.MonitorOperateLogWhereInput
  orderBy?: Prisma.MonitorOperateLogOrderByWithRelationInput | Prisma.MonitorOperateLogOrderByWithRelationInput[]
  cursor?: Prisma.MonitorOperateLogWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.MonitorOperateLogScalarFieldEnum | Prisma.MonitorOperateLogScalarFieldEnum[]
}

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