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

export type AggregateAttachments = {
  _count: AttachmentsCountAggregateOutputType | null
  _avg: AttachmentsAvgAggregateOutputType | null
  _sum: AttachmentsSumAggregateOutputType | null
  _min: AttachmentsMinAggregateOutputType | null
  _max: AttachmentsMaxAggregateOutputType | null
}

export type AttachmentsAvgAggregateOutputType = {
  id: number | null
}

export type AttachmentsSumAggregateOutputType = {
  id: number | null
}

export type AttachmentsMinAggregateOutputType = {
  id: number | null
  sha256: string | null
  owner_type: string | null
  owner_id: string | null
  status: $Enums.AttachmentStatus | null
  created_by: string | null
  created_at: Date | null
  original_name: string | null
  retention_policy: $Enums.RetentionPolicy | null
}

export type AttachmentsMaxAggregateOutputType = {
  id: number | null
  sha256: string | null
  owner_type: string | null
  owner_id: string | null
  status: $Enums.AttachmentStatus | null
  created_by: string | null
  created_at: Date | null
  original_name: string | null
  retention_policy: $Enums.RetentionPolicy | null
}

export type AttachmentsCountAggregateOutputType = {
  id: number
  sha256: number
  owner_type: number
  owner_id: number
  status: number
  created_by: number
  created_at: number
  original_name: number
  retention_policy: number
  _all: number
}


export type AttachmentsAvgAggregateInputType = {
  id?: true
}

export type AttachmentsSumAggregateInputType = {
  id?: true
}

export type AttachmentsMinAggregateInputType = {
  id?: true
  sha256?: true
  owner_type?: true
  owner_id?: true
  status?: true
  created_by?: true
  created_at?: true
  original_name?: true
  retention_policy?: true
}

export type AttachmentsMaxAggregateInputType = {
  id?: true
  sha256?: true
  owner_type?: true
  owner_id?: true
  status?: true
  created_by?: true
  created_at?: true
  original_name?: true
  retention_policy?: true
}

export type AttachmentsCountAggregateInputType = {
  id?: true
  sha256?: true
  owner_type?: true
  owner_id?: true
  status?: true
  created_by?: true
  created_at?: true
  original_name?: true
  retention_policy?: true
  _all?: true
}

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

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




export type AttachmentsGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.AttachmentsWhereInput
  orderBy?: Prisma.AttachmentsOrderByWithAggregationInput | Prisma.AttachmentsOrderByWithAggregationInput[]
  by: Prisma.AttachmentsScalarFieldEnum[] | Prisma.AttachmentsScalarFieldEnum
  having?: Prisma.AttachmentsScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: AttachmentsCountAggregateInputType | true
  _avg?: AttachmentsAvgAggregateInputType
  _sum?: AttachmentsSumAggregateInputType
  _min?: AttachmentsMinAggregateInputType
  _max?: AttachmentsMaxAggregateInputType
}

export type AttachmentsGroupByOutputType = {
  id: number
  sha256: string
  owner_type: string
  owner_id: string
  status: $Enums.AttachmentStatus
  created_by: string
  created_at: Date
  original_name: string
  retention_policy: $Enums.RetentionPolicy
  _count: AttachmentsCountAggregateOutputType | null
  _avg: AttachmentsAvgAggregateOutputType | null
  _sum: AttachmentsSumAggregateOutputType | null
  _min: AttachmentsMinAggregateOutputType | null
  _max: AttachmentsMaxAggregateOutputType | null
}

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



export type AttachmentsWhereInput = {
  AND?: Prisma.AttachmentsWhereInput | Prisma.AttachmentsWhereInput[]
  OR?: Prisma.AttachmentsWhereInput[]
  NOT?: Prisma.AttachmentsWhereInput | Prisma.AttachmentsWhereInput[]
  id?: Prisma.IntFilter<"Attachments"> | number
  sha256?: Prisma.StringFilter<"Attachments"> | string
  owner_type?: Prisma.StringFilter<"Attachments"> | string
  owner_id?: Prisma.StringFilter<"Attachments"> | string
  status?: Prisma.EnumAttachmentStatusFilter<"Attachments"> | $Enums.AttachmentStatus
  created_by?: Prisma.StringFilter<"Attachments"> | string
  created_at?: Prisma.DateTimeFilter<"Attachments"> | Date | string
  original_name?: Prisma.StringFilter<"Attachments"> | string
  retention_policy?: Prisma.EnumRetentionPolicyFilter<"Attachments"> | $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsListRelationFilter
  blob?: Prisma.XOR<Prisma.BlobsScalarRelationFilter, Prisma.BlobsWhereInput>
  expenses?: Prisma.ExpensesListRelationFilter
  expenses_archive?: Prisma.ExpensesArchiveListRelationFilter
}

export type AttachmentsOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  sha256?: Prisma.SortOrder
  owner_type?: Prisma.SortOrder
  owner_id?: Prisma.SortOrder
  status?: Prisma.SortOrder
  created_by?: Prisma.SortOrder
  created_at?: Prisma.SortOrder
  original_name?: Prisma.SortOrder
  retention_policy?: Prisma.SortOrder
  AttachmentVariants?: Prisma.AttachmentVariantsOrderByRelationAggregateInput
  blob?: Prisma.BlobsOrderByWithRelationInput
  expenses?: Prisma.ExpensesOrderByRelationAggregateInput
  expenses_archive?: Prisma.ExpensesArchiveOrderByRelationAggregateInput
}

export type AttachmentsWhereUniqueInput = Prisma.AtLeast<{
  id?: number
  AND?: Prisma.AttachmentsWhereInput | Prisma.AttachmentsWhereInput[]
  OR?: Prisma.AttachmentsWhereInput[]
  NOT?: Prisma.AttachmentsWhereInput | Prisma.AttachmentsWhereInput[]
  sha256?: Prisma.StringFilter<"Attachments"> | string
  owner_type?: Prisma.StringFilter<"Attachments"> | string
  owner_id?: Prisma.StringFilter<"Attachments"> | string
  status?: Prisma.EnumAttachmentStatusFilter<"Attachments"> | $Enums.AttachmentStatus
  created_by?: Prisma.StringFilter<"Attachments"> | string
  created_at?: Prisma.DateTimeFilter<"Attachments"> | Date | string
  original_name?: Prisma.StringFilter<"Attachments"> | string
  retention_policy?: Prisma.EnumRetentionPolicyFilter<"Attachments"> | $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsListRelationFilter
  blob?: Prisma.XOR<Prisma.BlobsScalarRelationFilter, Prisma.BlobsWhereInput>
  expenses?: Prisma.ExpensesListRelationFilter
  expenses_archive?: Prisma.ExpensesArchiveListRelationFilter
}, "id">

export type AttachmentsOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  sha256?: Prisma.SortOrder
  owner_type?: Prisma.SortOrder
  owner_id?: Prisma.SortOrder
  status?: Prisma.SortOrder
  created_by?: Prisma.SortOrder
  created_at?: Prisma.SortOrder
  original_name?: Prisma.SortOrder
  retention_policy?: Prisma.SortOrder
  _count?: Prisma.AttachmentsCountOrderByAggregateInput
  _avg?: Prisma.AttachmentsAvgOrderByAggregateInput
  _max?: Prisma.AttachmentsMaxOrderByAggregateInput
  _min?: Prisma.AttachmentsMinOrderByAggregateInput
  _sum?: Prisma.AttachmentsSumOrderByAggregateInput
}

export type AttachmentsScalarWhereWithAggregatesInput = {
  AND?: Prisma.AttachmentsScalarWhereWithAggregatesInput | Prisma.AttachmentsScalarWhereWithAggregatesInput[]
  OR?: Prisma.AttachmentsScalarWhereWithAggregatesInput[]
  NOT?: Prisma.AttachmentsScalarWhereWithAggregatesInput | Prisma.AttachmentsScalarWhereWithAggregatesInput[]
  id?: Prisma.IntWithAggregatesFilter<"Attachments"> | number
  sha256?: Prisma.StringWithAggregatesFilter<"Attachments"> | string
  owner_type?: Prisma.StringWithAggregatesFilter<"Attachments"> | string
  owner_id?: Prisma.StringWithAggregatesFilter<"Attachments"> | string
  status?: Prisma.EnumAttachmentStatusWithAggregatesFilter<"Attachments"> | $Enums.AttachmentStatus
  created_by?: Prisma.StringWithAggregatesFilter<"Attachments"> | string
  created_at?: Prisma.DateTimeWithAggregatesFilter<"Attachments"> | Date | string
  original_name?: Prisma.StringWithAggregatesFilter<"Attachments"> | string
  retention_policy?: Prisma.EnumRetentionPolicyWithAggregatesFilter<"Attachments"> | $Enums.RetentionPolicy
}

export type AttachmentsCreateInput = {
  owner_type: string
  owner_id: string
  status?: $Enums.AttachmentStatus
  created_by: string
  created_at?: Date | string
  original_name: string
  retention_policy: $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsCreateNestedManyWithoutAttachmentInput
  blob: Prisma.BlobsCreateNestedOneWithoutAttachmentsInput
  expenses?: Prisma.ExpensesCreateNestedManyWithoutAttachment_recordInput
  expenses_archive?: Prisma.ExpensesArchiveCreateNestedManyWithoutAttachment_recordInput
}

export type AttachmentsUncheckedCreateInput = {
  id?: number
  sha256: string
  owner_type: string
  owner_id: string
  status?: $Enums.AttachmentStatus
  created_by: string
  created_at?: Date | string
  original_name: string
  retention_policy: $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsUncheckedCreateNestedManyWithoutAttachmentInput
  expenses?: Prisma.ExpensesUncheckedCreateNestedManyWithoutAttachment_recordInput
  expenses_archive?: Prisma.ExpensesArchiveUncheckedCreateNestedManyWithoutAttachment_recordInput
}

export type AttachmentsUpdateInput = {
  owner_type?: Prisma.StringFieldUpdateOperationsInput | string
  owner_id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus
  created_by?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  original_name?: Prisma.StringFieldUpdateOperationsInput | string
  retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsUpdateManyWithoutAttachmentNestedInput
  blob?: Prisma.BlobsUpdateOneRequiredWithoutAttachmentsNestedInput
  expenses?: Prisma.ExpensesUpdateManyWithoutAttachment_recordNestedInput
  expenses_archive?: Prisma.ExpensesArchiveUpdateManyWithoutAttachment_recordNestedInput
}

export type AttachmentsUncheckedUpdateInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  sha256?: Prisma.StringFieldUpdateOperationsInput | string
  owner_type?: Prisma.StringFieldUpdateOperationsInput | string
  owner_id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus
  created_by?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  original_name?: Prisma.StringFieldUpdateOperationsInput | string
  retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsUncheckedUpdateManyWithoutAttachmentNestedInput
  expenses?: Prisma.ExpensesUncheckedUpdateManyWithoutAttachment_recordNestedInput
  expenses_archive?: Prisma.ExpensesArchiveUncheckedUpdateManyWithoutAttachment_recordNestedInput
}

export type AttachmentsCreateManyInput = {
  id?: number
  sha256: string
  owner_type: string
  owner_id: string
  status?: $Enums.AttachmentStatus
  created_by: string
  created_at?: Date | string
  original_name: string
  retention_policy: $Enums.RetentionPolicy
}

export type AttachmentsUpdateManyMutationInput = {
  owner_type?: Prisma.StringFieldUpdateOperationsInput | string
  owner_id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus
  created_by?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  original_name?: Prisma.StringFieldUpdateOperationsInput | string
  retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy
}

export type AttachmentsUncheckedUpdateManyInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  sha256?: Prisma.StringFieldUpdateOperationsInput | string
  owner_type?: Prisma.StringFieldUpdateOperationsInput | string
  owner_id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus
  created_by?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  original_name?: Prisma.StringFieldUpdateOperationsInput | string
  retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy
}

export type AttachmentsNullableScalarRelationFilter = {
  is?: Prisma.AttachmentsWhereInput | null
  isNot?: Prisma.AttachmentsWhereInput | null
}

export type AttachmentsListRelationFilter = {
  every?: Prisma.AttachmentsWhereInput
  some?: Prisma.AttachmentsWhereInput
  none?: Prisma.AttachmentsWhereInput
}

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

export type AttachmentsCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  sha256?: Prisma.SortOrder
  owner_type?: Prisma.SortOrder
  owner_id?: Prisma.SortOrder
  status?: Prisma.SortOrder
  created_by?: Prisma.SortOrder
  created_at?: Prisma.SortOrder
  original_name?: Prisma.SortOrder
  retention_policy?: Prisma.SortOrder
}

export type AttachmentsAvgOrderByAggregateInput = {
  id?: Prisma.SortOrder
}

export type AttachmentsMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  sha256?: Prisma.SortOrder
  owner_type?: Prisma.SortOrder
  owner_id?: Prisma.SortOrder
  status?: Prisma.SortOrder
  created_by?: Prisma.SortOrder
  created_at?: Prisma.SortOrder
  original_name?: Prisma.SortOrder
  retention_policy?: Prisma.SortOrder
}

export type AttachmentsMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  sha256?: Prisma.SortOrder
  owner_type?: Prisma.SortOrder
  owner_id?: Prisma.SortOrder
  status?: Prisma.SortOrder
  created_by?: Prisma.SortOrder
  created_at?: Prisma.SortOrder
  original_name?: Prisma.SortOrder
  retention_policy?: Prisma.SortOrder
}

export type AttachmentsSumOrderByAggregateInput = {
  id?: Prisma.SortOrder
}

export type AttachmentsScalarRelationFilter = {
  is?: Prisma.AttachmentsWhereInput
  isNot?: Prisma.AttachmentsWhereInput
}

export type AttachmentsCreateNestedOneWithoutExpensesInput = {
  create?: Prisma.XOR<Prisma.AttachmentsCreateWithoutExpensesInput, Prisma.AttachmentsUncheckedCreateWithoutExpensesInput>
  connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutExpensesInput
  connect?: Prisma.AttachmentsWhereUniqueInput
}

export type AttachmentsUpdateOneWithoutExpensesNestedInput = {
  create?: Prisma.XOR<Prisma.AttachmentsCreateWithoutExpensesInput, Prisma.AttachmentsUncheckedCreateWithoutExpensesInput>
  connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutExpensesInput
  upsert?: Prisma.AttachmentsUpsertWithoutExpensesInput
  disconnect?: Prisma.AttachmentsWhereInput | boolean
  delete?: Prisma.AttachmentsWhereInput | boolean
  connect?: Prisma.AttachmentsWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.AttachmentsUpdateToOneWithWhereWithoutExpensesInput, Prisma.AttachmentsUpdateWithoutExpensesInput>, Prisma.AttachmentsUncheckedUpdateWithoutExpensesInput>
}

export type AttachmentsCreateNestedOneWithoutExpenses_archiveInput = {
  create?: Prisma.XOR<Prisma.AttachmentsCreateWithoutExpenses_archiveInput, Prisma.AttachmentsUncheckedCreateWithoutExpenses_archiveInput>
  connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutExpenses_archiveInput
  connect?: Prisma.AttachmentsWhereUniqueInput
}

export type AttachmentsUpdateOneWithoutExpenses_archiveNestedInput = {
  create?: Prisma.XOR<Prisma.AttachmentsCreateWithoutExpenses_archiveInput, Prisma.AttachmentsUncheckedCreateWithoutExpenses_archiveInput>
  connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutExpenses_archiveInput
  upsert?: Prisma.AttachmentsUpsertWithoutExpenses_archiveInput
  disconnect?: Prisma.AttachmentsWhereInput | boolean
  delete?: Prisma.AttachmentsWhereInput | boolean
  connect?: Prisma.AttachmentsWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.AttachmentsUpdateToOneWithWhereWithoutExpenses_archiveInput, Prisma.AttachmentsUpdateWithoutExpenses_archiveInput>, Prisma.AttachmentsUncheckedUpdateWithoutExpenses_archiveInput>
}

export type AttachmentsCreateNestedManyWithoutBlobInput = {
  create?: Prisma.XOR<Prisma.AttachmentsCreateWithoutBlobInput, Prisma.AttachmentsUncheckedCreateWithoutBlobInput> | Prisma.AttachmentsCreateWithoutBlobInput[] | Prisma.AttachmentsUncheckedCreateWithoutBlobInput[]
  connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutBlobInput | Prisma.AttachmentsCreateOrConnectWithoutBlobInput[]
  createMany?: Prisma.AttachmentsCreateManyBlobInputEnvelope
  connect?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[]
}

export type AttachmentsUncheckedCreateNestedManyWithoutBlobInput = {
  create?: Prisma.XOR<Prisma.AttachmentsCreateWithoutBlobInput, Prisma.AttachmentsUncheckedCreateWithoutBlobInput> | Prisma.AttachmentsCreateWithoutBlobInput[] | Prisma.AttachmentsUncheckedCreateWithoutBlobInput[]
  connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutBlobInput | Prisma.AttachmentsCreateOrConnectWithoutBlobInput[]
  createMany?: Prisma.AttachmentsCreateManyBlobInputEnvelope
  connect?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[]
}

export type AttachmentsUpdateManyWithoutBlobNestedInput = {
  create?: Prisma.XOR<Prisma.AttachmentsCreateWithoutBlobInput, Prisma.AttachmentsUncheckedCreateWithoutBlobInput> | Prisma.AttachmentsCreateWithoutBlobInput[] | Prisma.AttachmentsUncheckedCreateWithoutBlobInput[]
  connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutBlobInput | Prisma.AttachmentsCreateOrConnectWithoutBlobInput[]
  upsert?: Prisma.AttachmentsUpsertWithWhereUniqueWithoutBlobInput | Prisma.AttachmentsUpsertWithWhereUniqueWithoutBlobInput[]
  createMany?: Prisma.AttachmentsCreateManyBlobInputEnvelope
  set?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[]
  disconnect?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[]
  delete?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[]
  connect?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[]
  update?: Prisma.AttachmentsUpdateWithWhereUniqueWithoutBlobInput | Prisma.AttachmentsUpdateWithWhereUniqueWithoutBlobInput[]
  updateMany?: Prisma.AttachmentsUpdateManyWithWhereWithoutBlobInput | Prisma.AttachmentsUpdateManyWithWhereWithoutBlobInput[]
  deleteMany?: Prisma.AttachmentsScalarWhereInput | Prisma.AttachmentsScalarWhereInput[]
}

export type AttachmentsUncheckedUpdateManyWithoutBlobNestedInput = {
  create?: Prisma.XOR<Prisma.AttachmentsCreateWithoutBlobInput, Prisma.AttachmentsUncheckedCreateWithoutBlobInput> | Prisma.AttachmentsCreateWithoutBlobInput[] | Prisma.AttachmentsUncheckedCreateWithoutBlobInput[]
  connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutBlobInput | Prisma.AttachmentsCreateOrConnectWithoutBlobInput[]
  upsert?: Prisma.AttachmentsUpsertWithWhereUniqueWithoutBlobInput | Prisma.AttachmentsUpsertWithWhereUniqueWithoutBlobInput[]
  createMany?: Prisma.AttachmentsCreateManyBlobInputEnvelope
  set?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[]
  disconnect?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[]
  delete?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[]
  connect?: Prisma.AttachmentsWhereUniqueInput | Prisma.AttachmentsWhereUniqueInput[]
  update?: Prisma.AttachmentsUpdateWithWhereUniqueWithoutBlobInput | Prisma.AttachmentsUpdateWithWhereUniqueWithoutBlobInput[]
  updateMany?: Prisma.AttachmentsUpdateManyWithWhereWithoutBlobInput | Prisma.AttachmentsUpdateManyWithWhereWithoutBlobInput[]
  deleteMany?: Prisma.AttachmentsScalarWhereInput | Prisma.AttachmentsScalarWhereInput[]
}

export type EnumAttachmentStatusFieldUpdateOperationsInput = {
  set?: $Enums.AttachmentStatus
}

export type EnumRetentionPolicyFieldUpdateOperationsInput = {
  set?: $Enums.RetentionPolicy
}

export type AttachmentsCreateNestedOneWithoutAttachmentVariantsInput = {
  create?: Prisma.XOR<Prisma.AttachmentsCreateWithoutAttachmentVariantsInput, Prisma.AttachmentsUncheckedCreateWithoutAttachmentVariantsInput>
  connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutAttachmentVariantsInput
  connect?: Prisma.AttachmentsWhereUniqueInput
}

export type AttachmentsUpdateOneRequiredWithoutAttachmentVariantsNestedInput = {
  create?: Prisma.XOR<Prisma.AttachmentsCreateWithoutAttachmentVariantsInput, Prisma.AttachmentsUncheckedCreateWithoutAttachmentVariantsInput>
  connectOrCreate?: Prisma.AttachmentsCreateOrConnectWithoutAttachmentVariantsInput
  upsert?: Prisma.AttachmentsUpsertWithoutAttachmentVariantsInput
  connect?: Prisma.AttachmentsWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.AttachmentsUpdateToOneWithWhereWithoutAttachmentVariantsInput, Prisma.AttachmentsUpdateWithoutAttachmentVariantsInput>, Prisma.AttachmentsUncheckedUpdateWithoutAttachmentVariantsInput>
}

export type AttachmentsCreateWithoutExpensesInput = {
  owner_type: string
  owner_id: string
  status?: $Enums.AttachmentStatus
  created_by: string
  created_at?: Date | string
  original_name: string
  retention_policy: $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsCreateNestedManyWithoutAttachmentInput
  blob: Prisma.BlobsCreateNestedOneWithoutAttachmentsInput
  expenses_archive?: Prisma.ExpensesArchiveCreateNestedManyWithoutAttachment_recordInput
}

export type AttachmentsUncheckedCreateWithoutExpensesInput = {
  id?: number
  sha256: string
  owner_type: string
  owner_id: string
  status?: $Enums.AttachmentStatus
  created_by: string
  created_at?: Date | string
  original_name: string
  retention_policy: $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsUncheckedCreateNestedManyWithoutAttachmentInput
  expenses_archive?: Prisma.ExpensesArchiveUncheckedCreateNestedManyWithoutAttachment_recordInput
}

export type AttachmentsCreateOrConnectWithoutExpensesInput = {
  where: Prisma.AttachmentsWhereUniqueInput
  create: Prisma.XOR<Prisma.AttachmentsCreateWithoutExpensesInput, Prisma.AttachmentsUncheckedCreateWithoutExpensesInput>
}

export type AttachmentsUpsertWithoutExpensesInput = {
  update: Prisma.XOR<Prisma.AttachmentsUpdateWithoutExpensesInput, Prisma.AttachmentsUncheckedUpdateWithoutExpensesInput>
  create: Prisma.XOR<Prisma.AttachmentsCreateWithoutExpensesInput, Prisma.AttachmentsUncheckedCreateWithoutExpensesInput>
  where?: Prisma.AttachmentsWhereInput
}

export type AttachmentsUpdateToOneWithWhereWithoutExpensesInput = {
  where?: Prisma.AttachmentsWhereInput
  data: Prisma.XOR<Prisma.AttachmentsUpdateWithoutExpensesInput, Prisma.AttachmentsUncheckedUpdateWithoutExpensesInput>
}

export type AttachmentsUpdateWithoutExpensesInput = {
  owner_type?: Prisma.StringFieldUpdateOperationsInput | string
  owner_id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus
  created_by?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  original_name?: Prisma.StringFieldUpdateOperationsInput | string
  retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsUpdateManyWithoutAttachmentNestedInput
  blob?: Prisma.BlobsUpdateOneRequiredWithoutAttachmentsNestedInput
  expenses_archive?: Prisma.ExpensesArchiveUpdateManyWithoutAttachment_recordNestedInput
}

export type AttachmentsUncheckedUpdateWithoutExpensesInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  sha256?: Prisma.StringFieldUpdateOperationsInput | string
  owner_type?: Prisma.StringFieldUpdateOperationsInput | string
  owner_id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus
  created_by?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  original_name?: Prisma.StringFieldUpdateOperationsInput | string
  retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsUncheckedUpdateManyWithoutAttachmentNestedInput
  expenses_archive?: Prisma.ExpensesArchiveUncheckedUpdateManyWithoutAttachment_recordNestedInput
}

export type AttachmentsCreateWithoutExpenses_archiveInput = {
  owner_type: string
  owner_id: string
  status?: $Enums.AttachmentStatus
  created_by: string
  created_at?: Date | string
  original_name: string
  retention_policy: $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsCreateNestedManyWithoutAttachmentInput
  blob: Prisma.BlobsCreateNestedOneWithoutAttachmentsInput
  expenses?: Prisma.ExpensesCreateNestedManyWithoutAttachment_recordInput
}

export type AttachmentsUncheckedCreateWithoutExpenses_archiveInput = {
  id?: number
  sha256: string
  owner_type: string
  owner_id: string
  status?: $Enums.AttachmentStatus
  created_by: string
  created_at?: Date | string
  original_name: string
  retention_policy: $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsUncheckedCreateNestedManyWithoutAttachmentInput
  expenses?: Prisma.ExpensesUncheckedCreateNestedManyWithoutAttachment_recordInput
}

export type AttachmentsCreateOrConnectWithoutExpenses_archiveInput = {
  where: Prisma.AttachmentsWhereUniqueInput
  create: Prisma.XOR<Prisma.AttachmentsCreateWithoutExpenses_archiveInput, Prisma.AttachmentsUncheckedCreateWithoutExpenses_archiveInput>
}

export type AttachmentsUpsertWithoutExpenses_archiveInput = {
  update: Prisma.XOR<Prisma.AttachmentsUpdateWithoutExpenses_archiveInput, Prisma.AttachmentsUncheckedUpdateWithoutExpenses_archiveInput>
  create: Prisma.XOR<Prisma.AttachmentsCreateWithoutExpenses_archiveInput, Prisma.AttachmentsUncheckedCreateWithoutExpenses_archiveInput>
  where?: Prisma.AttachmentsWhereInput
}

export type AttachmentsUpdateToOneWithWhereWithoutExpenses_archiveInput = {
  where?: Prisma.AttachmentsWhereInput
  data: Prisma.XOR<Prisma.AttachmentsUpdateWithoutExpenses_archiveInput, Prisma.AttachmentsUncheckedUpdateWithoutExpenses_archiveInput>
}

export type AttachmentsUpdateWithoutExpenses_archiveInput = {
  owner_type?: Prisma.StringFieldUpdateOperationsInput | string
  owner_id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus
  created_by?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  original_name?: Prisma.StringFieldUpdateOperationsInput | string
  retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsUpdateManyWithoutAttachmentNestedInput
  blob?: Prisma.BlobsUpdateOneRequiredWithoutAttachmentsNestedInput
  expenses?: Prisma.ExpensesUpdateManyWithoutAttachment_recordNestedInput
}

export type AttachmentsUncheckedUpdateWithoutExpenses_archiveInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  sha256?: Prisma.StringFieldUpdateOperationsInput | string
  owner_type?: Prisma.StringFieldUpdateOperationsInput | string
  owner_id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus
  created_by?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  original_name?: Prisma.StringFieldUpdateOperationsInput | string
  retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsUncheckedUpdateManyWithoutAttachmentNestedInput
  expenses?: Prisma.ExpensesUncheckedUpdateManyWithoutAttachment_recordNestedInput
}

export type AttachmentsCreateWithoutBlobInput = {
  owner_type: string
  owner_id: string
  status?: $Enums.AttachmentStatus
  created_by: string
  created_at?: Date | string
  original_name: string
  retention_policy: $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsCreateNestedManyWithoutAttachmentInput
  expenses?: Prisma.ExpensesCreateNestedManyWithoutAttachment_recordInput
  expenses_archive?: Prisma.ExpensesArchiveCreateNestedManyWithoutAttachment_recordInput
}

export type AttachmentsUncheckedCreateWithoutBlobInput = {
  id?: number
  owner_type: string
  owner_id: string
  status?: $Enums.AttachmentStatus
  created_by: string
  created_at?: Date | string
  original_name: string
  retention_policy: $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsUncheckedCreateNestedManyWithoutAttachmentInput
  expenses?: Prisma.ExpensesUncheckedCreateNestedManyWithoutAttachment_recordInput
  expenses_archive?: Prisma.ExpensesArchiveUncheckedCreateNestedManyWithoutAttachment_recordInput
}

export type AttachmentsCreateOrConnectWithoutBlobInput = {
  where: Prisma.AttachmentsWhereUniqueInput
  create: Prisma.XOR<Prisma.AttachmentsCreateWithoutBlobInput, Prisma.AttachmentsUncheckedCreateWithoutBlobInput>
}

export type AttachmentsCreateManyBlobInputEnvelope = {
  data: Prisma.AttachmentsCreateManyBlobInput | Prisma.AttachmentsCreateManyBlobInput[]
  skipDuplicates?: boolean
}

export type AttachmentsUpsertWithWhereUniqueWithoutBlobInput = {
  where: Prisma.AttachmentsWhereUniqueInput
  update: Prisma.XOR<Prisma.AttachmentsUpdateWithoutBlobInput, Prisma.AttachmentsUncheckedUpdateWithoutBlobInput>
  create: Prisma.XOR<Prisma.AttachmentsCreateWithoutBlobInput, Prisma.AttachmentsUncheckedCreateWithoutBlobInput>
}

export type AttachmentsUpdateWithWhereUniqueWithoutBlobInput = {
  where: Prisma.AttachmentsWhereUniqueInput
  data: Prisma.XOR<Prisma.AttachmentsUpdateWithoutBlobInput, Prisma.AttachmentsUncheckedUpdateWithoutBlobInput>
}

export type AttachmentsUpdateManyWithWhereWithoutBlobInput = {
  where: Prisma.AttachmentsScalarWhereInput
  data: Prisma.XOR<Prisma.AttachmentsUpdateManyMutationInput, Prisma.AttachmentsUncheckedUpdateManyWithoutBlobInput>
}

export type AttachmentsScalarWhereInput = {
  AND?: Prisma.AttachmentsScalarWhereInput | Prisma.AttachmentsScalarWhereInput[]
  OR?: Prisma.AttachmentsScalarWhereInput[]
  NOT?: Prisma.AttachmentsScalarWhereInput | Prisma.AttachmentsScalarWhereInput[]
  id?: Prisma.IntFilter<"Attachments"> | number
  sha256?: Prisma.StringFilter<"Attachments"> | string
  owner_type?: Prisma.StringFilter<"Attachments"> | string
  owner_id?: Prisma.StringFilter<"Attachments"> | string
  status?: Prisma.EnumAttachmentStatusFilter<"Attachments"> | $Enums.AttachmentStatus
  created_by?: Prisma.StringFilter<"Attachments"> | string
  created_at?: Prisma.DateTimeFilter<"Attachments"> | Date | string
  original_name?: Prisma.StringFilter<"Attachments"> | string
  retention_policy?: Prisma.EnumRetentionPolicyFilter<"Attachments"> | $Enums.RetentionPolicy
}

export type AttachmentsCreateWithoutAttachmentVariantsInput = {
  owner_type: string
  owner_id: string
  status?: $Enums.AttachmentStatus
  created_by: string
  created_at?: Date | string
  original_name: string
  retention_policy: $Enums.RetentionPolicy
  blob: Prisma.BlobsCreateNestedOneWithoutAttachmentsInput
  expenses?: Prisma.ExpensesCreateNestedManyWithoutAttachment_recordInput
  expenses_archive?: Prisma.ExpensesArchiveCreateNestedManyWithoutAttachment_recordInput
}

export type AttachmentsUncheckedCreateWithoutAttachmentVariantsInput = {
  id?: number
  sha256: string
  owner_type: string
  owner_id: string
  status?: $Enums.AttachmentStatus
  created_by: string
  created_at?: Date | string
  original_name: string
  retention_policy: $Enums.RetentionPolicy
  expenses?: Prisma.ExpensesUncheckedCreateNestedManyWithoutAttachment_recordInput
  expenses_archive?: Prisma.ExpensesArchiveUncheckedCreateNestedManyWithoutAttachment_recordInput
}

export type AttachmentsCreateOrConnectWithoutAttachmentVariantsInput = {
  where: Prisma.AttachmentsWhereUniqueInput
  create: Prisma.XOR<Prisma.AttachmentsCreateWithoutAttachmentVariantsInput, Prisma.AttachmentsUncheckedCreateWithoutAttachmentVariantsInput>
}

export type AttachmentsUpsertWithoutAttachmentVariantsInput = {
  update: Prisma.XOR<Prisma.AttachmentsUpdateWithoutAttachmentVariantsInput, Prisma.AttachmentsUncheckedUpdateWithoutAttachmentVariantsInput>
  create: Prisma.XOR<Prisma.AttachmentsCreateWithoutAttachmentVariantsInput, Prisma.AttachmentsUncheckedCreateWithoutAttachmentVariantsInput>
  where?: Prisma.AttachmentsWhereInput
}

export type AttachmentsUpdateToOneWithWhereWithoutAttachmentVariantsInput = {
  where?: Prisma.AttachmentsWhereInput
  data: Prisma.XOR<Prisma.AttachmentsUpdateWithoutAttachmentVariantsInput, Prisma.AttachmentsUncheckedUpdateWithoutAttachmentVariantsInput>
}

export type AttachmentsUpdateWithoutAttachmentVariantsInput = {
  owner_type?: Prisma.StringFieldUpdateOperationsInput | string
  owner_id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus
  created_by?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  original_name?: Prisma.StringFieldUpdateOperationsInput | string
  retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy
  blob?: Prisma.BlobsUpdateOneRequiredWithoutAttachmentsNestedInput
  expenses?: Prisma.ExpensesUpdateManyWithoutAttachment_recordNestedInput
  expenses_archive?: Prisma.ExpensesArchiveUpdateManyWithoutAttachment_recordNestedInput
}

export type AttachmentsUncheckedUpdateWithoutAttachmentVariantsInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  sha256?: Prisma.StringFieldUpdateOperationsInput | string
  owner_type?: Prisma.StringFieldUpdateOperationsInput | string
  owner_id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus
  created_by?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  original_name?: Prisma.StringFieldUpdateOperationsInput | string
  retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy
  expenses?: Prisma.ExpensesUncheckedUpdateManyWithoutAttachment_recordNestedInput
  expenses_archive?: Prisma.ExpensesArchiveUncheckedUpdateManyWithoutAttachment_recordNestedInput
}

export type AttachmentsCreateManyBlobInput = {
  id?: number
  owner_type: string
  owner_id: string
  status?: $Enums.AttachmentStatus
  created_by: string
  created_at?: Date | string
  original_name: string
  retention_policy: $Enums.RetentionPolicy
}

export type AttachmentsUpdateWithoutBlobInput = {
  owner_type?: Prisma.StringFieldUpdateOperationsInput | string
  owner_id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus
  created_by?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  original_name?: Prisma.StringFieldUpdateOperationsInput | string
  retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsUpdateManyWithoutAttachmentNestedInput
  expenses?: Prisma.ExpensesUpdateManyWithoutAttachment_recordNestedInput
  expenses_archive?: Prisma.ExpensesArchiveUpdateManyWithoutAttachment_recordNestedInput
}

export type AttachmentsUncheckedUpdateWithoutBlobInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  owner_type?: Prisma.StringFieldUpdateOperationsInput | string
  owner_id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus
  created_by?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  original_name?: Prisma.StringFieldUpdateOperationsInput | string
  retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy
  AttachmentVariants?: Prisma.AttachmentVariantsUncheckedUpdateManyWithoutAttachmentNestedInput
  expenses?: Prisma.ExpensesUncheckedUpdateManyWithoutAttachment_recordNestedInput
  expenses_archive?: Prisma.ExpensesArchiveUncheckedUpdateManyWithoutAttachment_recordNestedInput
}

export type AttachmentsUncheckedUpdateManyWithoutBlobInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  owner_type?: Prisma.StringFieldUpdateOperationsInput | string
  owner_id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumAttachmentStatusFieldUpdateOperationsInput | $Enums.AttachmentStatus
  created_by?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  original_name?: Prisma.StringFieldUpdateOperationsInput | string
  retention_policy?: Prisma.EnumRetentionPolicyFieldUpdateOperationsInput | $Enums.RetentionPolicy
}


/**
 * Count Type AttachmentsCountOutputType
 */

export type AttachmentsCountOutputType = {
  AttachmentVariants: number
  expenses: number
  expenses_archive: number
}

export type AttachmentsCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  AttachmentVariants?: boolean | AttachmentsCountOutputTypeCountAttachmentVariantsArgs
  expenses?: boolean | AttachmentsCountOutputTypeCountExpensesArgs
  expenses_archive?: boolean | AttachmentsCountOutputTypeCountExpenses_archiveArgs
}

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

/**
 * AttachmentsCountOutputType without action
 */
export type AttachmentsCountOutputTypeCountAttachmentVariantsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.AttachmentVariantsWhereInput
}

/**
 * AttachmentsCountOutputType without action
 */
export type AttachmentsCountOutputTypeCountExpensesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.ExpensesWhereInput
}

/**
 * AttachmentsCountOutputType without action
 */
export type AttachmentsCountOutputTypeCountExpenses_archiveArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.ExpensesArchiveWhereInput
}


export type AttachmentsSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  sha256?: boolean
  owner_type?: boolean
  owner_id?: boolean
  status?: boolean
  created_by?: boolean
  created_at?: boolean
  original_name?: boolean
  retention_policy?: boolean
  AttachmentVariants?: boolean | Prisma.Attachments$AttachmentVariantsArgs<ExtArgs>
  blob?: boolean | Prisma.BlobsDefaultArgs<ExtArgs>
  expenses?: boolean | Prisma.Attachments$expensesArgs<ExtArgs>
  expenses_archive?: boolean | Prisma.Attachments$expenses_archiveArgs<ExtArgs>
  _count?: boolean | Prisma.AttachmentsCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["attachments"]>

export type AttachmentsSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  sha256?: boolean
  owner_type?: boolean
  owner_id?: boolean
  status?: boolean
  created_by?: boolean
  created_at?: boolean
  original_name?: boolean
  retention_policy?: boolean
  blob?: boolean | Prisma.BlobsDefaultArgs<ExtArgs>
}, ExtArgs["result"]["attachments"]>

export type AttachmentsSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  sha256?: boolean
  owner_type?: boolean
  owner_id?: boolean
  status?: boolean
  created_by?: boolean
  created_at?: boolean
  original_name?: boolean
  retention_policy?: boolean
  blob?: boolean | Prisma.BlobsDefaultArgs<ExtArgs>
}, ExtArgs["result"]["attachments"]>

export type AttachmentsSelectScalar = {
  id?: boolean
  sha256?: boolean
  owner_type?: boolean
  owner_id?: boolean
  status?: boolean
  created_by?: boolean
  created_at?: boolean
  original_name?: boolean
  retention_policy?: boolean
}

export type AttachmentsOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "sha256" | "owner_type" | "owner_id" | "status" | "created_by" | "created_at" | "original_name" | "retention_policy", ExtArgs["result"]["attachments"]>
export type AttachmentsInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  AttachmentVariants?: boolean | Prisma.Attachments$AttachmentVariantsArgs<ExtArgs>
  blob?: boolean | Prisma.BlobsDefaultArgs<ExtArgs>
  expenses?: boolean | Prisma.Attachments$expensesArgs<ExtArgs>
  expenses_archive?: boolean | Prisma.Attachments$expenses_archiveArgs<ExtArgs>
  _count?: boolean | Prisma.AttachmentsCountOutputTypeDefaultArgs<ExtArgs>
}
export type AttachmentsIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  blob?: boolean | Prisma.BlobsDefaultArgs<ExtArgs>
}
export type AttachmentsIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  blob?: boolean | Prisma.BlobsDefaultArgs<ExtArgs>
}

export type $AttachmentsPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "Attachments"
  objects: {
    AttachmentVariants: Prisma.$AttachmentVariantsPayload<ExtArgs>[]
    blob: Prisma.$BlobsPayload<ExtArgs>
    expenses: Prisma.$ExpensesPayload<ExtArgs>[]
    expenses_archive: Prisma.$ExpensesArchivePayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: number
    sha256: string
    owner_type: string
    owner_id: string
    status: $Enums.AttachmentStatus
    created_by: string
    created_at: Date
    original_name: string
    retention_policy: $Enums.RetentionPolicy
  }, ExtArgs["result"]["attachments"]>
  composites: {}
}

export type AttachmentsGetPayload<S extends boolean | null | undefined | AttachmentsDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$AttachmentsPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for Attachments.
 * 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__AttachmentsClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  AttachmentVariants<T extends Prisma.Attachments$AttachmentVariantsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Attachments$AttachmentVariantsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AttachmentVariantsPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  blob<T extends Prisma.BlobsDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BlobsDefaultArgs<ExtArgs>>): Prisma.Prisma__BlobsClient<runtime.Types.Result.GetResult<Prisma.$BlobsPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
  expenses<T extends Prisma.Attachments$expensesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Attachments$expensesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ExpensesPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  expenses_archive<T extends Prisma.Attachments$expenses_archiveArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Attachments$expenses_archiveArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ExpensesArchivePayload<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 Attachments model
 */
export interface AttachmentsFieldRefs {
  readonly id: Prisma.FieldRef<"Attachments", 'Int'>
  readonly sha256: Prisma.FieldRef<"Attachments", 'String'>
  readonly owner_type: Prisma.FieldRef<"Attachments", 'String'>
  readonly owner_id: Prisma.FieldRef<"Attachments", 'String'>
  readonly status: Prisma.FieldRef<"Attachments", 'AttachmentStatus'>
  readonly created_by: Prisma.FieldRef<"Attachments", 'String'>
  readonly created_at: Prisma.FieldRef<"Attachments", 'DateTime'>
  readonly original_name: Prisma.FieldRef<"Attachments", 'String'>
  readonly retention_policy: Prisma.FieldRef<"Attachments", 'RetentionPolicy'>
}
    

// Custom InputTypes
/**
 * Attachments findUnique
 */
export type AttachmentsFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachments
   */
  select?: Prisma.AttachmentsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Attachments
   */
  omit?: Prisma.AttachmentsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentsInclude<ExtArgs> | null
  /**
   * Filter, which Attachments to fetch.
   */
  where: Prisma.AttachmentsWhereUniqueInput
}

/**
 * Attachments findUniqueOrThrow
 */
export type AttachmentsFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachments
   */
  select?: Prisma.AttachmentsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Attachments
   */
  omit?: Prisma.AttachmentsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentsInclude<ExtArgs> | null
  /**
   * Filter, which Attachments to fetch.
   */
  where: Prisma.AttachmentsWhereUniqueInput
}

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

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

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

/**
 * Attachments create
 */
export type AttachmentsCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachments
   */
  select?: Prisma.AttachmentsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Attachments
   */
  omit?: Prisma.AttachmentsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentsInclude<ExtArgs> | null
  /**
   * The data needed to create a Attachments.
   */
  data: Prisma.XOR<Prisma.AttachmentsCreateInput, Prisma.AttachmentsUncheckedCreateInput>
}

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

/**
 * Attachments createManyAndReturn
 */
export type AttachmentsCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachments
   */
  select?: Prisma.AttachmentsSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Attachments
   */
  omit?: Prisma.AttachmentsOmit<ExtArgs> | null
  /**
   * The data used to create many Attachments.
   */
  data: Prisma.AttachmentsCreateManyInput | Prisma.AttachmentsCreateManyInput[]
  skipDuplicates?: boolean
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentsIncludeCreateManyAndReturn<ExtArgs> | null
}

/**
 * Attachments update
 */
export type AttachmentsUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachments
   */
  select?: Prisma.AttachmentsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Attachments
   */
  omit?: Prisma.AttachmentsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentsInclude<ExtArgs> | null
  /**
   * The data needed to update a Attachments.
   */
  data: Prisma.XOR<Prisma.AttachmentsUpdateInput, Prisma.AttachmentsUncheckedUpdateInput>
  /**
   * Choose, which Attachments to update.
   */
  where: Prisma.AttachmentsWhereUniqueInput
}

/**
 * Attachments updateMany
 */
export type AttachmentsUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update Attachments.
   */
  data: Prisma.XOR<Prisma.AttachmentsUpdateManyMutationInput, Prisma.AttachmentsUncheckedUpdateManyInput>
  /**
   * Filter which Attachments to update
   */
  where?: Prisma.AttachmentsWhereInput
  /**
   * Limit how many Attachments to update.
   */
  limit?: number
}

/**
 * Attachments updateManyAndReturn
 */
export type AttachmentsUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachments
   */
  select?: Prisma.AttachmentsSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Attachments
   */
  omit?: Prisma.AttachmentsOmit<ExtArgs> | null
  /**
   * The data used to update Attachments.
   */
  data: Prisma.XOR<Prisma.AttachmentsUpdateManyMutationInput, Prisma.AttachmentsUncheckedUpdateManyInput>
  /**
   * Filter which Attachments to update
   */
  where?: Prisma.AttachmentsWhereInput
  /**
   * Limit how many Attachments to update.
   */
  limit?: number
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentsIncludeUpdateManyAndReturn<ExtArgs> | null
}

/**
 * Attachments upsert
 */
export type AttachmentsUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachments
   */
  select?: Prisma.AttachmentsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Attachments
   */
  omit?: Prisma.AttachmentsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentsInclude<ExtArgs> | null
  /**
   * The filter to search for the Attachments to update in case it exists.
   */
  where: Prisma.AttachmentsWhereUniqueInput
  /**
   * In case the Attachments found by the `where` argument doesn't exist, create a new Attachments with this data.
   */
  create: Prisma.XOR<Prisma.AttachmentsCreateInput, Prisma.AttachmentsUncheckedCreateInput>
  /**
   * In case the Attachments was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.AttachmentsUpdateInput, Prisma.AttachmentsUncheckedUpdateInput>
}

/**
 * Attachments delete
 */
export type AttachmentsDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Attachments
   */
  select?: Prisma.AttachmentsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Attachments
   */
  omit?: Prisma.AttachmentsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentsInclude<ExtArgs> | null
  /**
   * Filter which Attachments to delete.
   */
  where: Prisma.AttachmentsWhereUniqueInput
}

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

/**
 * Attachments.AttachmentVariants
 */
export type Attachments$AttachmentVariantsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the AttachmentVariants
   */
  select?: Prisma.AttachmentVariantsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the AttachmentVariants
   */
  omit?: Prisma.AttachmentVariantsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AttachmentVariantsInclude<ExtArgs> | null
  where?: Prisma.AttachmentVariantsWhereInput
  orderBy?: Prisma.AttachmentVariantsOrderByWithRelationInput | Prisma.AttachmentVariantsOrderByWithRelationInput[]
  cursor?: Prisma.AttachmentVariantsWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.AttachmentVariantsScalarFieldEnum | Prisma.AttachmentVariantsScalarFieldEnum[]
}

/**
 * Attachments.expenses
 */
export type Attachments$expensesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Expenses
   */
  select?: Prisma.ExpensesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Expenses
   */
  omit?: Prisma.ExpensesOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ExpensesInclude<ExtArgs> | null
  where?: Prisma.ExpensesWhereInput
  orderBy?: Prisma.ExpensesOrderByWithRelationInput | Prisma.ExpensesOrderByWithRelationInput[]
  cursor?: Prisma.ExpensesWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.ExpensesScalarFieldEnum | Prisma.ExpensesScalarFieldEnum[]
}

/**
 * Attachments.expenses_archive
 */
export type Attachments$expenses_archiveArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ExpensesArchive
   */
  select?: Prisma.ExpensesArchiveSelect<ExtArgs> | null
  /**
   * Omit specific fields from the ExpensesArchive
   */
  omit?: Prisma.ExpensesArchiveOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ExpensesArchiveInclude<ExtArgs> | null
  where?: Prisma.ExpensesArchiveWhereInput
  orderBy?: Prisma.ExpensesArchiveOrderByWithRelationInput | Prisma.ExpensesArchiveOrderByWithRelationInput[]
  cursor?: Prisma.ExpensesArchiveWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.ExpensesArchiveScalarFieldEnum | Prisma.ExpensesArchiveScalarFieldEnum[]
}

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