/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `Attachment` 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.ts" import type * as Prisma from "../internal/prismaNamespace.ts" /** * Model Attachment * */ export type AttachmentModel = runtime.Types.Result.DefaultSelection export type AggregateAttachment = { _count: AttachmentCountAggregateOutputType | null _avg: AttachmentAvgAggregateOutputType | null _sum: AttachmentSumAggregateOutputType | null _min: AttachmentMinAggregateOutputType | null _max: AttachmentMaxAggregateOutputType | null } export type AttachmentAvgAggregateOutputType = { size: number | null } export type AttachmentSumAggregateOutputType = { size: number | null } export type AttachmentMinAggregateOutputType = { id: string | null username: string | null name: string | null mimetype: string | null size: number | null createdAt: Date | null } export type AttachmentMaxAggregateOutputType = { id: string | null username: string | null name: string | null mimetype: string | null size: number | null createdAt: Date | null } export type AttachmentCountAggregateOutputType = { id: number username: number name: number mimetype: number size: number createdAt: number _all: number } export type AttachmentAvgAggregateInputType = { size?: true } export type AttachmentSumAggregateInputType = { size?: true } export type AttachmentMinAggregateInputType = { id?: true username?: true name?: true mimetype?: true size?: true createdAt?: true } export type AttachmentMaxAggregateInputType = { id?: true username?: true name?: true mimetype?: true size?: true createdAt?: true } export type AttachmentCountAggregateInputType = { id?: true username?: true name?: true mimetype?: true size?: true createdAt?: true _all?: true } export type AttachmentAggregateArgs = { /** * Filter which Attachment to aggregate. */ where?: Prisma.AttachmentWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Attachments to fetch. */ orderBy?: Prisma.AttachmentOrderByWithRelationInput | Prisma.AttachmentOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.AttachmentWhereUniqueInput /** * {@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 | AttachmentCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: AttachmentAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: AttachmentSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: AttachmentMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: AttachmentMaxAggregateInputType } export type GetAttachmentAggregateType = { [P in keyof T & keyof AggregateAttachment]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type AttachmentGroupByArgs = { where?: Prisma.AttachmentWhereInput orderBy?: Prisma.AttachmentOrderByWithAggregationInput | Prisma.AttachmentOrderByWithAggregationInput[] by: Prisma.AttachmentScalarFieldEnum[] | Prisma.AttachmentScalarFieldEnum having?: Prisma.AttachmentScalarWhereWithAggregatesInput take?: number skip?: number _count?: AttachmentCountAggregateInputType | true _avg?: AttachmentAvgAggregateInputType _sum?: AttachmentSumAggregateInputType _min?: AttachmentMinAggregateInputType _max?: AttachmentMaxAggregateInputType } export type AttachmentGroupByOutputType = { id: string username: string | null name: string mimetype: string size: number createdAt: Date _count: AttachmentCountAggregateOutputType | null _avg: AttachmentAvgAggregateOutputType | null _sum: AttachmentSumAggregateOutputType | null _min: AttachmentMinAggregateOutputType | null _max: AttachmentMaxAggregateOutputType | null } export type GetAttachmentGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof AttachmentGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type AttachmentWhereInput = { AND?: Prisma.AttachmentWhereInput | Prisma.AttachmentWhereInput[] OR?: Prisma.AttachmentWhereInput[] NOT?: Prisma.AttachmentWhereInput | Prisma.AttachmentWhereInput[] id?: Prisma.StringFilter<"Attachment"> | string username?: Prisma.StringNullableFilter<"Attachment"> | string | null name?: Prisma.StringFilter<"Attachment"> | string mimetype?: Prisma.StringFilter<"Attachment"> | string size?: Prisma.IntFilter<"Attachment"> | number createdAt?: Prisma.DateTimeFilter<"Attachment"> | Date | string user?: Prisma.XOR | null message?: Prisma.MessageAttachmentListRelationFilter } export type AttachmentOrderByWithRelationInput = { id?: Prisma.SortOrder username?: Prisma.SortOrderInput | Prisma.SortOrder name?: Prisma.SortOrder mimetype?: Prisma.SortOrder size?: Prisma.SortOrder createdAt?: Prisma.SortOrder user?: Prisma.UserOrderByWithRelationInput message?: Prisma.MessageAttachmentOrderByRelationAggregateInput } export type AttachmentWhereUniqueInput = Prisma.AtLeast<{ id?: string AND?: Prisma.AttachmentWhereInput | Prisma.AttachmentWhereInput[] OR?: Prisma.AttachmentWhereInput[] NOT?: Prisma.AttachmentWhereInput | Prisma.AttachmentWhereInput[] username?: Prisma.StringNullableFilter<"Attachment"> | string | null name?: Prisma.StringFilter<"Attachment"> | string mimetype?: Prisma.StringFilter<"Attachment"> | string size?: Prisma.IntFilter<"Attachment"> | number createdAt?: Prisma.DateTimeFilter<"Attachment"> | Date | string user?: Prisma.XOR | null message?: Prisma.MessageAttachmentListRelationFilter }, "id"> export type AttachmentOrderByWithAggregationInput = { id?: Prisma.SortOrder username?: Prisma.SortOrderInput | Prisma.SortOrder name?: Prisma.SortOrder mimetype?: Prisma.SortOrder size?: Prisma.SortOrder createdAt?: Prisma.SortOrder _count?: Prisma.AttachmentCountOrderByAggregateInput _avg?: Prisma.AttachmentAvgOrderByAggregateInput _max?: Prisma.AttachmentMaxOrderByAggregateInput _min?: Prisma.AttachmentMinOrderByAggregateInput _sum?: Prisma.AttachmentSumOrderByAggregateInput } export type AttachmentScalarWhereWithAggregatesInput = { AND?: Prisma.AttachmentScalarWhereWithAggregatesInput | Prisma.AttachmentScalarWhereWithAggregatesInput[] OR?: Prisma.AttachmentScalarWhereWithAggregatesInput[] NOT?: Prisma.AttachmentScalarWhereWithAggregatesInput | Prisma.AttachmentScalarWhereWithAggregatesInput[] id?: Prisma.StringWithAggregatesFilter<"Attachment"> | string username?: Prisma.StringNullableWithAggregatesFilter<"Attachment"> | string | null name?: Prisma.StringWithAggregatesFilter<"Attachment"> | string mimetype?: Prisma.StringWithAggregatesFilter<"Attachment"> | string size?: Prisma.IntWithAggregatesFilter<"Attachment"> | number createdAt?: Prisma.DateTimeWithAggregatesFilter<"Attachment"> | Date | string } export type AttachmentCreateInput = { id?: string name: string mimetype: string size: number createdAt?: Date | string user?: Prisma.UserCreateNestedOneWithoutAttachmentsInput message?: Prisma.MessageAttachmentCreateNestedManyWithoutAttachmentInput } export type AttachmentUncheckedCreateInput = { id?: string username?: string | null name: string mimetype: string size: number createdAt?: Date | string message?: Prisma.MessageAttachmentUncheckedCreateNestedManyWithoutAttachmentInput } export type AttachmentUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string mimetype?: Prisma.StringFieldUpdateOperationsInput | string size?: Prisma.IntFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string user?: Prisma.UserUpdateOneWithoutAttachmentsNestedInput message?: Prisma.MessageAttachmentUpdateManyWithoutAttachmentNestedInput } export type AttachmentUncheckedUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string username?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string mimetype?: Prisma.StringFieldUpdateOperationsInput | string size?: Prisma.IntFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string message?: Prisma.MessageAttachmentUncheckedUpdateManyWithoutAttachmentNestedInput } export type AttachmentCreateManyInput = { id?: string username?: string | null name: string mimetype: string size: number createdAt?: Date | string } export type AttachmentUpdateManyMutationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string mimetype?: Prisma.StringFieldUpdateOperationsInput | string size?: Prisma.IntFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type AttachmentUncheckedUpdateManyInput = { id?: Prisma.StringFieldUpdateOperationsInput | string username?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string mimetype?: Prisma.StringFieldUpdateOperationsInput | string size?: Prisma.IntFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type AttachmentListRelationFilter = { every?: Prisma.AttachmentWhereInput some?: Prisma.AttachmentWhereInput none?: Prisma.AttachmentWhereInput } export type AttachmentOrderByRelationAggregateInput = { _count?: Prisma.SortOrder } export type AttachmentCountOrderByAggregateInput = { id?: Prisma.SortOrder username?: Prisma.SortOrder name?: Prisma.SortOrder mimetype?: Prisma.SortOrder size?: Prisma.SortOrder createdAt?: Prisma.SortOrder } export type AttachmentAvgOrderByAggregateInput = { size?: Prisma.SortOrder } export type AttachmentMaxOrderByAggregateInput = { id?: Prisma.SortOrder username?: Prisma.SortOrder name?: Prisma.SortOrder mimetype?: Prisma.SortOrder size?: Prisma.SortOrder createdAt?: Prisma.SortOrder } export type AttachmentMinOrderByAggregateInput = { id?: Prisma.SortOrder username?: Prisma.SortOrder name?: Prisma.SortOrder mimetype?: Prisma.SortOrder size?: Prisma.SortOrder createdAt?: Prisma.SortOrder } export type AttachmentSumOrderByAggregateInput = { size?: Prisma.SortOrder } export type AttachmentScalarRelationFilter = { is?: Prisma.AttachmentWhereInput isNot?: Prisma.AttachmentWhereInput } export type AttachmentCreateNestedManyWithoutUserInput = { create?: Prisma.XOR | Prisma.AttachmentCreateWithoutUserInput[] | Prisma.AttachmentUncheckedCreateWithoutUserInput[] connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutUserInput | Prisma.AttachmentCreateOrConnectWithoutUserInput[] createMany?: Prisma.AttachmentCreateManyUserInputEnvelope connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] } export type AttachmentUncheckedCreateNestedManyWithoutUserInput = { create?: Prisma.XOR | Prisma.AttachmentCreateWithoutUserInput[] | Prisma.AttachmentUncheckedCreateWithoutUserInput[] connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutUserInput | Prisma.AttachmentCreateOrConnectWithoutUserInput[] createMany?: Prisma.AttachmentCreateManyUserInputEnvelope connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] } export type AttachmentUpdateManyWithoutUserNestedInput = { create?: Prisma.XOR | Prisma.AttachmentCreateWithoutUserInput[] | Prisma.AttachmentUncheckedCreateWithoutUserInput[] connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutUserInput | Prisma.AttachmentCreateOrConnectWithoutUserInput[] upsert?: Prisma.AttachmentUpsertWithWhereUniqueWithoutUserInput | Prisma.AttachmentUpsertWithWhereUniqueWithoutUserInput[] createMany?: Prisma.AttachmentCreateManyUserInputEnvelope set?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] disconnect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] delete?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] update?: Prisma.AttachmentUpdateWithWhereUniqueWithoutUserInput | Prisma.AttachmentUpdateWithWhereUniqueWithoutUserInput[] updateMany?: Prisma.AttachmentUpdateManyWithWhereWithoutUserInput | Prisma.AttachmentUpdateManyWithWhereWithoutUserInput[] deleteMany?: Prisma.AttachmentScalarWhereInput | Prisma.AttachmentScalarWhereInput[] } export type AttachmentUncheckedUpdateManyWithoutUserNestedInput = { create?: Prisma.XOR | Prisma.AttachmentCreateWithoutUserInput[] | Prisma.AttachmentUncheckedCreateWithoutUserInput[] connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutUserInput | Prisma.AttachmentCreateOrConnectWithoutUserInput[] upsert?: Prisma.AttachmentUpsertWithWhereUniqueWithoutUserInput | Prisma.AttachmentUpsertWithWhereUniqueWithoutUserInput[] createMany?: Prisma.AttachmentCreateManyUserInputEnvelope set?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] disconnect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] delete?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] update?: Prisma.AttachmentUpdateWithWhereUniqueWithoutUserInput | Prisma.AttachmentUpdateWithWhereUniqueWithoutUserInput[] updateMany?: Prisma.AttachmentUpdateManyWithWhereWithoutUserInput | Prisma.AttachmentUpdateManyWithWhereWithoutUserInput[] deleteMany?: Prisma.AttachmentScalarWhereInput | Prisma.AttachmentScalarWhereInput[] } export type IntFieldUpdateOperationsInput = { set?: number increment?: number decrement?: number multiply?: number divide?: number } export type AttachmentCreateNestedOneWithoutMessageInput = { create?: Prisma.XOR connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutMessageInput connect?: Prisma.AttachmentWhereUniqueInput } export type AttachmentUpdateOneRequiredWithoutMessageNestedInput = { create?: Prisma.XOR connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutMessageInput upsert?: Prisma.AttachmentUpsertWithoutMessageInput connect?: Prisma.AttachmentWhereUniqueInput update?: Prisma.XOR, Prisma.AttachmentUncheckedUpdateWithoutMessageInput> } export type AttachmentCreateWithoutUserInput = { id?: string name: string mimetype: string size: number createdAt?: Date | string message?: Prisma.MessageAttachmentCreateNestedManyWithoutAttachmentInput } export type AttachmentUncheckedCreateWithoutUserInput = { id?: string name: string mimetype: string size: number createdAt?: Date | string message?: Prisma.MessageAttachmentUncheckedCreateNestedManyWithoutAttachmentInput } export type AttachmentCreateOrConnectWithoutUserInput = { where: Prisma.AttachmentWhereUniqueInput create: Prisma.XOR } export type AttachmentCreateManyUserInputEnvelope = { data: Prisma.AttachmentCreateManyUserInput | Prisma.AttachmentCreateManyUserInput[] } export type AttachmentUpsertWithWhereUniqueWithoutUserInput = { where: Prisma.AttachmentWhereUniqueInput update: Prisma.XOR create: Prisma.XOR } export type AttachmentUpdateWithWhereUniqueWithoutUserInput = { where: Prisma.AttachmentWhereUniqueInput data: Prisma.XOR } export type AttachmentUpdateManyWithWhereWithoutUserInput = { where: Prisma.AttachmentScalarWhereInput data: Prisma.XOR } export type AttachmentScalarWhereInput = { AND?: Prisma.AttachmentScalarWhereInput | Prisma.AttachmentScalarWhereInput[] OR?: Prisma.AttachmentScalarWhereInput[] NOT?: Prisma.AttachmentScalarWhereInput | Prisma.AttachmentScalarWhereInput[] id?: Prisma.StringFilter<"Attachment"> | string username?: Prisma.StringNullableFilter<"Attachment"> | string | null name?: Prisma.StringFilter<"Attachment"> | string mimetype?: Prisma.StringFilter<"Attachment"> | string size?: Prisma.IntFilter<"Attachment"> | number createdAt?: Prisma.DateTimeFilter<"Attachment"> | Date | string } export type AttachmentCreateWithoutMessageInput = { id?: string name: string mimetype: string size: number createdAt?: Date | string user?: Prisma.UserCreateNestedOneWithoutAttachmentsInput } export type AttachmentUncheckedCreateWithoutMessageInput = { id?: string username?: string | null name: string mimetype: string size: number createdAt?: Date | string } export type AttachmentCreateOrConnectWithoutMessageInput = { where: Prisma.AttachmentWhereUniqueInput create: Prisma.XOR } export type AttachmentUpsertWithoutMessageInput = { update: Prisma.XOR create: Prisma.XOR where?: Prisma.AttachmentWhereInput } export type AttachmentUpdateToOneWithWhereWithoutMessageInput = { where?: Prisma.AttachmentWhereInput data: Prisma.XOR } export type AttachmentUpdateWithoutMessageInput = { id?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string mimetype?: Prisma.StringFieldUpdateOperationsInput | string size?: Prisma.IntFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string user?: Prisma.UserUpdateOneWithoutAttachmentsNestedInput } export type AttachmentUncheckedUpdateWithoutMessageInput = { id?: Prisma.StringFieldUpdateOperationsInput | string username?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string mimetype?: Prisma.StringFieldUpdateOperationsInput | string size?: Prisma.IntFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type AttachmentCreateManyUserInput = { id?: string name: string mimetype: string size: number createdAt?: Date | string } export type AttachmentUpdateWithoutUserInput = { id?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string mimetype?: Prisma.StringFieldUpdateOperationsInput | string size?: Prisma.IntFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string message?: Prisma.MessageAttachmentUpdateManyWithoutAttachmentNestedInput } export type AttachmentUncheckedUpdateWithoutUserInput = { id?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string mimetype?: Prisma.StringFieldUpdateOperationsInput | string size?: Prisma.IntFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string message?: Prisma.MessageAttachmentUncheckedUpdateManyWithoutAttachmentNestedInput } export type AttachmentUncheckedUpdateManyWithoutUserInput = { id?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string mimetype?: Prisma.StringFieldUpdateOperationsInput | string size?: Prisma.IntFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } /** * Count Type AttachmentCountOutputType */ export type AttachmentCountOutputType = { message: number } export type AttachmentCountOutputTypeSelect = { message?: boolean | AttachmentCountOutputTypeCountMessageArgs } /** * AttachmentCountOutputType without action */ export type AttachmentCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the AttachmentCountOutputType */ select?: Prisma.AttachmentCountOutputTypeSelect | null } /** * AttachmentCountOutputType without action */ export type AttachmentCountOutputTypeCountMessageArgs = { where?: Prisma.MessageAttachmentWhereInput } export type AttachmentSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean username?: boolean name?: boolean mimetype?: boolean size?: boolean createdAt?: boolean user?: boolean | Prisma.Attachment$userArgs message?: boolean | Prisma.Attachment$messageArgs _count?: boolean | Prisma.AttachmentCountOutputTypeDefaultArgs }, ExtArgs["result"]["attachment"]> export type AttachmentSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean username?: boolean name?: boolean mimetype?: boolean size?: boolean createdAt?: boolean user?: boolean | Prisma.Attachment$userArgs }, ExtArgs["result"]["attachment"]> export type AttachmentSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean username?: boolean name?: boolean mimetype?: boolean size?: boolean createdAt?: boolean user?: boolean | Prisma.Attachment$userArgs }, ExtArgs["result"]["attachment"]> export type AttachmentSelectScalar = { id?: boolean username?: boolean name?: boolean mimetype?: boolean size?: boolean createdAt?: boolean } export type AttachmentOmit = runtime.Types.Extensions.GetOmit<"id" | "username" | "name" | "mimetype" | "size" | "createdAt", ExtArgs["result"]["attachment"]> export type AttachmentInclude = { user?: boolean | Prisma.Attachment$userArgs message?: boolean | Prisma.Attachment$messageArgs _count?: boolean | Prisma.AttachmentCountOutputTypeDefaultArgs } export type AttachmentIncludeCreateManyAndReturn = { user?: boolean | Prisma.Attachment$userArgs } export type AttachmentIncludeUpdateManyAndReturn = { user?: boolean | Prisma.Attachment$userArgs } export type $AttachmentPayload = { name: "Attachment" objects: { user: Prisma.$UserPayload | null message: Prisma.$MessageAttachmentPayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string username: string | null name: string mimetype: string size: number createdAt: Date }, ExtArgs["result"]["attachment"]> composites: {} } export type AttachmentGetPayload = runtime.Types.Result.GetResult export type AttachmentCountArgs = Omit & { select?: AttachmentCountAggregateInputType | true } export interface AttachmentDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['Attachment'], meta: { name: 'Attachment' } } /** * Find zero or one Attachment that matches the filter. * @param {AttachmentFindUniqueArgs} args - Arguments to find a Attachment * @example * // Get one Attachment * const attachment = await prisma.attachment.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one Attachment that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {AttachmentFindUniqueOrThrowArgs} args - Arguments to find a Attachment * @example * // Get one Attachment * const attachment = await prisma.attachment.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first Attachment 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 {AttachmentFindFirstArgs} args - Arguments to find a Attachment * @example * // Get one Attachment * const attachment = await prisma.attachment.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first Attachment 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 {AttachmentFindFirstOrThrowArgs} args - Arguments to find a Attachment * @example * // Get one Attachment * const attachment = await prisma.attachment.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, 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 {AttachmentFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Attachments * const attachments = await prisma.attachment.findMany() * * // Get first 10 Attachments * const attachments = await prisma.attachment.findMany({ take: 10 }) * * // Only select the `id` * const attachmentWithIdOnly = await prisma.attachment.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a Attachment. * @param {AttachmentCreateArgs} args - Arguments to create a Attachment. * @example * // Create one Attachment * const Attachment = await prisma.attachment.create({ * data: { * // ... data to create a Attachment * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many Attachments. * @param {AttachmentCreateManyArgs} args - Arguments to create many Attachments. * @example * // Create many Attachments * const attachment = await prisma.attachment.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many Attachments and returns the data saved in the database. * @param {AttachmentCreateManyAndReturnArgs} args - Arguments to create many Attachments. * @example * // Create many Attachments * const attachment = await prisma.attachment.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Attachments and only return the `id` * const attachmentWithIdOnly = await prisma.attachment.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(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> /** * Delete a Attachment. * @param {AttachmentDeleteArgs} args - Arguments to delete one Attachment. * @example * // Delete one Attachment * const Attachment = await prisma.attachment.delete({ * where: { * // ... filter to delete one Attachment * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one Attachment. * @param {AttachmentUpdateArgs} args - Arguments to update one Attachment. * @example * // Update one Attachment * const attachment = await prisma.attachment.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more Attachments. * @param {AttachmentDeleteManyArgs} args - Arguments to filter Attachments to delete. * @example * // Delete a few Attachments * const { count } = await prisma.attachment.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * 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 {AttachmentUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Attachments * const attachment = await prisma.attachment.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Attachments and returns the data updated in the database. * @param {AttachmentUpdateManyAndReturnArgs} args - Arguments to update many Attachments. * @example * // Update many Attachments * const attachment = await prisma.attachment.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more Attachments and only return the `id` * const attachmentWithIdOnly = await prisma.attachment.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(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> /** * Create or update one Attachment. * @param {AttachmentUpsertArgs} args - Arguments to update or create a Attachment. * @example * // Update or create a Attachment * const attachment = await prisma.attachment.upsert({ * create: { * // ... data to create a Attachment * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Attachment we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, 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 {AttachmentCountArgs} args - Arguments to filter Attachments to count. * @example * // Count the number of Attachments * const count = await prisma.attachment.count({ * where: { * // ... the filter for the Attachments we want to count * } * }) **/ count( args?: Prisma.Subset, ): Prisma.PrismaPromise< T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType : number > /** * Allows you to perform aggregations operations on a Attachment. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {AttachmentAggregateArgs} 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(args: Prisma.Subset): Prisma.PrismaPromise> /** * Group by Attachment. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {AttachmentGroupByArgs} 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 AttachmentGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: AttachmentGroupByArgs['orderBy'] } : { orderBy?: AttachmentGroupByArgs['orderBy'] }, OrderFields extends Prisma.ExcludeUnderscoreKeys>>, ByFields extends Prisma.MaybeTupleToUnion, ByValid extends Prisma.Has, HavingFields extends Prisma.GetHavingFields, HavingValid extends Prisma.Has, 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 ? 'orderBy' extends Prisma.Keys ? 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 ? 'orderBy' extends Prisma.Keys ? 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 & InputErrors): {} extends InputErrors ? GetAttachmentGroupByPayload : Prisma.PrismaPromise /** * Fields of the Attachment model */ readonly fields: AttachmentFieldRefs; } /** * The delegate class that acts as a "Promise-like" for Attachment. * 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__AttachmentClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" user = {}>(args?: Prisma.Subset>): Prisma.Prisma__UserClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> message = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, 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(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise /** * 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(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise /** * 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 } /** * Fields of the Attachment model */ export interface AttachmentFieldRefs { readonly id: Prisma.FieldRef<"Attachment", 'String'> readonly username: Prisma.FieldRef<"Attachment", 'String'> readonly name: Prisma.FieldRef<"Attachment", 'String'> readonly mimetype: Prisma.FieldRef<"Attachment", 'String'> readonly size: Prisma.FieldRef<"Attachment", 'Int'> readonly createdAt: Prisma.FieldRef<"Attachment", 'DateTime'> } // Custom InputTypes /** * Attachment findUnique */ export type AttachmentFindUniqueArgs = { /** * Select specific fields to fetch from the Attachment */ select?: Prisma.AttachmentSelect | null /** * Omit specific fields from the Attachment */ omit?: Prisma.AttachmentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AttachmentInclude | null /** * Filter, which Attachment to fetch. */ where: Prisma.AttachmentWhereUniqueInput } /** * Attachment findUniqueOrThrow */ export type AttachmentFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Attachment */ select?: Prisma.AttachmentSelect | null /** * Omit specific fields from the Attachment */ omit?: Prisma.AttachmentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AttachmentInclude | null /** * Filter, which Attachment to fetch. */ where: Prisma.AttachmentWhereUniqueInput } /** * Attachment findFirst */ export type AttachmentFindFirstArgs = { /** * Select specific fields to fetch from the Attachment */ select?: Prisma.AttachmentSelect | null /** * Omit specific fields from the Attachment */ omit?: Prisma.AttachmentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AttachmentInclude | null /** * Filter, which Attachment to fetch. */ where?: Prisma.AttachmentWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Attachments to fetch. */ orderBy?: Prisma.AttachmentOrderByWithRelationInput | Prisma.AttachmentOrderByWithRelationInput[] /** * {@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.AttachmentWhereUniqueInput /** * {@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.AttachmentScalarFieldEnum | Prisma.AttachmentScalarFieldEnum[] } /** * Attachment findFirstOrThrow */ export type AttachmentFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Attachment */ select?: Prisma.AttachmentSelect | null /** * Omit specific fields from the Attachment */ omit?: Prisma.AttachmentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AttachmentInclude | null /** * Filter, which Attachment to fetch. */ where?: Prisma.AttachmentWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Attachments to fetch. */ orderBy?: Prisma.AttachmentOrderByWithRelationInput | Prisma.AttachmentOrderByWithRelationInput[] /** * {@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.AttachmentWhereUniqueInput /** * {@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.AttachmentScalarFieldEnum | Prisma.AttachmentScalarFieldEnum[] } /** * Attachment findMany */ export type AttachmentFindManyArgs = { /** * Select specific fields to fetch from the Attachment */ select?: Prisma.AttachmentSelect | null /** * Omit specific fields from the Attachment */ omit?: Prisma.AttachmentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AttachmentInclude | null /** * Filter, which Attachments to fetch. */ where?: Prisma.AttachmentWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Attachments to fetch. */ orderBy?: Prisma.AttachmentOrderByWithRelationInput | Prisma.AttachmentOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Attachments. */ cursor?: Prisma.AttachmentWhereUniqueInput /** * {@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.AttachmentScalarFieldEnum | Prisma.AttachmentScalarFieldEnum[] } /** * Attachment create */ export type AttachmentCreateArgs = { /** * Select specific fields to fetch from the Attachment */ select?: Prisma.AttachmentSelect | null /** * Omit specific fields from the Attachment */ omit?: Prisma.AttachmentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AttachmentInclude | null /** * The data needed to create a Attachment. */ data: Prisma.XOR } /** * Attachment createMany */ export type AttachmentCreateManyArgs = { /** * The data used to create many Attachments. */ data: Prisma.AttachmentCreateManyInput | Prisma.AttachmentCreateManyInput[] } /** * Attachment createManyAndReturn */ export type AttachmentCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the Attachment */ select?: Prisma.AttachmentSelectCreateManyAndReturn | null /** * Omit specific fields from the Attachment */ omit?: Prisma.AttachmentOmit | null /** * The data used to create many Attachments. */ data: Prisma.AttachmentCreateManyInput | Prisma.AttachmentCreateManyInput[] /** * Choose, which related nodes to fetch as well */ include?: Prisma.AttachmentIncludeCreateManyAndReturn | null } /** * Attachment update */ export type AttachmentUpdateArgs = { /** * Select specific fields to fetch from the Attachment */ select?: Prisma.AttachmentSelect | null /** * Omit specific fields from the Attachment */ omit?: Prisma.AttachmentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AttachmentInclude | null /** * The data needed to update a Attachment. */ data: Prisma.XOR /** * Choose, which Attachment to update. */ where: Prisma.AttachmentWhereUniqueInput } /** * Attachment updateMany */ export type AttachmentUpdateManyArgs = { /** * The data used to update Attachments. */ data: Prisma.XOR /** * Filter which Attachments to update */ where?: Prisma.AttachmentWhereInput /** * Limit how many Attachments to update. */ limit?: number } /** * Attachment updateManyAndReturn */ export type AttachmentUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the Attachment */ select?: Prisma.AttachmentSelectUpdateManyAndReturn | null /** * Omit specific fields from the Attachment */ omit?: Prisma.AttachmentOmit | null /** * The data used to update Attachments. */ data: Prisma.XOR /** * Filter which Attachments to update */ where?: Prisma.AttachmentWhereInput /** * Limit how many Attachments to update. */ limit?: number /** * Choose, which related nodes to fetch as well */ include?: Prisma.AttachmentIncludeUpdateManyAndReturn | null } /** * Attachment upsert */ export type AttachmentUpsertArgs = { /** * Select specific fields to fetch from the Attachment */ select?: Prisma.AttachmentSelect | null /** * Omit specific fields from the Attachment */ omit?: Prisma.AttachmentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AttachmentInclude | null /** * The filter to search for the Attachment to update in case it exists. */ where: Prisma.AttachmentWhereUniqueInput /** * In case the Attachment found by the `where` argument doesn't exist, create a new Attachment with this data. */ create: Prisma.XOR /** * In case the Attachment was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * Attachment delete */ export type AttachmentDeleteArgs = { /** * Select specific fields to fetch from the Attachment */ select?: Prisma.AttachmentSelect | null /** * Omit specific fields from the Attachment */ omit?: Prisma.AttachmentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AttachmentInclude | null /** * Filter which Attachment to delete. */ where: Prisma.AttachmentWhereUniqueInput } /** * Attachment deleteMany */ export type AttachmentDeleteManyArgs = { /** * Filter which Attachments to delete */ where?: Prisma.AttachmentWhereInput /** * Limit how many Attachments to delete. */ limit?: number } /** * Attachment.user */ export type Attachment$userArgs = { /** * Select specific fields to fetch from the User */ select?: Prisma.UserSelect | null /** * Omit specific fields from the User */ omit?: Prisma.UserOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserInclude | null where?: Prisma.UserWhereInput } /** * Attachment.message */ export type Attachment$messageArgs = { /** * Select specific fields to fetch from the MessageAttachment */ select?: Prisma.MessageAttachmentSelect | null /** * Omit specific fields from the MessageAttachment */ omit?: Prisma.MessageAttachmentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.MessageAttachmentInclude | null where?: Prisma.MessageAttachmentWhereInput orderBy?: Prisma.MessageAttachmentOrderByWithRelationInput | Prisma.MessageAttachmentOrderByWithRelationInput[] cursor?: Prisma.MessageAttachmentWhereUniqueInput take?: number skip?: number distinct?: Prisma.MessageAttachmentScalarFieldEnum | Prisma.MessageAttachmentScalarFieldEnum[] } /** * Attachment without action */ export type AttachmentDefaultArgs = { /** * Select specific fields to fetch from the Attachment */ select?: Prisma.AttachmentSelect | null /** * Omit specific fields from the Attachment */ omit?: Prisma.AttachmentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AttachmentInclude | null }