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

export type AggregateBranch = {
  _count: BranchCountAggregateOutputType | null
  _min: BranchMinAggregateOutputType | null
  _max: BranchMaxAggregateOutputType | null
}

export type BranchMinAggregateOutputType = {
  id: string | null
  code: string | null
  name: string | null
  address: string | null
  beginEffective: Date | null
  endEffective: Date | null
  createdAt: Date | null
  modifiedAt: Date | null
}

export type BranchMaxAggregateOutputType = {
  id: string | null
  code: string | null
  name: string | null
  address: string | null
  beginEffective: Date | null
  endEffective: Date | null
  createdAt: Date | null
  modifiedAt: Date | null
}

export type BranchCountAggregateOutputType = {
  id: number
  code: number
  name: number
  address: number
  beginEffective: number
  endEffective: number
  createdAt: number
  modifiedAt: number
  _all: number
}


export type BranchMinAggregateInputType = {
  id?: true
  code?: true
  name?: true
  address?: true
  beginEffective?: true
  endEffective?: true
  createdAt?: true
  modifiedAt?: true
}

export type BranchMaxAggregateInputType = {
  id?: true
  code?: true
  name?: true
  address?: true
  beginEffective?: true
  endEffective?: true
  createdAt?: true
  modifiedAt?: true
}

export type BranchCountAggregateInputType = {
  id?: true
  code?: true
  name?: true
  address?: true
  beginEffective?: true
  endEffective?: true
  createdAt?: true
  modifiedAt?: true
  _all?: true
}

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

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




export type BranchGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.BranchWhereInput
  orderBy?: Prisma.BranchOrderByWithAggregationInput | Prisma.BranchOrderByWithAggregationInput[]
  by: Prisma.BranchScalarFieldEnum[] | Prisma.BranchScalarFieldEnum
  having?: Prisma.BranchScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: BranchCountAggregateInputType | true
  _min?: BranchMinAggregateInputType
  _max?: BranchMaxAggregateInputType
}

export type BranchGroupByOutputType = {
  id: string
  code: string
  name: string
  address: string
  beginEffective: Date
  endEffective: Date | null
  createdAt: Date
  modifiedAt: Date
  _count: BranchCountAggregateOutputType | null
  _min: BranchMinAggregateOutputType | null
  _max: BranchMaxAggregateOutputType | null
}

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



export type BranchWhereInput = {
  AND?: Prisma.BranchWhereInput | Prisma.BranchWhereInput[]
  OR?: Prisma.BranchWhereInput[]
  NOT?: Prisma.BranchWhereInput | Prisma.BranchWhereInput[]
  id?: Prisma.StringFilter<"Branch"> | string
  code?: Prisma.StringFilter<"Branch"> | string
  name?: Prisma.StringFilter<"Branch"> | string
  address?: Prisma.StringFilter<"Branch"> | string
  beginEffective?: Prisma.DateTimeFilter<"Branch"> | Date | string
  endEffective?: Prisma.DateTimeNullableFilter<"Branch"> | Date | string | null
  createdAt?: Prisma.DateTimeFilter<"Branch"> | Date | string
  modifiedAt?: Prisma.DateTimeFilter<"Branch"> | Date | string
  users?: Prisma.UserBranchListRelationFilter
  transactions?: Prisma.TransactionListRelationFilter
}

export type BranchOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  address?: Prisma.SortOrder
  beginEffective?: Prisma.SortOrder
  endEffective?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
  users?: Prisma.UserBranchOrderByRelationAggregateInput
  transactions?: Prisma.TransactionOrderByRelationAggregateInput
}

export type BranchWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  code?: string
  AND?: Prisma.BranchWhereInput | Prisma.BranchWhereInput[]
  OR?: Prisma.BranchWhereInput[]
  NOT?: Prisma.BranchWhereInput | Prisma.BranchWhereInput[]
  name?: Prisma.StringFilter<"Branch"> | string
  address?: Prisma.StringFilter<"Branch"> | string
  beginEffective?: Prisma.DateTimeFilter<"Branch"> | Date | string
  endEffective?: Prisma.DateTimeNullableFilter<"Branch"> | Date | string | null
  createdAt?: Prisma.DateTimeFilter<"Branch"> | Date | string
  modifiedAt?: Prisma.DateTimeFilter<"Branch"> | Date | string
  users?: Prisma.UserBranchListRelationFilter
  transactions?: Prisma.TransactionListRelationFilter
}, "id" | "code">

export type BranchOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  address?: Prisma.SortOrder
  beginEffective?: Prisma.SortOrder
  endEffective?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
  _count?: Prisma.BranchCountOrderByAggregateInput
  _max?: Prisma.BranchMaxOrderByAggregateInput
  _min?: Prisma.BranchMinOrderByAggregateInput
}

export type BranchScalarWhereWithAggregatesInput = {
  AND?: Prisma.BranchScalarWhereWithAggregatesInput | Prisma.BranchScalarWhereWithAggregatesInput[]
  OR?: Prisma.BranchScalarWhereWithAggregatesInput[]
  NOT?: Prisma.BranchScalarWhereWithAggregatesInput | Prisma.BranchScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"Branch"> | string
  code?: Prisma.StringWithAggregatesFilter<"Branch"> | string
  name?: Prisma.StringWithAggregatesFilter<"Branch"> | string
  address?: Prisma.StringWithAggregatesFilter<"Branch"> | string
  beginEffective?: Prisma.DateTimeWithAggregatesFilter<"Branch"> | Date | string
  endEffective?: Prisma.DateTimeNullableWithAggregatesFilter<"Branch"> | Date | string | null
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"Branch"> | Date | string
  modifiedAt?: Prisma.DateTimeWithAggregatesFilter<"Branch"> | Date | string
}

export type BranchCreateInput = {
  id?: string
  code: string
  name: string
  address: string
  beginEffective: Date | string
  endEffective?: Date | string | null
  createdAt?: Date | string
  modifiedAt?: Date | string
  users?: Prisma.UserBranchCreateNestedManyWithoutBranchInput
  transactions?: Prisma.TransactionCreateNestedManyWithoutBranchInput
}

export type BranchUncheckedCreateInput = {
  id?: string
  code: string
  name: string
  address: string
  beginEffective: Date | string
  endEffective?: Date | string | null
  createdAt?: Date | string
  modifiedAt?: Date | string
  users?: Prisma.UserBranchUncheckedCreateNestedManyWithoutBranchInput
  transactions?: Prisma.TransactionUncheckedCreateNestedManyWithoutBranchInput
}

export type BranchUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  address?: Prisma.StringFieldUpdateOperationsInput | string
  beginEffective?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endEffective?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  users?: Prisma.UserBranchUpdateManyWithoutBranchNestedInput
  transactions?: Prisma.TransactionUpdateManyWithoutBranchNestedInput
}

export type BranchUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  address?: Prisma.StringFieldUpdateOperationsInput | string
  beginEffective?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endEffective?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  users?: Prisma.UserBranchUncheckedUpdateManyWithoutBranchNestedInput
  transactions?: Prisma.TransactionUncheckedUpdateManyWithoutBranchNestedInput
}

export type BranchCreateManyInput = {
  id?: string
  code: string
  name: string
  address: string
  beginEffective: Date | string
  endEffective?: Date | string | null
  createdAt?: Date | string
  modifiedAt?: Date | string
}

export type BranchUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  address?: Prisma.StringFieldUpdateOperationsInput | string
  beginEffective?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endEffective?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type BranchUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  address?: Prisma.StringFieldUpdateOperationsInput | string
  beginEffective?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endEffective?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type BranchCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  address?: Prisma.SortOrder
  beginEffective?: Prisma.SortOrder
  endEffective?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
}

export type BranchMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  address?: Prisma.SortOrder
  beginEffective?: Prisma.SortOrder
  endEffective?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
}

export type BranchMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  code?: Prisma.SortOrder
  name?: Prisma.SortOrder
  address?: Prisma.SortOrder
  beginEffective?: Prisma.SortOrder
  endEffective?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
}

export type BranchScalarRelationFilter = {
  is?: Prisma.BranchWhereInput
  isNot?: Prisma.BranchWhereInput
}

export type NullableDateTimeFieldUpdateOperationsInput = {
  set?: Date | string | null
}

export type BranchCreateNestedOneWithoutUsersInput = {
  create?: Prisma.XOR<Prisma.BranchCreateWithoutUsersInput, Prisma.BranchUncheckedCreateWithoutUsersInput>
  connectOrCreate?: Prisma.BranchCreateOrConnectWithoutUsersInput
  connect?: Prisma.BranchWhereUniqueInput
}

export type BranchUpdateOneRequiredWithoutUsersNestedInput = {
  create?: Prisma.XOR<Prisma.BranchCreateWithoutUsersInput, Prisma.BranchUncheckedCreateWithoutUsersInput>
  connectOrCreate?: Prisma.BranchCreateOrConnectWithoutUsersInput
  upsert?: Prisma.BranchUpsertWithoutUsersInput
  connect?: Prisma.BranchWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.BranchUpdateToOneWithWhereWithoutUsersInput, Prisma.BranchUpdateWithoutUsersInput>, Prisma.BranchUncheckedUpdateWithoutUsersInput>
}

export type BranchCreateNestedOneWithoutTransactionsInput = {
  create?: Prisma.XOR<Prisma.BranchCreateWithoutTransactionsInput, Prisma.BranchUncheckedCreateWithoutTransactionsInput>
  connectOrCreate?: Prisma.BranchCreateOrConnectWithoutTransactionsInput
  connect?: Prisma.BranchWhereUniqueInput
}

export type BranchUpdateOneRequiredWithoutTransactionsNestedInput = {
  create?: Prisma.XOR<Prisma.BranchCreateWithoutTransactionsInput, Prisma.BranchUncheckedCreateWithoutTransactionsInput>
  connectOrCreate?: Prisma.BranchCreateOrConnectWithoutTransactionsInput
  upsert?: Prisma.BranchUpsertWithoutTransactionsInput
  connect?: Prisma.BranchWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.BranchUpdateToOneWithWhereWithoutTransactionsInput, Prisma.BranchUpdateWithoutTransactionsInput>, Prisma.BranchUncheckedUpdateWithoutTransactionsInput>
}

export type BranchCreateWithoutUsersInput = {
  id?: string
  code: string
  name: string
  address: string
  beginEffective: Date | string
  endEffective?: Date | string | null
  createdAt?: Date | string
  modifiedAt?: Date | string
  transactions?: Prisma.TransactionCreateNestedManyWithoutBranchInput
}

export type BranchUncheckedCreateWithoutUsersInput = {
  id?: string
  code: string
  name: string
  address: string
  beginEffective: Date | string
  endEffective?: Date | string | null
  createdAt?: Date | string
  modifiedAt?: Date | string
  transactions?: Prisma.TransactionUncheckedCreateNestedManyWithoutBranchInput
}

export type BranchCreateOrConnectWithoutUsersInput = {
  where: Prisma.BranchWhereUniqueInput
  create: Prisma.XOR<Prisma.BranchCreateWithoutUsersInput, Prisma.BranchUncheckedCreateWithoutUsersInput>
}

export type BranchUpsertWithoutUsersInput = {
  update: Prisma.XOR<Prisma.BranchUpdateWithoutUsersInput, Prisma.BranchUncheckedUpdateWithoutUsersInput>
  create: Prisma.XOR<Prisma.BranchCreateWithoutUsersInput, Prisma.BranchUncheckedCreateWithoutUsersInput>
  where?: Prisma.BranchWhereInput
}

export type BranchUpdateToOneWithWhereWithoutUsersInput = {
  where?: Prisma.BranchWhereInput
  data: Prisma.XOR<Prisma.BranchUpdateWithoutUsersInput, Prisma.BranchUncheckedUpdateWithoutUsersInput>
}

export type BranchUpdateWithoutUsersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  address?: Prisma.StringFieldUpdateOperationsInput | string
  beginEffective?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endEffective?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  transactions?: Prisma.TransactionUpdateManyWithoutBranchNestedInput
}

export type BranchUncheckedUpdateWithoutUsersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  address?: Prisma.StringFieldUpdateOperationsInput | string
  beginEffective?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endEffective?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  transactions?: Prisma.TransactionUncheckedUpdateManyWithoutBranchNestedInput
}

export type BranchCreateWithoutTransactionsInput = {
  id?: string
  code: string
  name: string
  address: string
  beginEffective: Date | string
  endEffective?: Date | string | null
  createdAt?: Date | string
  modifiedAt?: Date | string
  users?: Prisma.UserBranchCreateNestedManyWithoutBranchInput
}

export type BranchUncheckedCreateWithoutTransactionsInput = {
  id?: string
  code: string
  name: string
  address: string
  beginEffective: Date | string
  endEffective?: Date | string | null
  createdAt?: Date | string
  modifiedAt?: Date | string
  users?: Prisma.UserBranchUncheckedCreateNestedManyWithoutBranchInput
}

export type BranchCreateOrConnectWithoutTransactionsInput = {
  where: Prisma.BranchWhereUniqueInput
  create: Prisma.XOR<Prisma.BranchCreateWithoutTransactionsInput, Prisma.BranchUncheckedCreateWithoutTransactionsInput>
}

export type BranchUpsertWithoutTransactionsInput = {
  update: Prisma.XOR<Prisma.BranchUpdateWithoutTransactionsInput, Prisma.BranchUncheckedUpdateWithoutTransactionsInput>
  create: Prisma.XOR<Prisma.BranchCreateWithoutTransactionsInput, Prisma.BranchUncheckedCreateWithoutTransactionsInput>
  where?: Prisma.BranchWhereInput
}

export type BranchUpdateToOneWithWhereWithoutTransactionsInput = {
  where?: Prisma.BranchWhereInput
  data: Prisma.XOR<Prisma.BranchUpdateWithoutTransactionsInput, Prisma.BranchUncheckedUpdateWithoutTransactionsInput>
}

export type BranchUpdateWithoutTransactionsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  address?: Prisma.StringFieldUpdateOperationsInput | string
  beginEffective?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endEffective?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  users?: Prisma.UserBranchUpdateManyWithoutBranchNestedInput
}

export type BranchUncheckedUpdateWithoutTransactionsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  code?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  address?: Prisma.StringFieldUpdateOperationsInput | string
  beginEffective?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  endEffective?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  users?: Prisma.UserBranchUncheckedUpdateManyWithoutBranchNestedInput
}


/**
 * Count Type BranchCountOutputType
 */

export type BranchCountOutputType = {
  users: number
  transactions: number
}

export type BranchCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  users?: boolean | BranchCountOutputTypeCountUsersArgs
  transactions?: boolean | BranchCountOutputTypeCountTransactionsArgs
}

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

/**
 * BranchCountOutputType without action
 */
export type BranchCountOutputTypeCountUsersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.UserBranchWhereInput
}

/**
 * BranchCountOutputType without action
 */
export type BranchCountOutputTypeCountTransactionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.TransactionWhereInput
}


export type BranchSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  code?: boolean
  name?: boolean
  address?: boolean
  beginEffective?: boolean
  endEffective?: boolean
  createdAt?: boolean
  modifiedAt?: boolean
  users?: boolean | Prisma.Branch$usersArgs<ExtArgs>
  transactions?: boolean | Prisma.Branch$transactionsArgs<ExtArgs>
  _count?: boolean | Prisma.BranchCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["branch"]>

export type BranchSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  code?: boolean
  name?: boolean
  address?: boolean
  beginEffective?: boolean
  endEffective?: boolean
  createdAt?: boolean
  modifiedAt?: boolean
}, ExtArgs["result"]["branch"]>

export type BranchSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  code?: boolean
  name?: boolean
  address?: boolean
  beginEffective?: boolean
  endEffective?: boolean
  createdAt?: boolean
  modifiedAt?: boolean
}, ExtArgs["result"]["branch"]>

export type BranchSelectScalar = {
  id?: boolean
  code?: boolean
  name?: boolean
  address?: boolean
  beginEffective?: boolean
  endEffective?: boolean
  createdAt?: boolean
  modifiedAt?: boolean
}

export type BranchOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "name" | "address" | "beginEffective" | "endEffective" | "createdAt" | "modifiedAt", ExtArgs["result"]["branch"]>
export type BranchInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  users?: boolean | Prisma.Branch$usersArgs<ExtArgs>
  transactions?: boolean | Prisma.Branch$transactionsArgs<ExtArgs>
  _count?: boolean | Prisma.BranchCountOutputTypeDefaultArgs<ExtArgs>
}
export type BranchIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}
export type BranchIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}

export type $BranchPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "Branch"
  objects: {
    users: Prisma.$UserBranchPayload<ExtArgs>[]
    transactions: Prisma.$TransactionPayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    code: string
    name: string
    address: string
    beginEffective: Date
    endEffective: Date | null
    createdAt: Date
    modifiedAt: Date
  }, ExtArgs["result"]["branch"]>
  composites: {}
}

export type BranchGetPayload<S extends boolean | null | undefined | BranchDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$BranchPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for Branch.
 * 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__BranchClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  users<T extends Prisma.Branch$usersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Branch$usersArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$UserBranchPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  transactions<T extends Prisma.Branch$transactionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Branch$transactionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$TransactionPayload<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 Branch model
 */
export interface BranchFieldRefs {
  readonly id: Prisma.FieldRef<"Branch", 'String'>
  readonly code: Prisma.FieldRef<"Branch", 'String'>
  readonly name: Prisma.FieldRef<"Branch", 'String'>
  readonly address: Prisma.FieldRef<"Branch", 'String'>
  readonly beginEffective: Prisma.FieldRef<"Branch", 'DateTime'>
  readonly endEffective: Prisma.FieldRef<"Branch", 'DateTime'>
  readonly createdAt: Prisma.FieldRef<"Branch", 'DateTime'>
  readonly modifiedAt: Prisma.FieldRef<"Branch", 'DateTime'>
}
    

// Custom InputTypes
/**
 * Branch findUnique
 */
export type BranchFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Branch
   */
  select?: Prisma.BranchSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Branch
   */
  omit?: Prisma.BranchOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BranchInclude<ExtArgs> | null
  /**
   * Filter, which Branch to fetch.
   */
  where: Prisma.BranchWhereUniqueInput
}

/**
 * Branch findUniqueOrThrow
 */
export type BranchFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Branch
   */
  select?: Prisma.BranchSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Branch
   */
  omit?: Prisma.BranchOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BranchInclude<ExtArgs> | null
  /**
   * Filter, which Branch to fetch.
   */
  where: Prisma.BranchWhereUniqueInput
}

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

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

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

/**
 * Branch create
 */
export type BranchCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Branch
   */
  select?: Prisma.BranchSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Branch
   */
  omit?: Prisma.BranchOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BranchInclude<ExtArgs> | null
  /**
   * The data needed to create a Branch.
   */
  data: Prisma.XOR<Prisma.BranchCreateInput, Prisma.BranchUncheckedCreateInput>
}

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

/**
 * Branch createManyAndReturn
 */
export type BranchCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Branch
   */
  select?: Prisma.BranchSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Branch
   */
  omit?: Prisma.BranchOmit<ExtArgs> | null
  /**
   * The data used to create many Branches.
   */
  data: Prisma.BranchCreateManyInput | Prisma.BranchCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * Branch update
 */
export type BranchUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Branch
   */
  select?: Prisma.BranchSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Branch
   */
  omit?: Prisma.BranchOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BranchInclude<ExtArgs> | null
  /**
   * The data needed to update a Branch.
   */
  data: Prisma.XOR<Prisma.BranchUpdateInput, Prisma.BranchUncheckedUpdateInput>
  /**
   * Choose, which Branch to update.
   */
  where: Prisma.BranchWhereUniqueInput
}

/**
 * Branch updateMany
 */
export type BranchUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update Branches.
   */
  data: Prisma.XOR<Prisma.BranchUpdateManyMutationInput, Prisma.BranchUncheckedUpdateManyInput>
  /**
   * Filter which Branches to update
   */
  where?: Prisma.BranchWhereInput
  /**
   * Limit how many Branches to update.
   */
  limit?: number
}

/**
 * Branch updateManyAndReturn
 */
export type BranchUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Branch
   */
  select?: Prisma.BranchSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Branch
   */
  omit?: Prisma.BranchOmit<ExtArgs> | null
  /**
   * The data used to update Branches.
   */
  data: Prisma.XOR<Prisma.BranchUpdateManyMutationInput, Prisma.BranchUncheckedUpdateManyInput>
  /**
   * Filter which Branches to update
   */
  where?: Prisma.BranchWhereInput
  /**
   * Limit how many Branches to update.
   */
  limit?: number
}

/**
 * Branch upsert
 */
export type BranchUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Branch
   */
  select?: Prisma.BranchSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Branch
   */
  omit?: Prisma.BranchOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BranchInclude<ExtArgs> | null
  /**
   * The filter to search for the Branch to update in case it exists.
   */
  where: Prisma.BranchWhereUniqueInput
  /**
   * In case the Branch found by the `where` argument doesn't exist, create a new Branch with this data.
   */
  create: Prisma.XOR<Prisma.BranchCreateInput, Prisma.BranchUncheckedCreateInput>
  /**
   * In case the Branch was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.BranchUpdateInput, Prisma.BranchUncheckedUpdateInput>
}

/**
 * Branch delete
 */
export type BranchDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Branch
   */
  select?: Prisma.BranchSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Branch
   */
  omit?: Prisma.BranchOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BranchInclude<ExtArgs> | null
  /**
   * Filter which Branch to delete.
   */
  where: Prisma.BranchWhereUniqueInput
}

/**
 * Branch deleteMany
 */
export type BranchDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Branches to delete
   */
  where?: Prisma.BranchWhereInput
  /**
   * Limit how many Branches to delete.
   */
  limit?: number
}

/**
 * Branch.users
 */
export type Branch$usersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the UserBranch
   */
  select?: Prisma.UserBranchSelect<ExtArgs> | null
  /**
   * Omit specific fields from the UserBranch
   */
  omit?: Prisma.UserBranchOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.UserBranchInclude<ExtArgs> | null
  where?: Prisma.UserBranchWhereInput
  orderBy?: Prisma.UserBranchOrderByWithRelationInput | Prisma.UserBranchOrderByWithRelationInput[]
  cursor?: Prisma.UserBranchWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.UserBranchScalarFieldEnum | Prisma.UserBranchScalarFieldEnum[]
}

/**
 * Branch.transactions
 */
export type Branch$transactionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Transaction
   */
  select?: Prisma.TransactionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Transaction
   */
  omit?: Prisma.TransactionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TransactionInclude<ExtArgs> | null
  where?: Prisma.TransactionWhereInput
  orderBy?: Prisma.TransactionOrderByWithRelationInput | Prisma.TransactionOrderByWithRelationInput[]
  cursor?: Prisma.TransactionWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.TransactionScalarFieldEnum | Prisma.TransactionScalarFieldEnum[]
}

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