/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `CustomerLegal` 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.js" import type * as Prisma from "../internal/prismaNamespace.js" /** * Model CustomerLegal * */ export type CustomerLegalModel = runtime.Types.Result.DefaultSelection export type AggregateCustomerLegal = { _count: CustomerLegalCountAggregateOutputType | null _min: CustomerLegalMinAggregateOutputType | null _max: CustomerLegalMaxAggregateOutputType | null } export type CustomerLegalMinAggregateOutputType = { name: string | null economic_code: string | null registration_number: string | null postal_code: string | null customer_id: string | null business_activity_id: string | null } export type CustomerLegalMaxAggregateOutputType = { name: string | null economic_code: string | null registration_number: string | null postal_code: string | null customer_id: string | null business_activity_id: string | null } export type CustomerLegalCountAggregateOutputType = { name: number economic_code: number registration_number: number postal_code: number customer_id: number business_activity_id: number _all: number } export type CustomerLegalMinAggregateInputType = { name?: true economic_code?: true registration_number?: true postal_code?: true customer_id?: true business_activity_id?: true } export type CustomerLegalMaxAggregateInputType = { name?: true economic_code?: true registration_number?: true postal_code?: true customer_id?: true business_activity_id?: true } export type CustomerLegalCountAggregateInputType = { name?: true economic_code?: true registration_number?: true postal_code?: true customer_id?: true business_activity_id?: true _all?: true } export type CustomerLegalAggregateArgs = { /** * Filter which CustomerLegal to aggregate. */ where?: Prisma.CustomerLegalWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of CustomerLegals to fetch. */ orderBy?: Prisma.CustomerLegalOrderByWithRelationInput | Prisma.CustomerLegalOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.CustomerLegalWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` CustomerLegals 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` CustomerLegals. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned CustomerLegals **/ _count?: true | CustomerLegalCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: CustomerLegalMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: CustomerLegalMaxAggregateInputType } export type GetCustomerLegalAggregateType = { [P in keyof T & keyof AggregateCustomerLegal]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type CustomerLegalGroupByArgs = { where?: Prisma.CustomerLegalWhereInput orderBy?: Prisma.CustomerLegalOrderByWithAggregationInput | Prisma.CustomerLegalOrderByWithAggregationInput[] by: Prisma.CustomerLegalScalarFieldEnum[] | Prisma.CustomerLegalScalarFieldEnum having?: Prisma.CustomerLegalScalarWhereWithAggregatesInput take?: number skip?: number _count?: CustomerLegalCountAggregateInputType | true _min?: CustomerLegalMinAggregateInputType _max?: CustomerLegalMaxAggregateInputType } export type CustomerLegalGroupByOutputType = { name: string economic_code: string registration_number: string | null postal_code: string customer_id: string business_activity_id: string _count: CustomerLegalCountAggregateOutputType | null _min: CustomerLegalMinAggregateOutputType | null _max: CustomerLegalMaxAggregateOutputType | null } export type GetCustomerLegalGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof CustomerLegalGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type CustomerLegalWhereInput = { AND?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[] OR?: Prisma.CustomerLegalWhereInput[] NOT?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[] name?: Prisma.StringFilter<"CustomerLegal"> | string economic_code?: Prisma.StringFilter<"CustomerLegal"> | string registration_number?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null postal_code?: Prisma.StringFilter<"CustomerLegal"> | string customer_id?: Prisma.StringFilter<"CustomerLegal"> | string business_activity_id?: Prisma.StringFilter<"CustomerLegal"> | string business_activity?: Prisma.XOR customer?: Prisma.XOR } export type CustomerLegalOrderByWithRelationInput = { name?: Prisma.SortOrder economic_code?: Prisma.SortOrder registration_number?: Prisma.SortOrderInput | Prisma.SortOrder postal_code?: Prisma.SortOrder customer_id?: Prisma.SortOrder business_activity_id?: Prisma.SortOrder business_activity?: Prisma.BusinessActivityOrderByWithRelationInput customer?: Prisma.CustomerOrderByWithRelationInput _relevance?: Prisma.CustomerLegalOrderByRelevanceInput } export type CustomerLegalWhereUniqueInput = Prisma.AtLeast<{ customer_id?: string business_activity_id_economic_code?: Prisma.CustomerLegalBusiness_activity_idEconomic_codeCompoundUniqueInput AND?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[] OR?: Prisma.CustomerLegalWhereInput[] NOT?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[] name?: Prisma.StringFilter<"CustomerLegal"> | string economic_code?: Prisma.StringFilter<"CustomerLegal"> | string registration_number?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null postal_code?: Prisma.StringFilter<"CustomerLegal"> | string business_activity_id?: Prisma.StringFilter<"CustomerLegal"> | string business_activity?: Prisma.XOR customer?: Prisma.XOR }, "customer_id" | "business_activity_id_economic_code"> export type CustomerLegalOrderByWithAggregationInput = { name?: Prisma.SortOrder economic_code?: Prisma.SortOrder registration_number?: Prisma.SortOrderInput | Prisma.SortOrder postal_code?: Prisma.SortOrder customer_id?: Prisma.SortOrder business_activity_id?: Prisma.SortOrder _count?: Prisma.CustomerLegalCountOrderByAggregateInput _max?: Prisma.CustomerLegalMaxOrderByAggregateInput _min?: Prisma.CustomerLegalMinOrderByAggregateInput } export type CustomerLegalScalarWhereWithAggregatesInput = { AND?: Prisma.CustomerLegalScalarWhereWithAggregatesInput | Prisma.CustomerLegalScalarWhereWithAggregatesInput[] OR?: Prisma.CustomerLegalScalarWhereWithAggregatesInput[] NOT?: Prisma.CustomerLegalScalarWhereWithAggregatesInput | Prisma.CustomerLegalScalarWhereWithAggregatesInput[] name?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string economic_code?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string registration_number?: Prisma.StringNullableWithAggregatesFilter<"CustomerLegal"> | string | null postal_code?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string customer_id?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string business_activity_id?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string } export type CustomerLegalCreateInput = { name: string economic_code: string registration_number?: string | null postal_code: string business_activity: Prisma.BusinessActivityCreateNestedOneWithoutCustomer_legalsInput customer: Prisma.CustomerCreateNestedOneWithoutLegalInput } export type CustomerLegalUncheckedCreateInput = { name: string economic_code: string registration_number?: string | null postal_code: string customer_id: string business_activity_id: string } export type CustomerLegalUpdateInput = { name?: Prisma.StringFieldUpdateOperationsInput | string economic_code?: Prisma.StringFieldUpdateOperationsInput | string registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null postal_code?: Prisma.StringFieldUpdateOperationsInput | string business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutCustomer_legalsNestedInput customer?: Prisma.CustomerUpdateOneRequiredWithoutLegalNestedInput } export type CustomerLegalUncheckedUpdateInput = { name?: Prisma.StringFieldUpdateOperationsInput | string economic_code?: Prisma.StringFieldUpdateOperationsInput | string registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null postal_code?: Prisma.StringFieldUpdateOperationsInput | string customer_id?: Prisma.StringFieldUpdateOperationsInput | string business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string } export type CustomerLegalCreateManyInput = { name: string economic_code: string registration_number?: string | null postal_code: string customer_id: string business_activity_id: string } export type CustomerLegalUpdateManyMutationInput = { name?: Prisma.StringFieldUpdateOperationsInput | string economic_code?: Prisma.StringFieldUpdateOperationsInput | string registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null postal_code?: Prisma.StringFieldUpdateOperationsInput | string } export type CustomerLegalUncheckedUpdateManyInput = { name?: Prisma.StringFieldUpdateOperationsInput | string economic_code?: Prisma.StringFieldUpdateOperationsInput | string registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null postal_code?: Prisma.StringFieldUpdateOperationsInput | string customer_id?: Prisma.StringFieldUpdateOperationsInput | string business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string } export type CustomerLegalListRelationFilter = { every?: Prisma.CustomerLegalWhereInput some?: Prisma.CustomerLegalWhereInput none?: Prisma.CustomerLegalWhereInput } export type CustomerLegalOrderByRelationAggregateInput = { _count?: Prisma.SortOrder } export type CustomerLegalNullableScalarRelationFilter = { is?: Prisma.CustomerLegalWhereInput | null isNot?: Prisma.CustomerLegalWhereInput | null } export type CustomerLegalOrderByRelevanceInput = { fields: Prisma.CustomerLegalOrderByRelevanceFieldEnum | Prisma.CustomerLegalOrderByRelevanceFieldEnum[] sort: Prisma.SortOrder search: string } export type CustomerLegalBusiness_activity_idEconomic_codeCompoundUniqueInput = { business_activity_id: string economic_code: string } export type CustomerLegalCountOrderByAggregateInput = { name?: Prisma.SortOrder economic_code?: Prisma.SortOrder registration_number?: Prisma.SortOrder postal_code?: Prisma.SortOrder customer_id?: Prisma.SortOrder business_activity_id?: Prisma.SortOrder } export type CustomerLegalMaxOrderByAggregateInput = { name?: Prisma.SortOrder economic_code?: Prisma.SortOrder registration_number?: Prisma.SortOrder postal_code?: Prisma.SortOrder customer_id?: Prisma.SortOrder business_activity_id?: Prisma.SortOrder } export type CustomerLegalMinOrderByAggregateInput = { name?: Prisma.SortOrder economic_code?: Prisma.SortOrder registration_number?: Prisma.SortOrder postal_code?: Prisma.SortOrder customer_id?: Prisma.SortOrder business_activity_id?: Prisma.SortOrder } export type CustomerLegalCreateNestedManyWithoutBusiness_activityInput = { create?: Prisma.XOR | Prisma.CustomerLegalCreateWithoutBusiness_activityInput[] | Prisma.CustomerLegalUncheckedCreateWithoutBusiness_activityInput[] connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput | Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput[] createMany?: Prisma.CustomerLegalCreateManyBusiness_activityInputEnvelope connect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[] } export type CustomerLegalUncheckedCreateNestedManyWithoutBusiness_activityInput = { create?: Prisma.XOR | Prisma.CustomerLegalCreateWithoutBusiness_activityInput[] | Prisma.CustomerLegalUncheckedCreateWithoutBusiness_activityInput[] connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput | Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput[] createMany?: Prisma.CustomerLegalCreateManyBusiness_activityInputEnvelope connect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[] } export type CustomerLegalUpdateManyWithoutBusiness_activityNestedInput = { create?: Prisma.XOR | Prisma.CustomerLegalCreateWithoutBusiness_activityInput[] | Prisma.CustomerLegalUncheckedCreateWithoutBusiness_activityInput[] connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput | Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput[] upsert?: Prisma.CustomerLegalUpsertWithWhereUniqueWithoutBusiness_activityInput | Prisma.CustomerLegalUpsertWithWhereUniqueWithoutBusiness_activityInput[] createMany?: Prisma.CustomerLegalCreateManyBusiness_activityInputEnvelope set?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[] disconnect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[] delete?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[] connect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[] update?: Prisma.CustomerLegalUpdateWithWhereUniqueWithoutBusiness_activityInput | Prisma.CustomerLegalUpdateWithWhereUniqueWithoutBusiness_activityInput[] updateMany?: Prisma.CustomerLegalUpdateManyWithWhereWithoutBusiness_activityInput | Prisma.CustomerLegalUpdateManyWithWhereWithoutBusiness_activityInput[] deleteMany?: Prisma.CustomerLegalScalarWhereInput | Prisma.CustomerLegalScalarWhereInput[] } export type CustomerLegalUncheckedUpdateManyWithoutBusiness_activityNestedInput = { create?: Prisma.XOR | Prisma.CustomerLegalCreateWithoutBusiness_activityInput[] | Prisma.CustomerLegalUncheckedCreateWithoutBusiness_activityInput[] connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput | Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput[] upsert?: Prisma.CustomerLegalUpsertWithWhereUniqueWithoutBusiness_activityInput | Prisma.CustomerLegalUpsertWithWhereUniqueWithoutBusiness_activityInput[] createMany?: Prisma.CustomerLegalCreateManyBusiness_activityInputEnvelope set?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[] disconnect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[] delete?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[] connect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[] update?: Prisma.CustomerLegalUpdateWithWhereUniqueWithoutBusiness_activityInput | Prisma.CustomerLegalUpdateWithWhereUniqueWithoutBusiness_activityInput[] updateMany?: Prisma.CustomerLegalUpdateManyWithWhereWithoutBusiness_activityInput | Prisma.CustomerLegalUpdateManyWithWhereWithoutBusiness_activityInput[] deleteMany?: Prisma.CustomerLegalScalarWhereInput | Prisma.CustomerLegalScalarWhereInput[] } export type CustomerLegalCreateNestedOneWithoutCustomerInput = { create?: Prisma.XOR connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutCustomerInput connect?: Prisma.CustomerLegalWhereUniqueInput } export type CustomerLegalUncheckedCreateNestedOneWithoutCustomerInput = { create?: Prisma.XOR connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutCustomerInput connect?: Prisma.CustomerLegalWhereUniqueInput } export type CustomerLegalUpdateOneWithoutCustomerNestedInput = { create?: Prisma.XOR connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutCustomerInput upsert?: Prisma.CustomerLegalUpsertWithoutCustomerInput disconnect?: Prisma.CustomerLegalWhereInput | boolean delete?: Prisma.CustomerLegalWhereInput | boolean connect?: Prisma.CustomerLegalWhereUniqueInput update?: Prisma.XOR, Prisma.CustomerLegalUncheckedUpdateWithoutCustomerInput> } export type CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput = { create?: Prisma.XOR connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutCustomerInput upsert?: Prisma.CustomerLegalUpsertWithoutCustomerInput disconnect?: Prisma.CustomerLegalWhereInput | boolean delete?: Prisma.CustomerLegalWhereInput | boolean connect?: Prisma.CustomerLegalWhereUniqueInput update?: Prisma.XOR, Prisma.CustomerLegalUncheckedUpdateWithoutCustomerInput> } export type CustomerLegalCreateWithoutBusiness_activityInput = { name: string economic_code: string registration_number?: string | null postal_code: string customer: Prisma.CustomerCreateNestedOneWithoutLegalInput } export type CustomerLegalUncheckedCreateWithoutBusiness_activityInput = { name: string economic_code: string registration_number?: string | null postal_code: string customer_id: string } export type CustomerLegalCreateOrConnectWithoutBusiness_activityInput = { where: Prisma.CustomerLegalWhereUniqueInput create: Prisma.XOR } export type CustomerLegalCreateManyBusiness_activityInputEnvelope = { data: Prisma.CustomerLegalCreateManyBusiness_activityInput | Prisma.CustomerLegalCreateManyBusiness_activityInput[] skipDuplicates?: boolean } export type CustomerLegalUpsertWithWhereUniqueWithoutBusiness_activityInput = { where: Prisma.CustomerLegalWhereUniqueInput update: Prisma.XOR create: Prisma.XOR } export type CustomerLegalUpdateWithWhereUniqueWithoutBusiness_activityInput = { where: Prisma.CustomerLegalWhereUniqueInput data: Prisma.XOR } export type CustomerLegalUpdateManyWithWhereWithoutBusiness_activityInput = { where: Prisma.CustomerLegalScalarWhereInput data: Prisma.XOR } export type CustomerLegalScalarWhereInput = { AND?: Prisma.CustomerLegalScalarWhereInput | Prisma.CustomerLegalScalarWhereInput[] OR?: Prisma.CustomerLegalScalarWhereInput[] NOT?: Prisma.CustomerLegalScalarWhereInput | Prisma.CustomerLegalScalarWhereInput[] name?: Prisma.StringFilter<"CustomerLegal"> | string economic_code?: Prisma.StringFilter<"CustomerLegal"> | string registration_number?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null postal_code?: Prisma.StringFilter<"CustomerLegal"> | string customer_id?: Prisma.StringFilter<"CustomerLegal"> | string business_activity_id?: Prisma.StringFilter<"CustomerLegal"> | string } export type CustomerLegalCreateWithoutCustomerInput = { name: string economic_code: string registration_number?: string | null postal_code: string business_activity: Prisma.BusinessActivityCreateNestedOneWithoutCustomer_legalsInput } export type CustomerLegalUncheckedCreateWithoutCustomerInput = { name: string economic_code: string registration_number?: string | null postal_code: string business_activity_id: string } export type CustomerLegalCreateOrConnectWithoutCustomerInput = { where: Prisma.CustomerLegalWhereUniqueInput create: Prisma.XOR } export type CustomerLegalUpsertWithoutCustomerInput = { update: Prisma.XOR create: Prisma.XOR where?: Prisma.CustomerLegalWhereInput } export type CustomerLegalUpdateToOneWithWhereWithoutCustomerInput = { where?: Prisma.CustomerLegalWhereInput data: Prisma.XOR } export type CustomerLegalUpdateWithoutCustomerInput = { name?: Prisma.StringFieldUpdateOperationsInput | string economic_code?: Prisma.StringFieldUpdateOperationsInput | string registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null postal_code?: Prisma.StringFieldUpdateOperationsInput | string business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutCustomer_legalsNestedInput } export type CustomerLegalUncheckedUpdateWithoutCustomerInput = { name?: Prisma.StringFieldUpdateOperationsInput | string economic_code?: Prisma.StringFieldUpdateOperationsInput | string registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null postal_code?: Prisma.StringFieldUpdateOperationsInput | string business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string } export type CustomerLegalCreateManyBusiness_activityInput = { name: string economic_code: string registration_number?: string | null postal_code: string customer_id: string } export type CustomerLegalUpdateWithoutBusiness_activityInput = { name?: Prisma.StringFieldUpdateOperationsInput | string economic_code?: Prisma.StringFieldUpdateOperationsInput | string registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null postal_code?: Prisma.StringFieldUpdateOperationsInput | string customer?: Prisma.CustomerUpdateOneRequiredWithoutLegalNestedInput } export type CustomerLegalUncheckedUpdateWithoutBusiness_activityInput = { name?: Prisma.StringFieldUpdateOperationsInput | string economic_code?: Prisma.StringFieldUpdateOperationsInput | string registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null postal_code?: Prisma.StringFieldUpdateOperationsInput | string customer_id?: Prisma.StringFieldUpdateOperationsInput | string } export type CustomerLegalUncheckedUpdateManyWithoutBusiness_activityInput = { name?: Prisma.StringFieldUpdateOperationsInput | string economic_code?: Prisma.StringFieldUpdateOperationsInput | string registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null postal_code?: Prisma.StringFieldUpdateOperationsInput | string customer_id?: Prisma.StringFieldUpdateOperationsInput | string } export type CustomerLegalSelect = runtime.Types.Extensions.GetSelect<{ name?: boolean economic_code?: boolean registration_number?: boolean postal_code?: boolean customer_id?: boolean business_activity_id?: boolean business_activity?: boolean | Prisma.BusinessActivityDefaultArgs customer?: boolean | Prisma.CustomerDefaultArgs }, ExtArgs["result"]["customerLegal"]> export type CustomerLegalSelectScalar = { name?: boolean economic_code?: boolean registration_number?: boolean postal_code?: boolean customer_id?: boolean business_activity_id?: boolean } export type CustomerLegalOmit = runtime.Types.Extensions.GetOmit<"name" | "economic_code" | "registration_number" | "postal_code" | "customer_id" | "business_activity_id", ExtArgs["result"]["customerLegal"]> export type CustomerLegalInclude = { business_activity?: boolean | Prisma.BusinessActivityDefaultArgs customer?: boolean | Prisma.CustomerDefaultArgs } export type $CustomerLegalPayload = { name: "CustomerLegal" objects: { business_activity: Prisma.$BusinessActivityPayload customer: Prisma.$CustomerPayload } scalars: runtime.Types.Extensions.GetPayloadResult<{ name: string economic_code: string registration_number: string | null postal_code: string customer_id: string business_activity_id: string }, ExtArgs["result"]["customerLegal"]> composites: {} } export type CustomerLegalGetPayload = runtime.Types.Result.GetResult export type CustomerLegalCountArgs = Omit & { select?: CustomerLegalCountAggregateInputType | true } export interface CustomerLegalDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['CustomerLegal'], meta: { name: 'CustomerLegal' } } /** * Find zero or one CustomerLegal that matches the filter. * @param {CustomerLegalFindUniqueArgs} args - Arguments to find a CustomerLegal * @example * // Get one CustomerLegal * const customerLegal = await prisma.customerLegal.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__CustomerLegalClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one CustomerLegal that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {CustomerLegalFindUniqueOrThrowArgs} args - Arguments to find a CustomerLegal * @example * // Get one CustomerLegal * const customerLegal = await prisma.customerLegal.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__CustomerLegalClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first CustomerLegal 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 {CustomerLegalFindFirstArgs} args - Arguments to find a CustomerLegal * @example * // Get one CustomerLegal * const customerLegal = await prisma.customerLegal.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__CustomerLegalClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first CustomerLegal 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 {CustomerLegalFindFirstOrThrowArgs} args - Arguments to find a CustomerLegal * @example * // Get one CustomerLegal * const customerLegal = await prisma.customerLegal.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__CustomerLegalClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more CustomerLegals 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 {CustomerLegalFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all CustomerLegals * const customerLegals = await prisma.customerLegal.findMany() * * // Get first 10 CustomerLegals * const customerLegals = await prisma.customerLegal.findMany({ take: 10 }) * * // Only select the `name` * const customerLegalWithNameOnly = await prisma.customerLegal.findMany({ select: { name: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a CustomerLegal. * @param {CustomerLegalCreateArgs} args - Arguments to create a CustomerLegal. * @example * // Create one CustomerLegal * const CustomerLegal = await prisma.customerLegal.create({ * data: { * // ... data to create a CustomerLegal * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__CustomerLegalClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many CustomerLegals. * @param {CustomerLegalCreateManyArgs} args - Arguments to create many CustomerLegals. * @example * // Create many CustomerLegals * const customerLegal = await prisma.customerLegal.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Delete a CustomerLegal. * @param {CustomerLegalDeleteArgs} args - Arguments to delete one CustomerLegal. * @example * // Delete one CustomerLegal * const CustomerLegal = await prisma.customerLegal.delete({ * where: { * // ... filter to delete one CustomerLegal * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__CustomerLegalClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one CustomerLegal. * @param {CustomerLegalUpdateArgs} args - Arguments to update one CustomerLegal. * @example * // Update one CustomerLegal * const customerLegal = await prisma.customerLegal.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__CustomerLegalClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more CustomerLegals. * @param {CustomerLegalDeleteManyArgs} args - Arguments to filter CustomerLegals to delete. * @example * // Delete a few CustomerLegals * const { count } = await prisma.customerLegal.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more CustomerLegals. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CustomerLegalUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many CustomerLegals * const customerLegal = await prisma.customerLegal.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create or update one CustomerLegal. * @param {CustomerLegalUpsertArgs} args - Arguments to update or create a CustomerLegal. * @example * // Update or create a CustomerLegal * const customerLegal = await prisma.customerLegal.upsert({ * create: { * // ... data to create a CustomerLegal * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the CustomerLegal we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__CustomerLegalClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of CustomerLegals. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CustomerLegalCountArgs} args - Arguments to filter CustomerLegals to count. * @example * // Count the number of CustomerLegals * const count = await prisma.customerLegal.count({ * where: { * // ... the filter for the CustomerLegals 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 CustomerLegal. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CustomerLegalAggregateArgs} 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 CustomerLegal. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CustomerLegalGroupByArgs} 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 CustomerLegalGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: CustomerLegalGroupByArgs['orderBy'] } : { orderBy?: CustomerLegalGroupByArgs['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 ? GetCustomerLegalGroupByPayload : Prisma.PrismaPromise /** * Fields of the CustomerLegal model */ readonly fields: CustomerLegalFieldRefs; } /** * The delegate class that acts as a "Promise-like" for CustomerLegal. * 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__CustomerLegalClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" business_activity = {}>(args?: Prisma.Subset>): Prisma.Prisma__BusinessActivityClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> customer = {}>(args?: Prisma.Subset>): Prisma.Prisma__CustomerClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(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 CustomerLegal model */ export interface CustomerLegalFieldRefs { readonly name: Prisma.FieldRef<"CustomerLegal", 'String'> readonly economic_code: Prisma.FieldRef<"CustomerLegal", 'String'> readonly registration_number: Prisma.FieldRef<"CustomerLegal", 'String'> readonly postal_code: Prisma.FieldRef<"CustomerLegal", 'String'> readonly customer_id: Prisma.FieldRef<"CustomerLegal", 'String'> readonly business_activity_id: Prisma.FieldRef<"CustomerLegal", 'String'> } // Custom InputTypes /** * CustomerLegal findUnique */ export type CustomerLegalFindUniqueArgs = { /** * Select specific fields to fetch from the CustomerLegal */ select?: Prisma.CustomerLegalSelect | null /** * Omit specific fields from the CustomerLegal */ omit?: Prisma.CustomerLegalOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.CustomerLegalInclude | null /** * Filter, which CustomerLegal to fetch. */ where: Prisma.CustomerLegalWhereUniqueInput } /** * CustomerLegal findUniqueOrThrow */ export type CustomerLegalFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the CustomerLegal */ select?: Prisma.CustomerLegalSelect | null /** * Omit specific fields from the CustomerLegal */ omit?: Prisma.CustomerLegalOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.CustomerLegalInclude | null /** * Filter, which CustomerLegal to fetch. */ where: Prisma.CustomerLegalWhereUniqueInput } /** * CustomerLegal findFirst */ export type CustomerLegalFindFirstArgs = { /** * Select specific fields to fetch from the CustomerLegal */ select?: Prisma.CustomerLegalSelect | null /** * Omit specific fields from the CustomerLegal */ omit?: Prisma.CustomerLegalOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.CustomerLegalInclude | null /** * Filter, which CustomerLegal to fetch. */ where?: Prisma.CustomerLegalWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of CustomerLegals to fetch. */ orderBy?: Prisma.CustomerLegalOrderByWithRelationInput | Prisma.CustomerLegalOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for CustomerLegals. */ cursor?: Prisma.CustomerLegalWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` CustomerLegals 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` CustomerLegals. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of CustomerLegals. */ distinct?: Prisma.CustomerLegalScalarFieldEnum | Prisma.CustomerLegalScalarFieldEnum[] } /** * CustomerLegal findFirstOrThrow */ export type CustomerLegalFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the CustomerLegal */ select?: Prisma.CustomerLegalSelect | null /** * Omit specific fields from the CustomerLegal */ omit?: Prisma.CustomerLegalOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.CustomerLegalInclude | null /** * Filter, which CustomerLegal to fetch. */ where?: Prisma.CustomerLegalWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of CustomerLegals to fetch. */ orderBy?: Prisma.CustomerLegalOrderByWithRelationInput | Prisma.CustomerLegalOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for CustomerLegals. */ cursor?: Prisma.CustomerLegalWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` CustomerLegals 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` CustomerLegals. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of CustomerLegals. */ distinct?: Prisma.CustomerLegalScalarFieldEnum | Prisma.CustomerLegalScalarFieldEnum[] } /** * CustomerLegal findMany */ export type CustomerLegalFindManyArgs = { /** * Select specific fields to fetch from the CustomerLegal */ select?: Prisma.CustomerLegalSelect | null /** * Omit specific fields from the CustomerLegal */ omit?: Prisma.CustomerLegalOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.CustomerLegalInclude | null /** * Filter, which CustomerLegals to fetch. */ where?: Prisma.CustomerLegalWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of CustomerLegals to fetch. */ orderBy?: Prisma.CustomerLegalOrderByWithRelationInput | Prisma.CustomerLegalOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing CustomerLegals. */ cursor?: Prisma.CustomerLegalWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` CustomerLegals 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` CustomerLegals. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of CustomerLegals. */ distinct?: Prisma.CustomerLegalScalarFieldEnum | Prisma.CustomerLegalScalarFieldEnum[] } /** * CustomerLegal create */ export type CustomerLegalCreateArgs = { /** * Select specific fields to fetch from the CustomerLegal */ select?: Prisma.CustomerLegalSelect | null /** * Omit specific fields from the CustomerLegal */ omit?: Prisma.CustomerLegalOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.CustomerLegalInclude | null /** * The data needed to create a CustomerLegal. */ data: Prisma.XOR } /** * CustomerLegal createMany */ export type CustomerLegalCreateManyArgs = { /** * The data used to create many CustomerLegals. */ data: Prisma.CustomerLegalCreateManyInput | Prisma.CustomerLegalCreateManyInput[] skipDuplicates?: boolean } /** * CustomerLegal update */ export type CustomerLegalUpdateArgs = { /** * Select specific fields to fetch from the CustomerLegal */ select?: Prisma.CustomerLegalSelect | null /** * Omit specific fields from the CustomerLegal */ omit?: Prisma.CustomerLegalOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.CustomerLegalInclude | null /** * The data needed to update a CustomerLegal. */ data: Prisma.XOR /** * Choose, which CustomerLegal to update. */ where: Prisma.CustomerLegalWhereUniqueInput } /** * CustomerLegal updateMany */ export type CustomerLegalUpdateManyArgs = { /** * The data used to update CustomerLegals. */ data: Prisma.XOR /** * Filter which CustomerLegals to update */ where?: Prisma.CustomerLegalWhereInput /** * Limit how many CustomerLegals to update. */ limit?: number } /** * CustomerLegal upsert */ export type CustomerLegalUpsertArgs = { /** * Select specific fields to fetch from the CustomerLegal */ select?: Prisma.CustomerLegalSelect | null /** * Omit specific fields from the CustomerLegal */ omit?: Prisma.CustomerLegalOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.CustomerLegalInclude | null /** * The filter to search for the CustomerLegal to update in case it exists. */ where: Prisma.CustomerLegalWhereUniqueInput /** * In case the CustomerLegal found by the `where` argument doesn't exist, create a new CustomerLegal with this data. */ create: Prisma.XOR /** * In case the CustomerLegal was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * CustomerLegal delete */ export type CustomerLegalDeleteArgs = { /** * Select specific fields to fetch from the CustomerLegal */ select?: Prisma.CustomerLegalSelect | null /** * Omit specific fields from the CustomerLegal */ omit?: Prisma.CustomerLegalOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.CustomerLegalInclude | null /** * Filter which CustomerLegal to delete. */ where: Prisma.CustomerLegalWhereUniqueInput } /** * CustomerLegal deleteMany */ export type CustomerLegalDeleteManyArgs = { /** * Filter which CustomerLegals to delete */ where?: Prisma.CustomerLegalWhereInput /** * Limit how many CustomerLegals to delete. */ limit?: number } /** * CustomerLegal without action */ export type CustomerLegalDefaultArgs = { /** * Select specific fields to fetch from the CustomerLegal */ select?: Prisma.CustomerLegalSelect | null /** * Omit specific fields from the CustomerLegal */ omit?: Prisma.CustomerLegalOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.CustomerLegalInclude | null }