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

export type AggregateTransactionItem = {
  _count: TransactionItemCountAggregateOutputType | null
  _avg: TransactionItemAvgAggregateOutputType | null
  _sum: TransactionItemSumAggregateOutputType | null
  _min: TransactionItemMinAggregateOutputType | null
  _max: TransactionItemMaxAggregateOutputType | null
}

export type TransactionItemAvgAggregateOutputType = {
  grossWeight: runtime.Decimal | null
  netWeight: runtime.Decimal | null
  pricePerGram: runtime.Decimal | null
  purityPercent: runtime.Decimal | null
  totalPrice: runtime.Decimal | null
}

export type TransactionItemSumAggregateOutputType = {
  grossWeight: runtime.Decimal | null
  netWeight: runtime.Decimal | null
  pricePerGram: runtime.Decimal | null
  purityPercent: runtime.Decimal | null
  totalPrice: runtime.Decimal | null
}

export type TransactionItemMinAggregateOutputType = {
  id: string | null
  transactionId: string | null
  itemCode: string | null
  itemTypeId: string | null
  grossWeight: runtime.Decimal | null
  netWeight: runtime.Decimal | null
  caratId: string | null
  pricePerGram: runtime.Decimal | null
  pricePerGramAt: Date | null
  purityPercent: runtime.Decimal | null
  totalPrice: runtime.Decimal | null
  isAdjusted: boolean | null
  createdAt: Date | null
  modifiedAt: Date | null
}

export type TransactionItemMaxAggregateOutputType = {
  id: string | null
  transactionId: string | null
  itemCode: string | null
  itemTypeId: string | null
  grossWeight: runtime.Decimal | null
  netWeight: runtime.Decimal | null
  caratId: string | null
  pricePerGram: runtime.Decimal | null
  pricePerGramAt: Date | null
  purityPercent: runtime.Decimal | null
  totalPrice: runtime.Decimal | null
  isAdjusted: boolean | null
  createdAt: Date | null
  modifiedAt: Date | null
}

export type TransactionItemCountAggregateOutputType = {
  id: number
  transactionId: number
  itemCode: number
  itemTypeId: number
  grossWeight: number
  netWeight: number
  caratId: number
  pricePerGram: number
  pricePerGramAt: number
  purityPercent: number
  totalPrice: number
  isAdjusted: number
  createdAt: number
  modifiedAt: number
  _all: number
}


export type TransactionItemAvgAggregateInputType = {
  grossWeight?: true
  netWeight?: true
  pricePerGram?: true
  purityPercent?: true
  totalPrice?: true
}

export type TransactionItemSumAggregateInputType = {
  grossWeight?: true
  netWeight?: true
  pricePerGram?: true
  purityPercent?: true
  totalPrice?: true
}

export type TransactionItemMinAggregateInputType = {
  id?: true
  transactionId?: true
  itemCode?: true
  itemTypeId?: true
  grossWeight?: true
  netWeight?: true
  caratId?: true
  pricePerGram?: true
  pricePerGramAt?: true
  purityPercent?: true
  totalPrice?: true
  isAdjusted?: true
  createdAt?: true
  modifiedAt?: true
}

export type TransactionItemMaxAggregateInputType = {
  id?: true
  transactionId?: true
  itemCode?: true
  itemTypeId?: true
  grossWeight?: true
  netWeight?: true
  caratId?: true
  pricePerGram?: true
  pricePerGramAt?: true
  purityPercent?: true
  totalPrice?: true
  isAdjusted?: true
  createdAt?: true
  modifiedAt?: true
}

export type TransactionItemCountAggregateInputType = {
  id?: true
  transactionId?: true
  itemCode?: true
  itemTypeId?: true
  grossWeight?: true
  netWeight?: true
  caratId?: true
  pricePerGram?: true
  pricePerGramAt?: true
  purityPercent?: true
  totalPrice?: true
  isAdjusted?: true
  createdAt?: true
  modifiedAt?: true
  _all?: true
}

export type TransactionItemAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which TransactionItem to aggregate.
   */
  where?: Prisma.TransactionItemWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of TransactionItems to fetch.
   */
  orderBy?: Prisma.TransactionItemOrderByWithRelationInput | Prisma.TransactionItemOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.TransactionItemWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` TransactionItems 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` TransactionItems.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned TransactionItems
  **/
  _count?: true | TransactionItemCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: TransactionItemAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: TransactionItemSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: TransactionItemMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: TransactionItemMaxAggregateInputType
}

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




export type TransactionItemGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.TransactionItemWhereInput
  orderBy?: Prisma.TransactionItemOrderByWithAggregationInput | Prisma.TransactionItemOrderByWithAggregationInput[]
  by: Prisma.TransactionItemScalarFieldEnum[] | Prisma.TransactionItemScalarFieldEnum
  having?: Prisma.TransactionItemScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: TransactionItemCountAggregateInputType | true
  _avg?: TransactionItemAvgAggregateInputType
  _sum?: TransactionItemSumAggregateInputType
  _min?: TransactionItemMinAggregateInputType
  _max?: TransactionItemMaxAggregateInputType
}

export type TransactionItemGroupByOutputType = {
  id: string
  transactionId: string
  itemCode: string | null
  itemTypeId: string
  grossWeight: runtime.Decimal
  netWeight: runtime.Decimal
  caratId: string
  pricePerGram: runtime.Decimal
  pricePerGramAt: Date
  purityPercent: runtime.Decimal
  totalPrice: runtime.Decimal
  isAdjusted: boolean
  createdAt: Date
  modifiedAt: Date
  _count: TransactionItemCountAggregateOutputType | null
  _avg: TransactionItemAvgAggregateOutputType | null
  _sum: TransactionItemSumAggregateOutputType | null
  _min: TransactionItemMinAggregateOutputType | null
  _max: TransactionItemMaxAggregateOutputType | null
}

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



export type TransactionItemWhereInput = {
  AND?: Prisma.TransactionItemWhereInput | Prisma.TransactionItemWhereInput[]
  OR?: Prisma.TransactionItemWhereInput[]
  NOT?: Prisma.TransactionItemWhereInput | Prisma.TransactionItemWhereInput[]
  id?: Prisma.StringFilter<"TransactionItem"> | string
  transactionId?: Prisma.StringFilter<"TransactionItem"> | string
  itemCode?: Prisma.StringNullableFilter<"TransactionItem"> | string | null
  itemTypeId?: Prisma.UuidFilter<"TransactionItem"> | string
  grossWeight?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFilter<"TransactionItem"> | string
  pricePerGram?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFilter<"TransactionItem"> | Date | string
  purityPercent?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFilter<"TransactionItem"> | boolean
  createdAt?: Prisma.DateTimeFilter<"TransactionItem"> | Date | string
  modifiedAt?: Prisma.DateTimeFilter<"TransactionItem"> | Date | string
  transaction?: Prisma.XOR<Prisma.TransactionScalarRelationFilter, Prisma.TransactionWhereInput>
  itemType?: Prisma.XOR<Prisma.ItemTypeScalarRelationFilter, Prisma.ItemTypeWhereInput>
  images?: Prisma.TransactionItemPhotoListRelationFilter
  docs?: Prisma.TransactionItemDocListRelationFilter
}

export type TransactionItemOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  transactionId?: Prisma.SortOrder
  itemCode?: Prisma.SortOrderInput | Prisma.SortOrder
  itemTypeId?: Prisma.SortOrder
  grossWeight?: Prisma.SortOrder
  netWeight?: Prisma.SortOrder
  caratId?: Prisma.SortOrder
  pricePerGram?: Prisma.SortOrder
  pricePerGramAt?: Prisma.SortOrder
  purityPercent?: Prisma.SortOrder
  totalPrice?: Prisma.SortOrder
  isAdjusted?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
  transaction?: Prisma.TransactionOrderByWithRelationInput
  itemType?: Prisma.ItemTypeOrderByWithRelationInput
  images?: Prisma.TransactionItemPhotoOrderByRelationAggregateInput
  docs?: Prisma.TransactionItemDocOrderByRelationAggregateInput
}

export type TransactionItemWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  AND?: Prisma.TransactionItemWhereInput | Prisma.TransactionItemWhereInput[]
  OR?: Prisma.TransactionItemWhereInput[]
  NOT?: Prisma.TransactionItemWhereInput | Prisma.TransactionItemWhereInput[]
  transactionId?: Prisma.StringFilter<"TransactionItem"> | string
  itemCode?: Prisma.StringNullableFilter<"TransactionItem"> | string | null
  itemTypeId?: Prisma.UuidFilter<"TransactionItem"> | string
  grossWeight?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFilter<"TransactionItem"> | string
  pricePerGram?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFilter<"TransactionItem"> | Date | string
  purityPercent?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFilter<"TransactionItem"> | boolean
  createdAt?: Prisma.DateTimeFilter<"TransactionItem"> | Date | string
  modifiedAt?: Prisma.DateTimeFilter<"TransactionItem"> | Date | string
  transaction?: Prisma.XOR<Prisma.TransactionScalarRelationFilter, Prisma.TransactionWhereInput>
  itemType?: Prisma.XOR<Prisma.ItemTypeScalarRelationFilter, Prisma.ItemTypeWhereInput>
  images?: Prisma.TransactionItemPhotoListRelationFilter
  docs?: Prisma.TransactionItemDocListRelationFilter
}, "id">

export type TransactionItemOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  transactionId?: Prisma.SortOrder
  itemCode?: Prisma.SortOrderInput | Prisma.SortOrder
  itemTypeId?: Prisma.SortOrder
  grossWeight?: Prisma.SortOrder
  netWeight?: Prisma.SortOrder
  caratId?: Prisma.SortOrder
  pricePerGram?: Prisma.SortOrder
  pricePerGramAt?: Prisma.SortOrder
  purityPercent?: Prisma.SortOrder
  totalPrice?: Prisma.SortOrder
  isAdjusted?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
  _count?: Prisma.TransactionItemCountOrderByAggregateInput
  _avg?: Prisma.TransactionItemAvgOrderByAggregateInput
  _max?: Prisma.TransactionItemMaxOrderByAggregateInput
  _min?: Prisma.TransactionItemMinOrderByAggregateInput
  _sum?: Prisma.TransactionItemSumOrderByAggregateInput
}

export type TransactionItemScalarWhereWithAggregatesInput = {
  AND?: Prisma.TransactionItemScalarWhereWithAggregatesInput | Prisma.TransactionItemScalarWhereWithAggregatesInput[]
  OR?: Prisma.TransactionItemScalarWhereWithAggregatesInput[]
  NOT?: Prisma.TransactionItemScalarWhereWithAggregatesInput | Prisma.TransactionItemScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"TransactionItem"> | string
  transactionId?: Prisma.StringWithAggregatesFilter<"TransactionItem"> | string
  itemCode?: Prisma.StringNullableWithAggregatesFilter<"TransactionItem"> | string | null
  itemTypeId?: Prisma.UuidWithAggregatesFilter<"TransactionItem"> | string
  grossWeight?: Prisma.DecimalWithAggregatesFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalWithAggregatesFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringWithAggregatesFilter<"TransactionItem"> | string
  pricePerGram?: Prisma.DecimalWithAggregatesFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeWithAggregatesFilter<"TransactionItem"> | Date | string
  purityPercent?: Prisma.DecimalWithAggregatesFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalWithAggregatesFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolWithAggregatesFilter<"TransactionItem"> | boolean
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"TransactionItem"> | Date | string
  modifiedAt?: Prisma.DateTimeWithAggregatesFilter<"TransactionItem"> | Date | string
}

export type TransactionItemCreateInput = {
  id?: string
  itemCode?: string | null
  grossWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId: string
  pricePerGram: runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt: Date | string
  purityPercent: runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
  transaction: Prisma.TransactionCreateNestedOneWithoutItemsInput
  itemType: Prisma.ItemTypeCreateNestedOneWithoutTransactionItemsInput
  images?: Prisma.TransactionItemPhotoCreateNestedManyWithoutItemInput
  docs?: Prisma.TransactionItemDocCreateNestedManyWithoutTransactionItemInput
}

export type TransactionItemUncheckedCreateInput = {
  id?: string
  transactionId: string
  itemCode?: string | null
  itemTypeId: string
  grossWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId: string
  pricePerGram: runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt: Date | string
  purityPercent: runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
  images?: Prisma.TransactionItemPhotoUncheckedCreateNestedManyWithoutItemInput
  docs?: Prisma.TransactionItemDocUncheckedCreateNestedManyWithoutTransactionItemInput
}

export type TransactionItemUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  itemCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  grossWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFieldUpdateOperationsInput | string
  pricePerGram?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  purityPercent?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  transaction?: Prisma.TransactionUpdateOneRequiredWithoutItemsNestedInput
  itemType?: Prisma.ItemTypeUpdateOneRequiredWithoutTransactionItemsNestedInput
  images?: Prisma.TransactionItemPhotoUpdateManyWithoutItemNestedInput
  docs?: Prisma.TransactionItemDocUpdateManyWithoutTransactionItemNestedInput
}

export type TransactionItemUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  transactionId?: Prisma.StringFieldUpdateOperationsInput | string
  itemCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  itemTypeId?: Prisma.StringFieldUpdateOperationsInput | string
  grossWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFieldUpdateOperationsInput | string
  pricePerGram?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  purityPercent?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  images?: Prisma.TransactionItemPhotoUncheckedUpdateManyWithoutItemNestedInput
  docs?: Prisma.TransactionItemDocUncheckedUpdateManyWithoutTransactionItemNestedInput
}

export type TransactionItemCreateManyInput = {
  id?: string
  transactionId: string
  itemCode?: string | null
  itemTypeId: string
  grossWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId: string
  pricePerGram: runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt: Date | string
  purityPercent: runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
}

export type TransactionItemUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  itemCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  grossWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFieldUpdateOperationsInput | string
  pricePerGram?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  purityPercent?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type TransactionItemUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  transactionId?: Prisma.StringFieldUpdateOperationsInput | string
  itemCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  itemTypeId?: Prisma.StringFieldUpdateOperationsInput | string
  grossWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFieldUpdateOperationsInput | string
  pricePerGram?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  purityPercent?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type TransactionItemListRelationFilter = {
  every?: Prisma.TransactionItemWhereInput
  some?: Prisma.TransactionItemWhereInput
  none?: Prisma.TransactionItemWhereInput
}

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

export type TransactionItemCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  transactionId?: Prisma.SortOrder
  itemCode?: Prisma.SortOrder
  itemTypeId?: Prisma.SortOrder
  grossWeight?: Prisma.SortOrder
  netWeight?: Prisma.SortOrder
  caratId?: Prisma.SortOrder
  pricePerGram?: Prisma.SortOrder
  pricePerGramAt?: Prisma.SortOrder
  purityPercent?: Prisma.SortOrder
  totalPrice?: Prisma.SortOrder
  isAdjusted?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
}

export type TransactionItemAvgOrderByAggregateInput = {
  grossWeight?: Prisma.SortOrder
  netWeight?: Prisma.SortOrder
  pricePerGram?: Prisma.SortOrder
  purityPercent?: Prisma.SortOrder
  totalPrice?: Prisma.SortOrder
}

export type TransactionItemMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  transactionId?: Prisma.SortOrder
  itemCode?: Prisma.SortOrder
  itemTypeId?: Prisma.SortOrder
  grossWeight?: Prisma.SortOrder
  netWeight?: Prisma.SortOrder
  caratId?: Prisma.SortOrder
  pricePerGram?: Prisma.SortOrder
  pricePerGramAt?: Prisma.SortOrder
  purityPercent?: Prisma.SortOrder
  totalPrice?: Prisma.SortOrder
  isAdjusted?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
}

export type TransactionItemMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  transactionId?: Prisma.SortOrder
  itemCode?: Prisma.SortOrder
  itemTypeId?: Prisma.SortOrder
  grossWeight?: Prisma.SortOrder
  netWeight?: Prisma.SortOrder
  caratId?: Prisma.SortOrder
  pricePerGram?: Prisma.SortOrder
  pricePerGramAt?: Prisma.SortOrder
  purityPercent?: Prisma.SortOrder
  totalPrice?: Prisma.SortOrder
  isAdjusted?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  modifiedAt?: Prisma.SortOrder
}

export type TransactionItemSumOrderByAggregateInput = {
  grossWeight?: Prisma.SortOrder
  netWeight?: Prisma.SortOrder
  pricePerGram?: Prisma.SortOrder
  purityPercent?: Prisma.SortOrder
  totalPrice?: Prisma.SortOrder
}

export type TransactionItemScalarRelationFilter = {
  is?: Prisma.TransactionItemWhereInput
  isNot?: Prisma.TransactionItemWhereInput
}

export type TransactionItemCreateNestedManyWithoutTransactionInput = {
  create?: Prisma.XOR<Prisma.TransactionItemCreateWithoutTransactionInput, Prisma.TransactionItemUncheckedCreateWithoutTransactionInput> | Prisma.TransactionItemCreateWithoutTransactionInput[] | Prisma.TransactionItemUncheckedCreateWithoutTransactionInput[]
  connectOrCreate?: Prisma.TransactionItemCreateOrConnectWithoutTransactionInput | Prisma.TransactionItemCreateOrConnectWithoutTransactionInput[]
  createMany?: Prisma.TransactionItemCreateManyTransactionInputEnvelope
  connect?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
}

export type TransactionItemUncheckedCreateNestedManyWithoutTransactionInput = {
  create?: Prisma.XOR<Prisma.TransactionItemCreateWithoutTransactionInput, Prisma.TransactionItemUncheckedCreateWithoutTransactionInput> | Prisma.TransactionItemCreateWithoutTransactionInput[] | Prisma.TransactionItemUncheckedCreateWithoutTransactionInput[]
  connectOrCreate?: Prisma.TransactionItemCreateOrConnectWithoutTransactionInput | Prisma.TransactionItemCreateOrConnectWithoutTransactionInput[]
  createMany?: Prisma.TransactionItemCreateManyTransactionInputEnvelope
  connect?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
}

export type TransactionItemUpdateManyWithoutTransactionNestedInput = {
  create?: Prisma.XOR<Prisma.TransactionItemCreateWithoutTransactionInput, Prisma.TransactionItemUncheckedCreateWithoutTransactionInput> | Prisma.TransactionItemCreateWithoutTransactionInput[] | Prisma.TransactionItemUncheckedCreateWithoutTransactionInput[]
  connectOrCreate?: Prisma.TransactionItemCreateOrConnectWithoutTransactionInput | Prisma.TransactionItemCreateOrConnectWithoutTransactionInput[]
  upsert?: Prisma.TransactionItemUpsertWithWhereUniqueWithoutTransactionInput | Prisma.TransactionItemUpsertWithWhereUniqueWithoutTransactionInput[]
  createMany?: Prisma.TransactionItemCreateManyTransactionInputEnvelope
  set?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  disconnect?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  delete?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  connect?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  update?: Prisma.TransactionItemUpdateWithWhereUniqueWithoutTransactionInput | Prisma.TransactionItemUpdateWithWhereUniqueWithoutTransactionInput[]
  updateMany?: Prisma.TransactionItemUpdateManyWithWhereWithoutTransactionInput | Prisma.TransactionItemUpdateManyWithWhereWithoutTransactionInput[]
  deleteMany?: Prisma.TransactionItemScalarWhereInput | Prisma.TransactionItemScalarWhereInput[]
}

export type TransactionItemUncheckedUpdateManyWithoutTransactionNestedInput = {
  create?: Prisma.XOR<Prisma.TransactionItemCreateWithoutTransactionInput, Prisma.TransactionItemUncheckedCreateWithoutTransactionInput> | Prisma.TransactionItemCreateWithoutTransactionInput[] | Prisma.TransactionItemUncheckedCreateWithoutTransactionInput[]
  connectOrCreate?: Prisma.TransactionItemCreateOrConnectWithoutTransactionInput | Prisma.TransactionItemCreateOrConnectWithoutTransactionInput[]
  upsert?: Prisma.TransactionItemUpsertWithWhereUniqueWithoutTransactionInput | Prisma.TransactionItemUpsertWithWhereUniqueWithoutTransactionInput[]
  createMany?: Prisma.TransactionItemCreateManyTransactionInputEnvelope
  set?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  disconnect?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  delete?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  connect?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  update?: Prisma.TransactionItemUpdateWithWhereUniqueWithoutTransactionInput | Prisma.TransactionItemUpdateWithWhereUniqueWithoutTransactionInput[]
  updateMany?: Prisma.TransactionItemUpdateManyWithWhereWithoutTransactionInput | Prisma.TransactionItemUpdateManyWithWhereWithoutTransactionInput[]
  deleteMany?: Prisma.TransactionItemScalarWhereInput | Prisma.TransactionItemScalarWhereInput[]
}

export type DecimalFieldUpdateOperationsInput = {
  set?: runtime.Decimal | runtime.DecimalJsLike | number | string
  increment?: runtime.Decimal | runtime.DecimalJsLike | number | string
  decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string
  multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string
  divide?: runtime.Decimal | runtime.DecimalJsLike | number | string
}

export type TransactionItemCreateNestedOneWithoutImagesInput = {
  create?: Prisma.XOR<Prisma.TransactionItemCreateWithoutImagesInput, Prisma.TransactionItemUncheckedCreateWithoutImagesInput>
  connectOrCreate?: Prisma.TransactionItemCreateOrConnectWithoutImagesInput
  connect?: Prisma.TransactionItemWhereUniqueInput
}

export type TransactionItemUpdateOneRequiredWithoutImagesNestedInput = {
  create?: Prisma.XOR<Prisma.TransactionItemCreateWithoutImagesInput, Prisma.TransactionItemUncheckedCreateWithoutImagesInput>
  connectOrCreate?: Prisma.TransactionItemCreateOrConnectWithoutImagesInput
  upsert?: Prisma.TransactionItemUpsertWithoutImagesInput
  connect?: Prisma.TransactionItemWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.TransactionItemUpdateToOneWithWhereWithoutImagesInput, Prisma.TransactionItemUpdateWithoutImagesInput>, Prisma.TransactionItemUncheckedUpdateWithoutImagesInput>
}

export type TransactionItemCreateNestedManyWithoutItemTypeInput = {
  create?: Prisma.XOR<Prisma.TransactionItemCreateWithoutItemTypeInput, Prisma.TransactionItemUncheckedCreateWithoutItemTypeInput> | Prisma.TransactionItemCreateWithoutItemTypeInput[] | Prisma.TransactionItemUncheckedCreateWithoutItemTypeInput[]
  connectOrCreate?: Prisma.TransactionItemCreateOrConnectWithoutItemTypeInput | Prisma.TransactionItemCreateOrConnectWithoutItemTypeInput[]
  createMany?: Prisma.TransactionItemCreateManyItemTypeInputEnvelope
  connect?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
}

export type TransactionItemUncheckedCreateNestedManyWithoutItemTypeInput = {
  create?: Prisma.XOR<Prisma.TransactionItemCreateWithoutItemTypeInput, Prisma.TransactionItemUncheckedCreateWithoutItemTypeInput> | Prisma.TransactionItemCreateWithoutItemTypeInput[] | Prisma.TransactionItemUncheckedCreateWithoutItemTypeInput[]
  connectOrCreate?: Prisma.TransactionItemCreateOrConnectWithoutItemTypeInput | Prisma.TransactionItemCreateOrConnectWithoutItemTypeInput[]
  createMany?: Prisma.TransactionItemCreateManyItemTypeInputEnvelope
  connect?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
}

export type TransactionItemUpdateManyWithoutItemTypeNestedInput = {
  create?: Prisma.XOR<Prisma.TransactionItemCreateWithoutItemTypeInput, Prisma.TransactionItemUncheckedCreateWithoutItemTypeInput> | Prisma.TransactionItemCreateWithoutItemTypeInput[] | Prisma.TransactionItemUncheckedCreateWithoutItemTypeInput[]
  connectOrCreate?: Prisma.TransactionItemCreateOrConnectWithoutItemTypeInput | Prisma.TransactionItemCreateOrConnectWithoutItemTypeInput[]
  upsert?: Prisma.TransactionItemUpsertWithWhereUniqueWithoutItemTypeInput | Prisma.TransactionItemUpsertWithWhereUniqueWithoutItemTypeInput[]
  createMany?: Prisma.TransactionItemCreateManyItemTypeInputEnvelope
  set?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  disconnect?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  delete?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  connect?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  update?: Prisma.TransactionItemUpdateWithWhereUniqueWithoutItemTypeInput | Prisma.TransactionItemUpdateWithWhereUniqueWithoutItemTypeInput[]
  updateMany?: Prisma.TransactionItemUpdateManyWithWhereWithoutItemTypeInput | Prisma.TransactionItemUpdateManyWithWhereWithoutItemTypeInput[]
  deleteMany?: Prisma.TransactionItemScalarWhereInput | Prisma.TransactionItemScalarWhereInput[]
}

export type TransactionItemUncheckedUpdateManyWithoutItemTypeNestedInput = {
  create?: Prisma.XOR<Prisma.TransactionItemCreateWithoutItemTypeInput, Prisma.TransactionItemUncheckedCreateWithoutItemTypeInput> | Prisma.TransactionItemCreateWithoutItemTypeInput[] | Prisma.TransactionItemUncheckedCreateWithoutItemTypeInput[]
  connectOrCreate?: Prisma.TransactionItemCreateOrConnectWithoutItemTypeInput | Prisma.TransactionItemCreateOrConnectWithoutItemTypeInput[]
  upsert?: Prisma.TransactionItemUpsertWithWhereUniqueWithoutItemTypeInput | Prisma.TransactionItemUpsertWithWhereUniqueWithoutItemTypeInput[]
  createMany?: Prisma.TransactionItemCreateManyItemTypeInputEnvelope
  set?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  disconnect?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  delete?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  connect?: Prisma.TransactionItemWhereUniqueInput | Prisma.TransactionItemWhereUniqueInput[]
  update?: Prisma.TransactionItemUpdateWithWhereUniqueWithoutItemTypeInput | Prisma.TransactionItemUpdateWithWhereUniqueWithoutItemTypeInput[]
  updateMany?: Prisma.TransactionItemUpdateManyWithWhereWithoutItemTypeInput | Prisma.TransactionItemUpdateManyWithWhereWithoutItemTypeInput[]
  deleteMany?: Prisma.TransactionItemScalarWhereInput | Prisma.TransactionItemScalarWhereInput[]
}

export type TransactionItemCreateNestedOneWithoutDocsInput = {
  create?: Prisma.XOR<Prisma.TransactionItemCreateWithoutDocsInput, Prisma.TransactionItemUncheckedCreateWithoutDocsInput>
  connectOrCreate?: Prisma.TransactionItemCreateOrConnectWithoutDocsInput
  connect?: Prisma.TransactionItemWhereUniqueInput
}

export type TransactionItemUpdateOneRequiredWithoutDocsNestedInput = {
  create?: Prisma.XOR<Prisma.TransactionItemCreateWithoutDocsInput, Prisma.TransactionItemUncheckedCreateWithoutDocsInput>
  connectOrCreate?: Prisma.TransactionItemCreateOrConnectWithoutDocsInput
  upsert?: Prisma.TransactionItemUpsertWithoutDocsInput
  connect?: Prisma.TransactionItemWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.TransactionItemUpdateToOneWithWhereWithoutDocsInput, Prisma.TransactionItemUpdateWithoutDocsInput>, Prisma.TransactionItemUncheckedUpdateWithoutDocsInput>
}

export type TransactionItemCreateWithoutTransactionInput = {
  id?: string
  itemCode?: string | null
  grossWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId: string
  pricePerGram: runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt: Date | string
  purityPercent: runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
  itemType: Prisma.ItemTypeCreateNestedOneWithoutTransactionItemsInput
  images?: Prisma.TransactionItemPhotoCreateNestedManyWithoutItemInput
  docs?: Prisma.TransactionItemDocCreateNestedManyWithoutTransactionItemInput
}

export type TransactionItemUncheckedCreateWithoutTransactionInput = {
  id?: string
  itemCode?: string | null
  itemTypeId: string
  grossWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId: string
  pricePerGram: runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt: Date | string
  purityPercent: runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
  images?: Prisma.TransactionItemPhotoUncheckedCreateNestedManyWithoutItemInput
  docs?: Prisma.TransactionItemDocUncheckedCreateNestedManyWithoutTransactionItemInput
}

export type TransactionItemCreateOrConnectWithoutTransactionInput = {
  where: Prisma.TransactionItemWhereUniqueInput
  create: Prisma.XOR<Prisma.TransactionItemCreateWithoutTransactionInput, Prisma.TransactionItemUncheckedCreateWithoutTransactionInput>
}

export type TransactionItemCreateManyTransactionInputEnvelope = {
  data: Prisma.TransactionItemCreateManyTransactionInput | Prisma.TransactionItemCreateManyTransactionInput[]
  skipDuplicates?: boolean
}

export type TransactionItemUpsertWithWhereUniqueWithoutTransactionInput = {
  where: Prisma.TransactionItemWhereUniqueInput
  update: Prisma.XOR<Prisma.TransactionItemUpdateWithoutTransactionInput, Prisma.TransactionItemUncheckedUpdateWithoutTransactionInput>
  create: Prisma.XOR<Prisma.TransactionItemCreateWithoutTransactionInput, Prisma.TransactionItemUncheckedCreateWithoutTransactionInput>
}

export type TransactionItemUpdateWithWhereUniqueWithoutTransactionInput = {
  where: Prisma.TransactionItemWhereUniqueInput
  data: Prisma.XOR<Prisma.TransactionItemUpdateWithoutTransactionInput, Prisma.TransactionItemUncheckedUpdateWithoutTransactionInput>
}

export type TransactionItemUpdateManyWithWhereWithoutTransactionInput = {
  where: Prisma.TransactionItemScalarWhereInput
  data: Prisma.XOR<Prisma.TransactionItemUpdateManyMutationInput, Prisma.TransactionItemUncheckedUpdateManyWithoutTransactionInput>
}

export type TransactionItemScalarWhereInput = {
  AND?: Prisma.TransactionItemScalarWhereInput | Prisma.TransactionItemScalarWhereInput[]
  OR?: Prisma.TransactionItemScalarWhereInput[]
  NOT?: Prisma.TransactionItemScalarWhereInput | Prisma.TransactionItemScalarWhereInput[]
  id?: Prisma.StringFilter<"TransactionItem"> | string
  transactionId?: Prisma.StringFilter<"TransactionItem"> | string
  itemCode?: Prisma.StringNullableFilter<"TransactionItem"> | string | null
  itemTypeId?: Prisma.UuidFilter<"TransactionItem"> | string
  grossWeight?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFilter<"TransactionItem"> | string
  pricePerGram?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFilter<"TransactionItem"> | Date | string
  purityPercent?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFilter<"TransactionItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFilter<"TransactionItem"> | boolean
  createdAt?: Prisma.DateTimeFilter<"TransactionItem"> | Date | string
  modifiedAt?: Prisma.DateTimeFilter<"TransactionItem"> | Date | string
}

export type TransactionItemCreateWithoutImagesInput = {
  id?: string
  itemCode?: string | null
  grossWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId: string
  pricePerGram: runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt: Date | string
  purityPercent: runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
  transaction: Prisma.TransactionCreateNestedOneWithoutItemsInput
  itemType: Prisma.ItemTypeCreateNestedOneWithoutTransactionItemsInput
  docs?: Prisma.TransactionItemDocCreateNestedManyWithoutTransactionItemInput
}

export type TransactionItemUncheckedCreateWithoutImagesInput = {
  id?: string
  transactionId: string
  itemCode?: string | null
  itemTypeId: string
  grossWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId: string
  pricePerGram: runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt: Date | string
  purityPercent: runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
  docs?: Prisma.TransactionItemDocUncheckedCreateNestedManyWithoutTransactionItemInput
}

export type TransactionItemCreateOrConnectWithoutImagesInput = {
  where: Prisma.TransactionItemWhereUniqueInput
  create: Prisma.XOR<Prisma.TransactionItemCreateWithoutImagesInput, Prisma.TransactionItemUncheckedCreateWithoutImagesInput>
}

export type TransactionItemUpsertWithoutImagesInput = {
  update: Prisma.XOR<Prisma.TransactionItemUpdateWithoutImagesInput, Prisma.TransactionItemUncheckedUpdateWithoutImagesInput>
  create: Prisma.XOR<Prisma.TransactionItemCreateWithoutImagesInput, Prisma.TransactionItemUncheckedCreateWithoutImagesInput>
  where?: Prisma.TransactionItemWhereInput
}

export type TransactionItemUpdateToOneWithWhereWithoutImagesInput = {
  where?: Prisma.TransactionItemWhereInput
  data: Prisma.XOR<Prisma.TransactionItemUpdateWithoutImagesInput, Prisma.TransactionItemUncheckedUpdateWithoutImagesInput>
}

export type TransactionItemUpdateWithoutImagesInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  itemCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  grossWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFieldUpdateOperationsInput | string
  pricePerGram?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  purityPercent?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  transaction?: Prisma.TransactionUpdateOneRequiredWithoutItemsNestedInput
  itemType?: Prisma.ItemTypeUpdateOneRequiredWithoutTransactionItemsNestedInput
  docs?: Prisma.TransactionItemDocUpdateManyWithoutTransactionItemNestedInput
}

export type TransactionItemUncheckedUpdateWithoutImagesInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  transactionId?: Prisma.StringFieldUpdateOperationsInput | string
  itemCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  itemTypeId?: Prisma.StringFieldUpdateOperationsInput | string
  grossWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFieldUpdateOperationsInput | string
  pricePerGram?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  purityPercent?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  docs?: Prisma.TransactionItemDocUncheckedUpdateManyWithoutTransactionItemNestedInput
}

export type TransactionItemCreateWithoutItemTypeInput = {
  id?: string
  itemCode?: string | null
  grossWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId: string
  pricePerGram: runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt: Date | string
  purityPercent: runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
  transaction: Prisma.TransactionCreateNestedOneWithoutItemsInput
  images?: Prisma.TransactionItemPhotoCreateNestedManyWithoutItemInput
  docs?: Prisma.TransactionItemDocCreateNestedManyWithoutTransactionItemInput
}

export type TransactionItemUncheckedCreateWithoutItemTypeInput = {
  id?: string
  transactionId: string
  itemCode?: string | null
  grossWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId: string
  pricePerGram: runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt: Date | string
  purityPercent: runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
  images?: Prisma.TransactionItemPhotoUncheckedCreateNestedManyWithoutItemInput
  docs?: Prisma.TransactionItemDocUncheckedCreateNestedManyWithoutTransactionItemInput
}

export type TransactionItemCreateOrConnectWithoutItemTypeInput = {
  where: Prisma.TransactionItemWhereUniqueInput
  create: Prisma.XOR<Prisma.TransactionItemCreateWithoutItemTypeInput, Prisma.TransactionItemUncheckedCreateWithoutItemTypeInput>
}

export type TransactionItemCreateManyItemTypeInputEnvelope = {
  data: Prisma.TransactionItemCreateManyItemTypeInput | Prisma.TransactionItemCreateManyItemTypeInput[]
  skipDuplicates?: boolean
}

export type TransactionItemUpsertWithWhereUniqueWithoutItemTypeInput = {
  where: Prisma.TransactionItemWhereUniqueInput
  update: Prisma.XOR<Prisma.TransactionItemUpdateWithoutItemTypeInput, Prisma.TransactionItemUncheckedUpdateWithoutItemTypeInput>
  create: Prisma.XOR<Prisma.TransactionItemCreateWithoutItemTypeInput, Prisma.TransactionItemUncheckedCreateWithoutItemTypeInput>
}

export type TransactionItemUpdateWithWhereUniqueWithoutItemTypeInput = {
  where: Prisma.TransactionItemWhereUniqueInput
  data: Prisma.XOR<Prisma.TransactionItemUpdateWithoutItemTypeInput, Prisma.TransactionItemUncheckedUpdateWithoutItemTypeInput>
}

export type TransactionItemUpdateManyWithWhereWithoutItemTypeInput = {
  where: Prisma.TransactionItemScalarWhereInput
  data: Prisma.XOR<Prisma.TransactionItemUpdateManyMutationInput, Prisma.TransactionItemUncheckedUpdateManyWithoutItemTypeInput>
}

export type TransactionItemCreateWithoutDocsInput = {
  id?: string
  itemCode?: string | null
  grossWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId: string
  pricePerGram: runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt: Date | string
  purityPercent: runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
  transaction: Prisma.TransactionCreateNestedOneWithoutItemsInput
  itemType: Prisma.ItemTypeCreateNestedOneWithoutTransactionItemsInput
  images?: Prisma.TransactionItemPhotoCreateNestedManyWithoutItemInput
}

export type TransactionItemUncheckedCreateWithoutDocsInput = {
  id?: string
  transactionId: string
  itemCode?: string | null
  itemTypeId: string
  grossWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId: string
  pricePerGram: runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt: Date | string
  purityPercent: runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
  images?: Prisma.TransactionItemPhotoUncheckedCreateNestedManyWithoutItemInput
}

export type TransactionItemCreateOrConnectWithoutDocsInput = {
  where: Prisma.TransactionItemWhereUniqueInput
  create: Prisma.XOR<Prisma.TransactionItemCreateWithoutDocsInput, Prisma.TransactionItemUncheckedCreateWithoutDocsInput>
}

export type TransactionItemUpsertWithoutDocsInput = {
  update: Prisma.XOR<Prisma.TransactionItemUpdateWithoutDocsInput, Prisma.TransactionItemUncheckedUpdateWithoutDocsInput>
  create: Prisma.XOR<Prisma.TransactionItemCreateWithoutDocsInput, Prisma.TransactionItemUncheckedCreateWithoutDocsInput>
  where?: Prisma.TransactionItemWhereInput
}

export type TransactionItemUpdateToOneWithWhereWithoutDocsInput = {
  where?: Prisma.TransactionItemWhereInput
  data: Prisma.XOR<Prisma.TransactionItemUpdateWithoutDocsInput, Prisma.TransactionItemUncheckedUpdateWithoutDocsInput>
}

export type TransactionItemUpdateWithoutDocsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  itemCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  grossWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFieldUpdateOperationsInput | string
  pricePerGram?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  purityPercent?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  transaction?: Prisma.TransactionUpdateOneRequiredWithoutItemsNestedInput
  itemType?: Prisma.ItemTypeUpdateOneRequiredWithoutTransactionItemsNestedInput
  images?: Prisma.TransactionItemPhotoUpdateManyWithoutItemNestedInput
}

export type TransactionItemUncheckedUpdateWithoutDocsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  transactionId?: Prisma.StringFieldUpdateOperationsInput | string
  itemCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  itemTypeId?: Prisma.StringFieldUpdateOperationsInput | string
  grossWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFieldUpdateOperationsInput | string
  pricePerGram?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  purityPercent?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  images?: Prisma.TransactionItemPhotoUncheckedUpdateManyWithoutItemNestedInput
}

export type TransactionItemCreateManyTransactionInput = {
  id?: string
  itemCode?: string | null
  itemTypeId: string
  grossWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId: string
  pricePerGram: runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt: Date | string
  purityPercent: runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
}

export type TransactionItemUpdateWithoutTransactionInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  itemCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  grossWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFieldUpdateOperationsInput | string
  pricePerGram?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  purityPercent?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  itemType?: Prisma.ItemTypeUpdateOneRequiredWithoutTransactionItemsNestedInput
  images?: Prisma.TransactionItemPhotoUpdateManyWithoutItemNestedInput
  docs?: Prisma.TransactionItemDocUpdateManyWithoutTransactionItemNestedInput
}

export type TransactionItemUncheckedUpdateWithoutTransactionInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  itemCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  itemTypeId?: Prisma.StringFieldUpdateOperationsInput | string
  grossWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFieldUpdateOperationsInput | string
  pricePerGram?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  purityPercent?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  images?: Prisma.TransactionItemPhotoUncheckedUpdateManyWithoutItemNestedInput
  docs?: Prisma.TransactionItemDocUncheckedUpdateManyWithoutTransactionItemNestedInput
}

export type TransactionItemUncheckedUpdateManyWithoutTransactionInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  itemCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  itemTypeId?: Prisma.StringFieldUpdateOperationsInput | string
  grossWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFieldUpdateOperationsInput | string
  pricePerGram?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  purityPercent?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type TransactionItemCreateManyItemTypeInput = {
  id?: string
  transactionId: string
  itemCode?: string | null
  grossWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight: runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId: string
  pricePerGram: runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt: Date | string
  purityPercent: runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: boolean
  createdAt?: Date | string
  modifiedAt?: Date | string
}

export type TransactionItemUpdateWithoutItemTypeInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  itemCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  grossWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFieldUpdateOperationsInput | string
  pricePerGram?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  purityPercent?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  transaction?: Prisma.TransactionUpdateOneRequiredWithoutItemsNestedInput
  images?: Prisma.TransactionItemPhotoUpdateManyWithoutItemNestedInput
  docs?: Prisma.TransactionItemDocUpdateManyWithoutTransactionItemNestedInput
}

export type TransactionItemUncheckedUpdateWithoutItemTypeInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  transactionId?: Prisma.StringFieldUpdateOperationsInput | string
  itemCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  grossWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFieldUpdateOperationsInput | string
  pricePerGram?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  purityPercent?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  images?: Prisma.TransactionItemPhotoUncheckedUpdateManyWithoutItemNestedInput
  docs?: Prisma.TransactionItemDocUncheckedUpdateManyWithoutTransactionItemNestedInput
}

export type TransactionItemUncheckedUpdateManyWithoutItemTypeInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  transactionId?: Prisma.StringFieldUpdateOperationsInput | string
  itemCode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  grossWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  netWeight?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  caratId?: Prisma.StringFieldUpdateOperationsInput | string
  pricePerGram?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  pricePerGramAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  purityPercent?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  totalPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
  isAdjusted?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  modifiedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}


/**
 * Count Type TransactionItemCountOutputType
 */

export type TransactionItemCountOutputType = {
  images: number
  docs: number
}

export type TransactionItemCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  images?: boolean | TransactionItemCountOutputTypeCountImagesArgs
  docs?: boolean | TransactionItemCountOutputTypeCountDocsArgs
}

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

/**
 * TransactionItemCountOutputType without action
 */
export type TransactionItemCountOutputTypeCountImagesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.TransactionItemPhotoWhereInput
}

/**
 * TransactionItemCountOutputType without action
 */
export type TransactionItemCountOutputTypeCountDocsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.TransactionItemDocWhereInput
}


export type TransactionItemSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  transactionId?: boolean
  itemCode?: boolean
  itemTypeId?: boolean
  grossWeight?: boolean
  netWeight?: boolean
  caratId?: boolean
  pricePerGram?: boolean
  pricePerGramAt?: boolean
  purityPercent?: boolean
  totalPrice?: boolean
  isAdjusted?: boolean
  createdAt?: boolean
  modifiedAt?: boolean
  transaction?: boolean | Prisma.TransactionDefaultArgs<ExtArgs>
  itemType?: boolean | Prisma.ItemTypeDefaultArgs<ExtArgs>
  images?: boolean | Prisma.TransactionItem$imagesArgs<ExtArgs>
  docs?: boolean | Prisma.TransactionItem$docsArgs<ExtArgs>
  _count?: boolean | Prisma.TransactionItemCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["transactionItem"]>

export type TransactionItemSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  transactionId?: boolean
  itemCode?: boolean
  itemTypeId?: boolean
  grossWeight?: boolean
  netWeight?: boolean
  caratId?: boolean
  pricePerGram?: boolean
  pricePerGramAt?: boolean
  purityPercent?: boolean
  totalPrice?: boolean
  isAdjusted?: boolean
  createdAt?: boolean
  modifiedAt?: boolean
  transaction?: boolean | Prisma.TransactionDefaultArgs<ExtArgs>
  itemType?: boolean | Prisma.ItemTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["transactionItem"]>

export type TransactionItemSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  transactionId?: boolean
  itemCode?: boolean
  itemTypeId?: boolean
  grossWeight?: boolean
  netWeight?: boolean
  caratId?: boolean
  pricePerGram?: boolean
  pricePerGramAt?: boolean
  purityPercent?: boolean
  totalPrice?: boolean
  isAdjusted?: boolean
  createdAt?: boolean
  modifiedAt?: boolean
  transaction?: boolean | Prisma.TransactionDefaultArgs<ExtArgs>
  itemType?: boolean | Prisma.ItemTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["transactionItem"]>

export type TransactionItemSelectScalar = {
  id?: boolean
  transactionId?: boolean
  itemCode?: boolean
  itemTypeId?: boolean
  grossWeight?: boolean
  netWeight?: boolean
  caratId?: boolean
  pricePerGram?: boolean
  pricePerGramAt?: boolean
  purityPercent?: boolean
  totalPrice?: boolean
  isAdjusted?: boolean
  createdAt?: boolean
  modifiedAt?: boolean
}

export type TransactionItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "transactionId" | "itemCode" | "itemTypeId" | "grossWeight" | "netWeight" | "caratId" | "pricePerGram" | "pricePerGramAt" | "purityPercent" | "totalPrice" | "isAdjusted" | "createdAt" | "modifiedAt", ExtArgs["result"]["transactionItem"]>
export type TransactionItemInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  transaction?: boolean | Prisma.TransactionDefaultArgs<ExtArgs>
  itemType?: boolean | Prisma.ItemTypeDefaultArgs<ExtArgs>
  images?: boolean | Prisma.TransactionItem$imagesArgs<ExtArgs>
  docs?: boolean | Prisma.TransactionItem$docsArgs<ExtArgs>
  _count?: boolean | Prisma.TransactionItemCountOutputTypeDefaultArgs<ExtArgs>
}
export type TransactionItemIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  transaction?: boolean | Prisma.TransactionDefaultArgs<ExtArgs>
  itemType?: boolean | Prisma.ItemTypeDefaultArgs<ExtArgs>
}
export type TransactionItemIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  transaction?: boolean | Prisma.TransactionDefaultArgs<ExtArgs>
  itemType?: boolean | Prisma.ItemTypeDefaultArgs<ExtArgs>
}

export type $TransactionItemPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "TransactionItem"
  objects: {
    transaction: Prisma.$TransactionPayload<ExtArgs>
    itemType: Prisma.$ItemTypePayload<ExtArgs>
    images: Prisma.$TransactionItemPhotoPayload<ExtArgs>[]
    docs: Prisma.$TransactionItemDocPayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    transactionId: string
    itemCode: string | null
    itemTypeId: string
    grossWeight: runtime.Decimal
    netWeight: runtime.Decimal
    caratId: string
    pricePerGram: runtime.Decimal
    pricePerGramAt: Date
    purityPercent: runtime.Decimal
    totalPrice: runtime.Decimal
    isAdjusted: boolean
    createdAt: Date
    modifiedAt: Date
  }, ExtArgs["result"]["transactionItem"]>
  composites: {}
}

export type TransactionItemGetPayload<S extends boolean | null | undefined | TransactionItemDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$TransactionItemPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for TransactionItem.
 * 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__TransactionItemClient<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>
  itemType<T extends Prisma.ItemTypeDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ItemTypeDefaultArgs<ExtArgs>>): Prisma.Prisma__ItemTypeClient<runtime.Types.Result.GetResult<Prisma.$ItemTypePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
  images<T extends Prisma.TransactionItem$imagesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.TransactionItem$imagesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$TransactionItemPhotoPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  docs<T extends Prisma.TransactionItem$docsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.TransactionItem$docsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$TransactionItemDocPayload<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 TransactionItem model
 */
export interface TransactionItemFieldRefs {
  readonly id: Prisma.FieldRef<"TransactionItem", 'String'>
  readonly transactionId: Prisma.FieldRef<"TransactionItem", 'String'>
  readonly itemCode: Prisma.FieldRef<"TransactionItem", 'String'>
  readonly itemTypeId: Prisma.FieldRef<"TransactionItem", 'String'>
  readonly grossWeight: Prisma.FieldRef<"TransactionItem", 'Decimal'>
  readonly netWeight: Prisma.FieldRef<"TransactionItem", 'Decimal'>
  readonly caratId: Prisma.FieldRef<"TransactionItem", 'String'>
  readonly pricePerGram: Prisma.FieldRef<"TransactionItem", 'Decimal'>
  readonly pricePerGramAt: Prisma.FieldRef<"TransactionItem", 'DateTime'>
  readonly purityPercent: Prisma.FieldRef<"TransactionItem", 'Decimal'>
  readonly totalPrice: Prisma.FieldRef<"TransactionItem", 'Decimal'>
  readonly isAdjusted: Prisma.FieldRef<"TransactionItem", 'Boolean'>
  readonly createdAt: Prisma.FieldRef<"TransactionItem", 'DateTime'>
  readonly modifiedAt: Prisma.FieldRef<"TransactionItem", 'DateTime'>
}
    

// Custom InputTypes
/**
 * TransactionItem findUnique
 */
export type TransactionItemFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TransactionItem
   */
  select?: Prisma.TransactionItemSelect<ExtArgs> | null
  /**
   * Omit specific fields from the TransactionItem
   */
  omit?: Prisma.TransactionItemOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TransactionItemInclude<ExtArgs> | null
  /**
   * Filter, which TransactionItem to fetch.
   */
  where: Prisma.TransactionItemWhereUniqueInput
}

/**
 * TransactionItem findUniqueOrThrow
 */
export type TransactionItemFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TransactionItem
   */
  select?: Prisma.TransactionItemSelect<ExtArgs> | null
  /**
   * Omit specific fields from the TransactionItem
   */
  omit?: Prisma.TransactionItemOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TransactionItemInclude<ExtArgs> | null
  /**
   * Filter, which TransactionItem to fetch.
   */
  where: Prisma.TransactionItemWhereUniqueInput
}

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

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

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

/**
 * TransactionItem create
 */
export type TransactionItemCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TransactionItem
   */
  select?: Prisma.TransactionItemSelect<ExtArgs> | null
  /**
   * Omit specific fields from the TransactionItem
   */
  omit?: Prisma.TransactionItemOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TransactionItemInclude<ExtArgs> | null
  /**
   * The data needed to create a TransactionItem.
   */
  data: Prisma.XOR<Prisma.TransactionItemCreateInput, Prisma.TransactionItemUncheckedCreateInput>
}

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

/**
 * TransactionItem createManyAndReturn
 */
export type TransactionItemCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TransactionItem
   */
  select?: Prisma.TransactionItemSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the TransactionItem
   */
  omit?: Prisma.TransactionItemOmit<ExtArgs> | null
  /**
   * The data used to create many TransactionItems.
   */
  data: Prisma.TransactionItemCreateManyInput | Prisma.TransactionItemCreateManyInput[]
  skipDuplicates?: boolean
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TransactionItemIncludeCreateManyAndReturn<ExtArgs> | null
}

/**
 * TransactionItem update
 */
export type TransactionItemUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TransactionItem
   */
  select?: Prisma.TransactionItemSelect<ExtArgs> | null
  /**
   * Omit specific fields from the TransactionItem
   */
  omit?: Prisma.TransactionItemOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TransactionItemInclude<ExtArgs> | null
  /**
   * The data needed to update a TransactionItem.
   */
  data: Prisma.XOR<Prisma.TransactionItemUpdateInput, Prisma.TransactionItemUncheckedUpdateInput>
  /**
   * Choose, which TransactionItem to update.
   */
  where: Prisma.TransactionItemWhereUniqueInput
}

/**
 * TransactionItem updateMany
 */
export type TransactionItemUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update TransactionItems.
   */
  data: Prisma.XOR<Prisma.TransactionItemUpdateManyMutationInput, Prisma.TransactionItemUncheckedUpdateManyInput>
  /**
   * Filter which TransactionItems to update
   */
  where?: Prisma.TransactionItemWhereInput
  /**
   * Limit how many TransactionItems to update.
   */
  limit?: number
}

/**
 * TransactionItem updateManyAndReturn
 */
export type TransactionItemUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TransactionItem
   */
  select?: Prisma.TransactionItemSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the TransactionItem
   */
  omit?: Prisma.TransactionItemOmit<ExtArgs> | null
  /**
   * The data used to update TransactionItems.
   */
  data: Prisma.XOR<Prisma.TransactionItemUpdateManyMutationInput, Prisma.TransactionItemUncheckedUpdateManyInput>
  /**
   * Filter which TransactionItems to update
   */
  where?: Prisma.TransactionItemWhereInput
  /**
   * Limit how many TransactionItems to update.
   */
  limit?: number
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TransactionItemIncludeUpdateManyAndReturn<ExtArgs> | null
}

/**
 * TransactionItem upsert
 */
export type TransactionItemUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TransactionItem
   */
  select?: Prisma.TransactionItemSelect<ExtArgs> | null
  /**
   * Omit specific fields from the TransactionItem
   */
  omit?: Prisma.TransactionItemOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TransactionItemInclude<ExtArgs> | null
  /**
   * The filter to search for the TransactionItem to update in case it exists.
   */
  where: Prisma.TransactionItemWhereUniqueInput
  /**
   * In case the TransactionItem found by the `where` argument doesn't exist, create a new TransactionItem with this data.
   */
  create: Prisma.XOR<Prisma.TransactionItemCreateInput, Prisma.TransactionItemUncheckedCreateInput>
  /**
   * In case the TransactionItem was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.TransactionItemUpdateInput, Prisma.TransactionItemUncheckedUpdateInput>
}

/**
 * TransactionItem delete
 */
export type TransactionItemDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TransactionItem
   */
  select?: Prisma.TransactionItemSelect<ExtArgs> | null
  /**
   * Omit specific fields from the TransactionItem
   */
  omit?: Prisma.TransactionItemOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TransactionItemInclude<ExtArgs> | null
  /**
   * Filter which TransactionItem to delete.
   */
  where: Prisma.TransactionItemWhereUniqueInput
}

/**
 * TransactionItem deleteMany
 */
export type TransactionItemDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which TransactionItems to delete
   */
  where?: Prisma.TransactionItemWhereInput
  /**
   * Limit how many TransactionItems to delete.
   */
  limit?: number
}

/**
 * TransactionItem.images
 */
export type TransactionItem$imagesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TransactionItemPhoto
   */
  select?: Prisma.TransactionItemPhotoSelect<ExtArgs> | null
  /**
   * Omit specific fields from the TransactionItemPhoto
   */
  omit?: Prisma.TransactionItemPhotoOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TransactionItemPhotoInclude<ExtArgs> | null
  where?: Prisma.TransactionItemPhotoWhereInput
  orderBy?: Prisma.TransactionItemPhotoOrderByWithRelationInput | Prisma.TransactionItemPhotoOrderByWithRelationInput[]
  cursor?: Prisma.TransactionItemPhotoWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.TransactionItemPhotoScalarFieldEnum | Prisma.TransactionItemPhotoScalarFieldEnum[]
}

/**
 * TransactionItem.docs
 */
export type TransactionItem$docsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the TransactionItemDoc
   */
  select?: Prisma.TransactionItemDocSelect<ExtArgs> | null
  /**
   * Omit specific fields from the TransactionItemDoc
   */
  omit?: Prisma.TransactionItemDocOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TransactionItemDocInclude<ExtArgs> | null
  where?: Prisma.TransactionItemDocWhereInput
  orderBy?: Prisma.TransactionItemDocOrderByWithRelationInput | Prisma.TransactionItemDocOrderByWithRelationInput[]
  cursor?: Prisma.TransactionItemDocWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.TransactionItemDocScalarFieldEnum | Prisma.TransactionItemDocScalarFieldEnum[]
}

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