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

/**
 * Model Approval
 * 
 */
export type ApprovalModel = runtime.Types.Result.DefaultSelection<Prisma.$ApprovalPayload>

export type AggregateApproval = {
  _count: ApprovalCountAggregateOutputType | null
  _min: ApprovalMinAggregateOutputType | null
  _max: ApprovalMaxAggregateOutputType | null
}

export type ApprovalMinAggregateOutputType = {
  id: string | null
  transactionId: string | null
  role: $Enums.ApprovalRole | null
  approvedBy: string | null
  approvedAt: Date | null
  notes: string | null
}

export type ApprovalMaxAggregateOutputType = {
  id: string | null
  transactionId: string | null
  role: $Enums.ApprovalRole | null
  approvedBy: string | null
  approvedAt: Date | null
  notes: string | null
}

export type ApprovalCountAggregateOutputType = {
  id: number
  transactionId: number
  role: number
  approvedBy: number
  approvedAt: number
  notes: number
  _all: number
}


export type ApprovalMinAggregateInputType = {
  id?: true
  transactionId?: true
  role?: true
  approvedBy?: true
  approvedAt?: true
  notes?: true
}

export type ApprovalMaxAggregateInputType = {
  id?: true
  transactionId?: true
  role?: true
  approvedBy?: true
  approvedAt?: true
  notes?: true
}

export type ApprovalCountAggregateInputType = {
  id?: true
  transactionId?: true
  role?: true
  approvedBy?: true
  approvedAt?: true
  notes?: true
  _all?: true
}

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

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




export type ApprovalGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.ApprovalWhereInput
  orderBy?: Prisma.ApprovalOrderByWithAggregationInput | Prisma.ApprovalOrderByWithAggregationInput[]
  by: Prisma.ApprovalScalarFieldEnum[] | Prisma.ApprovalScalarFieldEnum
  having?: Prisma.ApprovalScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: ApprovalCountAggregateInputType | true
  _min?: ApprovalMinAggregateInputType
  _max?: ApprovalMaxAggregateInputType
}

export type ApprovalGroupByOutputType = {
  id: string
  transactionId: string
  role: $Enums.ApprovalRole
  approvedBy: string
  approvedAt: Date
  notes: string | null
  _count: ApprovalCountAggregateOutputType | null
  _min: ApprovalMinAggregateOutputType | null
  _max: ApprovalMaxAggregateOutputType | null
}

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



export type ApprovalWhereInput = {
  AND?: Prisma.ApprovalWhereInput | Prisma.ApprovalWhereInput[]
  OR?: Prisma.ApprovalWhereInput[]
  NOT?: Prisma.ApprovalWhereInput | Prisma.ApprovalWhereInput[]
  id?: Prisma.StringFilter<"Approval"> | string
  transactionId?: Prisma.StringFilter<"Approval"> | string
  role?: Prisma.EnumApprovalRoleFilter<"Approval"> | $Enums.ApprovalRole
  approvedBy?: Prisma.StringFilter<"Approval"> | string
  approvedAt?: Prisma.DateTimeFilter<"Approval"> | Date | string
  notes?: Prisma.StringNullableFilter<"Approval"> | string | null
  transaction?: Prisma.XOR<Prisma.TransactionScalarRelationFilter, Prisma.TransactionWhereInput>
}

export type ApprovalOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  transactionId?: Prisma.SortOrder
  role?: Prisma.SortOrder
  approvedBy?: Prisma.SortOrder
  approvedAt?: Prisma.SortOrder
  notes?: Prisma.SortOrderInput | Prisma.SortOrder
  transaction?: Prisma.TransactionOrderByWithRelationInput
}

export type ApprovalWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  AND?: Prisma.ApprovalWhereInput | Prisma.ApprovalWhereInput[]
  OR?: Prisma.ApprovalWhereInput[]
  NOT?: Prisma.ApprovalWhereInput | Prisma.ApprovalWhereInput[]
  transactionId?: Prisma.StringFilter<"Approval"> | string
  role?: Prisma.EnumApprovalRoleFilter<"Approval"> | $Enums.ApprovalRole
  approvedBy?: Prisma.StringFilter<"Approval"> | string
  approvedAt?: Prisma.DateTimeFilter<"Approval"> | Date | string
  notes?: Prisma.StringNullableFilter<"Approval"> | string | null
  transaction?: Prisma.XOR<Prisma.TransactionScalarRelationFilter, Prisma.TransactionWhereInput>
}, "id">

export type ApprovalOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  transactionId?: Prisma.SortOrder
  role?: Prisma.SortOrder
  approvedBy?: Prisma.SortOrder
  approvedAt?: Prisma.SortOrder
  notes?: Prisma.SortOrderInput | Prisma.SortOrder
  _count?: Prisma.ApprovalCountOrderByAggregateInput
  _max?: Prisma.ApprovalMaxOrderByAggregateInput
  _min?: Prisma.ApprovalMinOrderByAggregateInput
}

export type ApprovalScalarWhereWithAggregatesInput = {
  AND?: Prisma.ApprovalScalarWhereWithAggregatesInput | Prisma.ApprovalScalarWhereWithAggregatesInput[]
  OR?: Prisma.ApprovalScalarWhereWithAggregatesInput[]
  NOT?: Prisma.ApprovalScalarWhereWithAggregatesInput | Prisma.ApprovalScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"Approval"> | string
  transactionId?: Prisma.StringWithAggregatesFilter<"Approval"> | string
  role?: Prisma.EnumApprovalRoleWithAggregatesFilter<"Approval"> | $Enums.ApprovalRole
  approvedBy?: Prisma.StringWithAggregatesFilter<"Approval"> | string
  approvedAt?: Prisma.DateTimeWithAggregatesFilter<"Approval"> | Date | string
  notes?: Prisma.StringNullableWithAggregatesFilter<"Approval"> | string | null
}

export type ApprovalCreateInput = {
  id?: string
  role: $Enums.ApprovalRole
  approvedBy: string
  approvedAt?: Date | string
  notes?: string | null
  transaction: Prisma.TransactionCreateNestedOneWithoutApprovalsInput
}

export type ApprovalUncheckedCreateInput = {
  id?: string
  transactionId: string
  role: $Enums.ApprovalRole
  approvedBy: string
  approvedAt?: Date | string
  notes?: string | null
}

export type ApprovalUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  role?: Prisma.EnumApprovalRoleFieldUpdateOperationsInput | $Enums.ApprovalRole
  approvedBy?: Prisma.StringFieldUpdateOperationsInput | string
  approvedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  transaction?: Prisma.TransactionUpdateOneRequiredWithoutApprovalsNestedInput
}

export type ApprovalUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  transactionId?: Prisma.StringFieldUpdateOperationsInput | string
  role?: Prisma.EnumApprovalRoleFieldUpdateOperationsInput | $Enums.ApprovalRole
  approvedBy?: Prisma.StringFieldUpdateOperationsInput | string
  approvedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}

export type ApprovalCreateManyInput = {
  id?: string
  transactionId: string
  role: $Enums.ApprovalRole
  approvedBy: string
  approvedAt?: Date | string
  notes?: string | null
}

export type ApprovalUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  role?: Prisma.EnumApprovalRoleFieldUpdateOperationsInput | $Enums.ApprovalRole
  approvedBy?: Prisma.StringFieldUpdateOperationsInput | string
  approvedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}

export type ApprovalUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  transactionId?: Prisma.StringFieldUpdateOperationsInput | string
  role?: Prisma.EnumApprovalRoleFieldUpdateOperationsInput | $Enums.ApprovalRole
  approvedBy?: Prisma.StringFieldUpdateOperationsInput | string
  approvedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}

export type ApprovalListRelationFilter = {
  every?: Prisma.ApprovalWhereInput
  some?: Prisma.ApprovalWhereInput
  none?: Prisma.ApprovalWhereInput
}

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

export type ApprovalCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  transactionId?: Prisma.SortOrder
  role?: Prisma.SortOrder
  approvedBy?: Prisma.SortOrder
  approvedAt?: Prisma.SortOrder
  notes?: Prisma.SortOrder
}

export type ApprovalMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  transactionId?: Prisma.SortOrder
  role?: Prisma.SortOrder
  approvedBy?: Prisma.SortOrder
  approvedAt?: Prisma.SortOrder
  notes?: Prisma.SortOrder
}

export type ApprovalMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  transactionId?: Prisma.SortOrder
  role?: Prisma.SortOrder
  approvedBy?: Prisma.SortOrder
  approvedAt?: Prisma.SortOrder
  notes?: Prisma.SortOrder
}

export type ApprovalCreateNestedManyWithoutTransactionInput = {
  create?: Prisma.XOR<Prisma.ApprovalCreateWithoutTransactionInput, Prisma.ApprovalUncheckedCreateWithoutTransactionInput> | Prisma.ApprovalCreateWithoutTransactionInput[] | Prisma.ApprovalUncheckedCreateWithoutTransactionInput[]
  connectOrCreate?: Prisma.ApprovalCreateOrConnectWithoutTransactionInput | Prisma.ApprovalCreateOrConnectWithoutTransactionInput[]
  createMany?: Prisma.ApprovalCreateManyTransactionInputEnvelope
  connect?: Prisma.ApprovalWhereUniqueInput | Prisma.ApprovalWhereUniqueInput[]
}

export type ApprovalUncheckedCreateNestedManyWithoutTransactionInput = {
  create?: Prisma.XOR<Prisma.ApprovalCreateWithoutTransactionInput, Prisma.ApprovalUncheckedCreateWithoutTransactionInput> | Prisma.ApprovalCreateWithoutTransactionInput[] | Prisma.ApprovalUncheckedCreateWithoutTransactionInput[]
  connectOrCreate?: Prisma.ApprovalCreateOrConnectWithoutTransactionInput | Prisma.ApprovalCreateOrConnectWithoutTransactionInput[]
  createMany?: Prisma.ApprovalCreateManyTransactionInputEnvelope
  connect?: Prisma.ApprovalWhereUniqueInput | Prisma.ApprovalWhereUniqueInput[]
}

export type ApprovalUpdateManyWithoutTransactionNestedInput = {
  create?: Prisma.XOR<Prisma.ApprovalCreateWithoutTransactionInput, Prisma.ApprovalUncheckedCreateWithoutTransactionInput> | Prisma.ApprovalCreateWithoutTransactionInput[] | Prisma.ApprovalUncheckedCreateWithoutTransactionInput[]
  connectOrCreate?: Prisma.ApprovalCreateOrConnectWithoutTransactionInput | Prisma.ApprovalCreateOrConnectWithoutTransactionInput[]
  upsert?: Prisma.ApprovalUpsertWithWhereUniqueWithoutTransactionInput | Prisma.ApprovalUpsertWithWhereUniqueWithoutTransactionInput[]
  createMany?: Prisma.ApprovalCreateManyTransactionInputEnvelope
  set?: Prisma.ApprovalWhereUniqueInput | Prisma.ApprovalWhereUniqueInput[]
  disconnect?: Prisma.ApprovalWhereUniqueInput | Prisma.ApprovalWhereUniqueInput[]
  delete?: Prisma.ApprovalWhereUniqueInput | Prisma.ApprovalWhereUniqueInput[]
  connect?: Prisma.ApprovalWhereUniqueInput | Prisma.ApprovalWhereUniqueInput[]
  update?: Prisma.ApprovalUpdateWithWhereUniqueWithoutTransactionInput | Prisma.ApprovalUpdateWithWhereUniqueWithoutTransactionInput[]
  updateMany?: Prisma.ApprovalUpdateManyWithWhereWithoutTransactionInput | Prisma.ApprovalUpdateManyWithWhereWithoutTransactionInput[]
  deleteMany?: Prisma.ApprovalScalarWhereInput | Prisma.ApprovalScalarWhereInput[]
}

export type ApprovalUncheckedUpdateManyWithoutTransactionNestedInput = {
  create?: Prisma.XOR<Prisma.ApprovalCreateWithoutTransactionInput, Prisma.ApprovalUncheckedCreateWithoutTransactionInput> | Prisma.ApprovalCreateWithoutTransactionInput[] | Prisma.ApprovalUncheckedCreateWithoutTransactionInput[]
  connectOrCreate?: Prisma.ApprovalCreateOrConnectWithoutTransactionInput | Prisma.ApprovalCreateOrConnectWithoutTransactionInput[]
  upsert?: Prisma.ApprovalUpsertWithWhereUniqueWithoutTransactionInput | Prisma.ApprovalUpsertWithWhereUniqueWithoutTransactionInput[]
  createMany?: Prisma.ApprovalCreateManyTransactionInputEnvelope
  set?: Prisma.ApprovalWhereUniqueInput | Prisma.ApprovalWhereUniqueInput[]
  disconnect?: Prisma.ApprovalWhereUniqueInput | Prisma.ApprovalWhereUniqueInput[]
  delete?: Prisma.ApprovalWhereUniqueInput | Prisma.ApprovalWhereUniqueInput[]
  connect?: Prisma.ApprovalWhereUniqueInput | Prisma.ApprovalWhereUniqueInput[]
  update?: Prisma.ApprovalUpdateWithWhereUniqueWithoutTransactionInput | Prisma.ApprovalUpdateWithWhereUniqueWithoutTransactionInput[]
  updateMany?: Prisma.ApprovalUpdateManyWithWhereWithoutTransactionInput | Prisma.ApprovalUpdateManyWithWhereWithoutTransactionInput[]
  deleteMany?: Prisma.ApprovalScalarWhereInput | Prisma.ApprovalScalarWhereInput[]
}

export type EnumApprovalRoleFieldUpdateOperationsInput = {
  set?: $Enums.ApprovalRole
}

export type ApprovalCreateWithoutTransactionInput = {
  id?: string
  role: $Enums.ApprovalRole
  approvedBy: string
  approvedAt?: Date | string
  notes?: string | null
}

export type ApprovalUncheckedCreateWithoutTransactionInput = {
  id?: string
  role: $Enums.ApprovalRole
  approvedBy: string
  approvedAt?: Date | string
  notes?: string | null
}

export type ApprovalCreateOrConnectWithoutTransactionInput = {
  where: Prisma.ApprovalWhereUniqueInput
  create: Prisma.XOR<Prisma.ApprovalCreateWithoutTransactionInput, Prisma.ApprovalUncheckedCreateWithoutTransactionInput>
}

export type ApprovalCreateManyTransactionInputEnvelope = {
  data: Prisma.ApprovalCreateManyTransactionInput | Prisma.ApprovalCreateManyTransactionInput[]
  skipDuplicates?: boolean
}

export type ApprovalUpsertWithWhereUniqueWithoutTransactionInput = {
  where: Prisma.ApprovalWhereUniqueInput
  update: Prisma.XOR<Prisma.ApprovalUpdateWithoutTransactionInput, Prisma.ApprovalUncheckedUpdateWithoutTransactionInput>
  create: Prisma.XOR<Prisma.ApprovalCreateWithoutTransactionInput, Prisma.ApprovalUncheckedCreateWithoutTransactionInput>
}

export type ApprovalUpdateWithWhereUniqueWithoutTransactionInput = {
  where: Prisma.ApprovalWhereUniqueInput
  data: Prisma.XOR<Prisma.ApprovalUpdateWithoutTransactionInput, Prisma.ApprovalUncheckedUpdateWithoutTransactionInput>
}

export type ApprovalUpdateManyWithWhereWithoutTransactionInput = {
  where: Prisma.ApprovalScalarWhereInput
  data: Prisma.XOR<Prisma.ApprovalUpdateManyMutationInput, Prisma.ApprovalUncheckedUpdateManyWithoutTransactionInput>
}

export type ApprovalScalarWhereInput = {
  AND?: Prisma.ApprovalScalarWhereInput | Prisma.ApprovalScalarWhereInput[]
  OR?: Prisma.ApprovalScalarWhereInput[]
  NOT?: Prisma.ApprovalScalarWhereInput | Prisma.ApprovalScalarWhereInput[]
  id?: Prisma.StringFilter<"Approval"> | string
  transactionId?: Prisma.StringFilter<"Approval"> | string
  role?: Prisma.EnumApprovalRoleFilter<"Approval"> | $Enums.ApprovalRole
  approvedBy?: Prisma.StringFilter<"Approval"> | string
  approvedAt?: Prisma.DateTimeFilter<"Approval"> | Date | string
  notes?: Prisma.StringNullableFilter<"Approval"> | string | null
}

export type ApprovalCreateManyTransactionInput = {
  id?: string
  role: $Enums.ApprovalRole
  approvedBy: string
  approvedAt?: Date | string
  notes?: string | null
}

export type ApprovalUpdateWithoutTransactionInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  role?: Prisma.EnumApprovalRoleFieldUpdateOperationsInput | $Enums.ApprovalRole
  approvedBy?: Prisma.StringFieldUpdateOperationsInput | string
  approvedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}

export type ApprovalUncheckedUpdateWithoutTransactionInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  role?: Prisma.EnumApprovalRoleFieldUpdateOperationsInput | $Enums.ApprovalRole
  approvedBy?: Prisma.StringFieldUpdateOperationsInput | string
  approvedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}

export type ApprovalUncheckedUpdateManyWithoutTransactionInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  role?: Prisma.EnumApprovalRoleFieldUpdateOperationsInput | $Enums.ApprovalRole
  approvedBy?: Prisma.StringFieldUpdateOperationsInput | string
  approvedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}



export type ApprovalSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  transactionId?: boolean
  role?: boolean
  approvedBy?: boolean
  approvedAt?: boolean
  notes?: boolean
  transaction?: boolean | Prisma.TransactionDefaultArgs<ExtArgs>
}, ExtArgs["result"]["approval"]>

export type ApprovalSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  transactionId?: boolean
  role?: boolean
  approvedBy?: boolean
  approvedAt?: boolean
  notes?: boolean
  transaction?: boolean | Prisma.TransactionDefaultArgs<ExtArgs>
}, ExtArgs["result"]["approval"]>

export type ApprovalSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  transactionId?: boolean
  role?: boolean
  approvedBy?: boolean
  approvedAt?: boolean
  notes?: boolean
  transaction?: boolean | Prisma.TransactionDefaultArgs<ExtArgs>
}, ExtArgs["result"]["approval"]>

export type ApprovalSelectScalar = {
  id?: boolean
  transactionId?: boolean
  role?: boolean
  approvedBy?: boolean
  approvedAt?: boolean
  notes?: boolean
}

export type ApprovalOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "transactionId" | "role" | "approvedBy" | "approvedAt" | "notes", ExtArgs["result"]["approval"]>
export type ApprovalInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  transaction?: boolean | Prisma.TransactionDefaultArgs<ExtArgs>
}
export type ApprovalIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  transaction?: boolean | Prisma.TransactionDefaultArgs<ExtArgs>
}
export type ApprovalIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  transaction?: boolean | Prisma.TransactionDefaultArgs<ExtArgs>
}

export type $ApprovalPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "Approval"
  objects: {
    transaction: Prisma.$TransactionPayload<ExtArgs>
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    transactionId: string
    role: $Enums.ApprovalRole
    approvedBy: string
    approvedAt: Date
    notes: string | null
  }, ExtArgs["result"]["approval"]>
  composites: {}
}

export type ApprovalGetPayload<S extends boolean | null | undefined | ApprovalDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$ApprovalPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for Approval.
 * 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__ApprovalClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  transaction<T extends Prisma.TransactionDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.TransactionDefaultArgs<ExtArgs>>): Prisma.Prisma__TransactionClient<runtime.Types.Result.GetResult<Prisma.$TransactionPayload<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 Approval model
 */
export interface ApprovalFieldRefs {
  readonly id: Prisma.FieldRef<"Approval", 'String'>
  readonly transactionId: Prisma.FieldRef<"Approval", 'String'>
  readonly role: Prisma.FieldRef<"Approval", 'ApprovalRole'>
  readonly approvedBy: Prisma.FieldRef<"Approval", 'String'>
  readonly approvedAt: Prisma.FieldRef<"Approval", 'DateTime'>
  readonly notes: Prisma.FieldRef<"Approval", 'String'>
}
    

// Custom InputTypes
/**
 * Approval findUnique
 */
export type ApprovalFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Approval
   */
  select?: Prisma.ApprovalSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Approval
   */
  omit?: Prisma.ApprovalOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ApprovalInclude<ExtArgs> | null
  /**
   * Filter, which Approval to fetch.
   */
  where: Prisma.ApprovalWhereUniqueInput
}

/**
 * Approval findUniqueOrThrow
 */
export type ApprovalFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Approval
   */
  select?: Prisma.ApprovalSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Approval
   */
  omit?: Prisma.ApprovalOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ApprovalInclude<ExtArgs> | null
  /**
   * Filter, which Approval to fetch.
   */
  where: Prisma.ApprovalWhereUniqueInput
}

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

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

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

/**
 * Approval create
 */
export type ApprovalCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Approval
   */
  select?: Prisma.ApprovalSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Approval
   */
  omit?: Prisma.ApprovalOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ApprovalInclude<ExtArgs> | null
  /**
   * The data needed to create a Approval.
   */
  data: Prisma.XOR<Prisma.ApprovalCreateInput, Prisma.ApprovalUncheckedCreateInput>
}

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

/**
 * Approval createManyAndReturn
 */
export type ApprovalCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Approval
   */
  select?: Prisma.ApprovalSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Approval
   */
  omit?: Prisma.ApprovalOmit<ExtArgs> | null
  /**
   * The data used to create many Approvals.
   */
  data: Prisma.ApprovalCreateManyInput | Prisma.ApprovalCreateManyInput[]
  skipDuplicates?: boolean
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ApprovalIncludeCreateManyAndReturn<ExtArgs> | null
}

/**
 * Approval update
 */
export type ApprovalUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Approval
   */
  select?: Prisma.ApprovalSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Approval
   */
  omit?: Prisma.ApprovalOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ApprovalInclude<ExtArgs> | null
  /**
   * The data needed to update a Approval.
   */
  data: Prisma.XOR<Prisma.ApprovalUpdateInput, Prisma.ApprovalUncheckedUpdateInput>
  /**
   * Choose, which Approval to update.
   */
  where: Prisma.ApprovalWhereUniqueInput
}

/**
 * Approval updateMany
 */
export type ApprovalUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update Approvals.
   */
  data: Prisma.XOR<Prisma.ApprovalUpdateManyMutationInput, Prisma.ApprovalUncheckedUpdateManyInput>
  /**
   * Filter which Approvals to update
   */
  where?: Prisma.ApprovalWhereInput
  /**
   * Limit how many Approvals to update.
   */
  limit?: number
}

/**
 * Approval updateManyAndReturn
 */
export type ApprovalUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Approval
   */
  select?: Prisma.ApprovalSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Approval
   */
  omit?: Prisma.ApprovalOmit<ExtArgs> | null
  /**
   * The data used to update Approvals.
   */
  data: Prisma.XOR<Prisma.ApprovalUpdateManyMutationInput, Prisma.ApprovalUncheckedUpdateManyInput>
  /**
   * Filter which Approvals to update
   */
  where?: Prisma.ApprovalWhereInput
  /**
   * Limit how many Approvals to update.
   */
  limit?: number
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ApprovalIncludeUpdateManyAndReturn<ExtArgs> | null
}

/**
 * Approval upsert
 */
export type ApprovalUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Approval
   */
  select?: Prisma.ApprovalSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Approval
   */
  omit?: Prisma.ApprovalOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ApprovalInclude<ExtArgs> | null
  /**
   * The filter to search for the Approval to update in case it exists.
   */
  where: Prisma.ApprovalWhereUniqueInput
  /**
   * In case the Approval found by the `where` argument doesn't exist, create a new Approval with this data.
   */
  create: Prisma.XOR<Prisma.ApprovalCreateInput, Prisma.ApprovalUncheckedCreateInput>
  /**
   * In case the Approval was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.ApprovalUpdateInput, Prisma.ApprovalUncheckedUpdateInput>
}

/**
 * Approval delete
 */
export type ApprovalDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Approval
   */
  select?: Prisma.ApprovalSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Approval
   */
  omit?: Prisma.ApprovalOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ApprovalInclude<ExtArgs> | null
  /**
   * Filter which Approval to delete.
   */
  where: Prisma.ApprovalWhereUniqueInput
}

/**
 * Approval deleteMany
 */
export type ApprovalDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Approvals to delete
   */
  where?: Prisma.ApprovalWhereInput
  /**
   * Limit how many Approvals to delete.
   */
  limit?: number
}

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