/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `Plan` 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 Plan * */ export type PlanModel = runtime.Types.Result.DefaultSelection export type AggregatePlan = { _count: PlanCountAggregateOutputType | null _avg: PlanAvgAggregateOutputType | null _sum: PlanSumAggregateOutputType | null _min: PlanMinAggregateOutputType | null _max: PlanMaxAggregateOutputType | null } export type PlanAvgAggregateOutputType = { price: runtime.Decimal | null } export type PlanSumAggregateOutputType = { price: runtime.Decimal | null } export type PlanMinAggregateOutputType = { code: string | null name: string | null price: runtime.Decimal | null lastUpdatedAt: Date | null } export type PlanMaxAggregateOutputType = { code: string | null name: string | null price: runtime.Decimal | null lastUpdatedAt: Date | null } export type PlanCountAggregateOutputType = { code: number name: number price: number rules: number lastUpdatedAt: number _all: number } export type PlanAvgAggregateInputType = { price?: true } export type PlanSumAggregateInputType = { price?: true } export type PlanMinAggregateInputType = { code?: true name?: true price?: true lastUpdatedAt?: true } export type PlanMaxAggregateInputType = { code?: true name?: true price?: true lastUpdatedAt?: true } export type PlanCountAggregateInputType = { code?: true name?: true price?: true rules?: true lastUpdatedAt?: true _all?: true } export type PlanAggregateArgs = { /** * Filter which Plan to aggregate. */ where?: Prisma.PlanWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Plans to fetch. */ orderBy?: Prisma.PlanOrderByWithRelationInput | Prisma.PlanOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.PlanWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Plans 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` Plans. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Plans **/ _count?: true | PlanCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: PlanAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: PlanSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: PlanMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: PlanMaxAggregateInputType } export type GetPlanAggregateType = { [P in keyof T & keyof AggregatePlan]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type PlanGroupByArgs = { where?: Prisma.PlanWhereInput orderBy?: Prisma.PlanOrderByWithAggregationInput | Prisma.PlanOrderByWithAggregationInput[] by: Prisma.PlanScalarFieldEnum[] | Prisma.PlanScalarFieldEnum having?: Prisma.PlanScalarWhereWithAggregatesInput take?: number skip?: number _count?: PlanCountAggregateInputType | true _avg?: PlanAvgAggregateInputType _sum?: PlanSumAggregateInputType _min?: PlanMinAggregateInputType _max?: PlanMaxAggregateInputType } export type PlanGroupByOutputType = { code: string name: string price: runtime.Decimal rules: runtime.JsonValue lastUpdatedAt: Date _count: PlanCountAggregateOutputType | null _avg: PlanAvgAggregateOutputType | null _sum: PlanSumAggregateOutputType | null _min: PlanMinAggregateOutputType | null _max: PlanMaxAggregateOutputType | null } export type GetPlanGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof PlanGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type PlanWhereInput = { AND?: Prisma.PlanWhereInput | Prisma.PlanWhereInput[] OR?: Prisma.PlanWhereInput[] NOT?: Prisma.PlanWhereInput | Prisma.PlanWhereInput[] code?: Prisma.StringFilter<"Plan"> | string name?: Prisma.StringFilter<"Plan"> | string price?: Prisma.DecimalFilter<"Plan"> | runtime.Decimal | runtime.DecimalJsLike | number | string rules?: Prisma.JsonFilter<"Plan"> lastUpdatedAt?: Prisma.DateTimeFilter<"Plan"> | Date | string complexes?: Prisma.ComplexListRelationFilter } export type PlanOrderByWithRelationInput = { code?: Prisma.SortOrder name?: Prisma.SortOrder price?: Prisma.SortOrder rules?: Prisma.SortOrder lastUpdatedAt?: Prisma.SortOrder complexes?: Prisma.ComplexOrderByRelationAggregateInput } export type PlanWhereUniqueInput = Prisma.AtLeast<{ code?: string AND?: Prisma.PlanWhereInput | Prisma.PlanWhereInput[] OR?: Prisma.PlanWhereInput[] NOT?: Prisma.PlanWhereInput | Prisma.PlanWhereInput[] name?: Prisma.StringFilter<"Plan"> | string price?: Prisma.DecimalFilter<"Plan"> | runtime.Decimal | runtime.DecimalJsLike | number | string rules?: Prisma.JsonFilter<"Plan"> lastUpdatedAt?: Prisma.DateTimeFilter<"Plan"> | Date | string complexes?: Prisma.ComplexListRelationFilter }, "code"> export type PlanOrderByWithAggregationInput = { code?: Prisma.SortOrder name?: Prisma.SortOrder price?: Prisma.SortOrder rules?: Prisma.SortOrder lastUpdatedAt?: Prisma.SortOrder _count?: Prisma.PlanCountOrderByAggregateInput _avg?: Prisma.PlanAvgOrderByAggregateInput _max?: Prisma.PlanMaxOrderByAggregateInput _min?: Prisma.PlanMinOrderByAggregateInput _sum?: Prisma.PlanSumOrderByAggregateInput } export type PlanScalarWhereWithAggregatesInput = { AND?: Prisma.PlanScalarWhereWithAggregatesInput | Prisma.PlanScalarWhereWithAggregatesInput[] OR?: Prisma.PlanScalarWhereWithAggregatesInput[] NOT?: Prisma.PlanScalarWhereWithAggregatesInput | Prisma.PlanScalarWhereWithAggregatesInput[] code?: Prisma.StringWithAggregatesFilter<"Plan"> | string name?: Prisma.StringWithAggregatesFilter<"Plan"> | string price?: Prisma.DecimalWithAggregatesFilter<"Plan"> | runtime.Decimal | runtime.DecimalJsLike | number | string rules?: Prisma.JsonWithAggregatesFilter<"Plan"> lastUpdatedAt?: Prisma.DateTimeWithAggregatesFilter<"Plan"> | Date | string } export type PlanCreateInput = { code: string name: string price: runtime.Decimal | runtime.DecimalJsLike | number | string rules: Prisma.JsonNullValueInput | runtime.InputJsonValue lastUpdatedAt?: Date | string complexes?: Prisma.ComplexCreateNestedManyWithoutPlanInput } export type PlanUncheckedCreateInput = { code: string name: string price: runtime.Decimal | runtime.DecimalJsLike | number | string rules: Prisma.JsonNullValueInput | runtime.InputJsonValue lastUpdatedAt?: Date | string complexes?: Prisma.ComplexUncheckedCreateNestedManyWithoutPlanInput } export type PlanUpdateInput = { code?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string price?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string rules?: Prisma.JsonNullValueInput | runtime.InputJsonValue lastUpdatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string complexes?: Prisma.ComplexUpdateManyWithoutPlanNestedInput } export type PlanUncheckedUpdateInput = { code?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string price?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string rules?: Prisma.JsonNullValueInput | runtime.InputJsonValue lastUpdatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string complexes?: Prisma.ComplexUncheckedUpdateManyWithoutPlanNestedInput } export type PlanCreateManyInput = { code: string name: string price: runtime.Decimal | runtime.DecimalJsLike | number | string rules: Prisma.JsonNullValueInput | runtime.InputJsonValue lastUpdatedAt?: Date | string } export type PlanUpdateManyMutationInput = { code?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string price?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string rules?: Prisma.JsonNullValueInput | runtime.InputJsonValue lastUpdatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type PlanUncheckedUpdateManyInput = { code?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string price?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string rules?: Prisma.JsonNullValueInput | runtime.InputJsonValue lastUpdatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type PlanNullableScalarRelationFilter = { is?: Prisma.PlanWhereInput | null isNot?: Prisma.PlanWhereInput | null } export type PlanCountOrderByAggregateInput = { code?: Prisma.SortOrder name?: Prisma.SortOrder price?: Prisma.SortOrder rules?: Prisma.SortOrder lastUpdatedAt?: Prisma.SortOrder } export type PlanAvgOrderByAggregateInput = { price?: Prisma.SortOrder } export type PlanMaxOrderByAggregateInput = { code?: Prisma.SortOrder name?: Prisma.SortOrder price?: Prisma.SortOrder lastUpdatedAt?: Prisma.SortOrder } export type PlanMinOrderByAggregateInput = { code?: Prisma.SortOrder name?: Prisma.SortOrder price?: Prisma.SortOrder lastUpdatedAt?: Prisma.SortOrder } export type PlanSumOrderByAggregateInput = { price?: Prisma.SortOrder } export type PlanCreateNestedOneWithoutComplexesInput = { create?: Prisma.XOR connectOrCreate?: Prisma.PlanCreateOrConnectWithoutComplexesInput connect?: Prisma.PlanWhereUniqueInput } export type PlanUpdateOneWithoutComplexesNestedInput = { create?: Prisma.XOR connectOrCreate?: Prisma.PlanCreateOrConnectWithoutComplexesInput upsert?: Prisma.PlanUpsertWithoutComplexesInput disconnect?: Prisma.PlanWhereInput | boolean delete?: Prisma.PlanWhereInput | boolean connect?: Prisma.PlanWhereUniqueInput update?: Prisma.XOR, Prisma.PlanUncheckedUpdateWithoutComplexesInput> } export type PlanCreateWithoutComplexesInput = { code: string name: string price: runtime.Decimal | runtime.DecimalJsLike | number | string rules: Prisma.JsonNullValueInput | runtime.InputJsonValue lastUpdatedAt?: Date | string } export type PlanUncheckedCreateWithoutComplexesInput = { code: string name: string price: runtime.Decimal | runtime.DecimalJsLike | number | string rules: Prisma.JsonNullValueInput | runtime.InputJsonValue lastUpdatedAt?: Date | string } export type PlanCreateOrConnectWithoutComplexesInput = { where: Prisma.PlanWhereUniqueInput create: Prisma.XOR } export type PlanUpsertWithoutComplexesInput = { update: Prisma.XOR create: Prisma.XOR where?: Prisma.PlanWhereInput } export type PlanUpdateToOneWithWhereWithoutComplexesInput = { where?: Prisma.PlanWhereInput data: Prisma.XOR } export type PlanUpdateWithoutComplexesInput = { code?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string price?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string rules?: Prisma.JsonNullValueInput | runtime.InputJsonValue lastUpdatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type PlanUncheckedUpdateWithoutComplexesInput = { code?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string price?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string rules?: Prisma.JsonNullValueInput | runtime.InputJsonValue lastUpdatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } /** * Count Type PlanCountOutputType */ export type PlanCountOutputType = { complexes: number } export type PlanCountOutputTypeSelect = { complexes?: boolean | PlanCountOutputTypeCountComplexesArgs } /** * PlanCountOutputType without action */ export type PlanCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the PlanCountOutputType */ select?: Prisma.PlanCountOutputTypeSelect | null } /** * PlanCountOutputType without action */ export type PlanCountOutputTypeCountComplexesArgs = { where?: Prisma.ComplexWhereInput } export type PlanSelect = runtime.Types.Extensions.GetSelect<{ code?: boolean name?: boolean price?: boolean rules?: boolean lastUpdatedAt?: boolean complexes?: boolean | Prisma.Plan$complexesArgs _count?: boolean | Prisma.PlanCountOutputTypeDefaultArgs }, ExtArgs["result"]["plan"]> export type PlanSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ code?: boolean name?: boolean price?: boolean rules?: boolean lastUpdatedAt?: boolean }, ExtArgs["result"]["plan"]> export type PlanSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ code?: boolean name?: boolean price?: boolean rules?: boolean lastUpdatedAt?: boolean }, ExtArgs["result"]["plan"]> export type PlanSelectScalar = { code?: boolean name?: boolean price?: boolean rules?: boolean lastUpdatedAt?: boolean } export type PlanOmit = runtime.Types.Extensions.GetOmit<"code" | "name" | "price" | "rules" | "lastUpdatedAt", ExtArgs["result"]["plan"]> export type PlanInclude = { complexes?: boolean | Prisma.Plan$complexesArgs _count?: boolean | Prisma.PlanCountOutputTypeDefaultArgs } export type PlanIncludeCreateManyAndReturn = {} export type PlanIncludeUpdateManyAndReturn = {} export type $PlanPayload = { name: "Plan" objects: { complexes: Prisma.$ComplexPayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ code: string name: string price: runtime.Decimal rules: runtime.JsonValue lastUpdatedAt: Date }, ExtArgs["result"]["plan"]> composites: {} } export type PlanGetPayload = runtime.Types.Result.GetResult export type PlanCountArgs = Omit & { select?: PlanCountAggregateInputType | true } export interface PlanDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['Plan'], meta: { name: 'Plan' } } /** * Find zero or one Plan that matches the filter. * @param {PlanFindUniqueArgs} args - Arguments to find a Plan * @example * // Get one Plan * const plan = await prisma.plan.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__PlanClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one Plan that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {PlanFindUniqueOrThrowArgs} args - Arguments to find a Plan * @example * // Get one Plan * const plan = await prisma.plan.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__PlanClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first Plan 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 {PlanFindFirstArgs} args - Arguments to find a Plan * @example * // Get one Plan * const plan = await prisma.plan.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__PlanClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first Plan 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 {PlanFindFirstOrThrowArgs} args - Arguments to find a Plan * @example * // Get one Plan * const plan = await prisma.plan.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__PlanClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more Plans 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 {PlanFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Plans * const plans = await prisma.plan.findMany() * * // Get first 10 Plans * const plans = await prisma.plan.findMany({ take: 10 }) * * // Only select the `code` * const planWithCodeOnly = await prisma.plan.findMany({ select: { code: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a Plan. * @param {PlanCreateArgs} args - Arguments to create a Plan. * @example * // Create one Plan * const Plan = await prisma.plan.create({ * data: { * // ... data to create a Plan * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__PlanClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many Plans. * @param {PlanCreateManyArgs} args - Arguments to create many Plans. * @example * // Create many Plans * const plan = await prisma.plan.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many Plans and returns the data saved in the database. * @param {PlanCreateManyAndReturnArgs} args - Arguments to create many Plans. * @example * // Create many Plans * const plan = await prisma.plan.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Plans and only return the `code` * const planWithCodeOnly = await prisma.plan.createManyAndReturn({ * select: { code: 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 Plan. * @param {PlanDeleteArgs} args - Arguments to delete one Plan. * @example * // Delete one Plan * const Plan = await prisma.plan.delete({ * where: { * // ... filter to delete one Plan * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__PlanClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one Plan. * @param {PlanUpdateArgs} args - Arguments to update one Plan. * @example * // Update one Plan * const plan = await prisma.plan.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__PlanClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more Plans. * @param {PlanDeleteManyArgs} args - Arguments to filter Plans to delete. * @example * // Delete a few Plans * const { count } = await prisma.plan.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Plans. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PlanUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Plans * const plan = await prisma.plan.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Plans and returns the data updated in the database. * @param {PlanUpdateManyAndReturnArgs} args - Arguments to update many Plans. * @example * // Update many Plans * const plan = await prisma.plan.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more Plans and only return the `code` * const planWithCodeOnly = await prisma.plan.updateManyAndReturn({ * select: { code: 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 Plan. * @param {PlanUpsertArgs} args - Arguments to update or create a Plan. * @example * // Update or create a Plan * const plan = await prisma.plan.upsert({ * create: { * // ... data to create a Plan * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Plan we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__PlanClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of Plans. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PlanCountArgs} args - Arguments to filter Plans to count. * @example * // Count the number of Plans * const count = await prisma.plan.count({ * where: { * // ... the filter for the Plans 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 Plan. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PlanAggregateArgs} 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 Plan. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PlanGroupByArgs} 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 PlanGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: PlanGroupByArgs['orderBy'] } : { orderBy?: PlanGroupByArgs['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 ? GetPlanGroupByPayload : Prisma.PrismaPromise /** * Fields of the Plan model */ readonly fields: PlanFieldRefs; } /** * The delegate class that acts as a "Promise-like" for Plan. * 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__PlanClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" complexes = {}>(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 Plan model */ export interface PlanFieldRefs { readonly code: Prisma.FieldRef<"Plan", 'String'> readonly name: Prisma.FieldRef<"Plan", 'String'> readonly price: Prisma.FieldRef<"Plan", 'Decimal'> readonly rules: Prisma.FieldRef<"Plan", 'Json'> readonly lastUpdatedAt: Prisma.FieldRef<"Plan", 'DateTime'> } // Custom InputTypes /** * Plan findUnique */ export type PlanFindUniqueArgs = { /** * Select specific fields to fetch from the Plan */ select?: Prisma.PlanSelect | null /** * Omit specific fields from the Plan */ omit?: Prisma.PlanOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PlanInclude | null /** * Filter, which Plan to fetch. */ where: Prisma.PlanWhereUniqueInput } /** * Plan findUniqueOrThrow */ export type PlanFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Plan */ select?: Prisma.PlanSelect | null /** * Omit specific fields from the Plan */ omit?: Prisma.PlanOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PlanInclude | null /** * Filter, which Plan to fetch. */ where: Prisma.PlanWhereUniqueInput } /** * Plan findFirst */ export type PlanFindFirstArgs = { /** * Select specific fields to fetch from the Plan */ select?: Prisma.PlanSelect | null /** * Omit specific fields from the Plan */ omit?: Prisma.PlanOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PlanInclude | null /** * Filter, which Plan to fetch. */ where?: Prisma.PlanWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Plans to fetch. */ orderBy?: Prisma.PlanOrderByWithRelationInput | Prisma.PlanOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Plans. */ cursor?: Prisma.PlanWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Plans 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` Plans. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Plans. */ distinct?: Prisma.PlanScalarFieldEnum | Prisma.PlanScalarFieldEnum[] } /** * Plan findFirstOrThrow */ export type PlanFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Plan */ select?: Prisma.PlanSelect | null /** * Omit specific fields from the Plan */ omit?: Prisma.PlanOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PlanInclude | null /** * Filter, which Plan to fetch. */ where?: Prisma.PlanWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Plans to fetch. */ orderBy?: Prisma.PlanOrderByWithRelationInput | Prisma.PlanOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Plans. */ cursor?: Prisma.PlanWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Plans 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` Plans. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Plans. */ distinct?: Prisma.PlanScalarFieldEnum | Prisma.PlanScalarFieldEnum[] } /** * Plan findMany */ export type PlanFindManyArgs = { /** * Select specific fields to fetch from the Plan */ select?: Prisma.PlanSelect | null /** * Omit specific fields from the Plan */ omit?: Prisma.PlanOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PlanInclude | null /** * Filter, which Plans to fetch. */ where?: Prisma.PlanWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Plans to fetch. */ orderBy?: Prisma.PlanOrderByWithRelationInput | Prisma.PlanOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Plans. */ cursor?: Prisma.PlanWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Plans 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` Plans. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Plans. */ distinct?: Prisma.PlanScalarFieldEnum | Prisma.PlanScalarFieldEnum[] } /** * Plan create */ export type PlanCreateArgs = { /** * Select specific fields to fetch from the Plan */ select?: Prisma.PlanSelect | null /** * Omit specific fields from the Plan */ omit?: Prisma.PlanOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PlanInclude | null /** * The data needed to create a Plan. */ data: Prisma.XOR } /** * Plan createMany */ export type PlanCreateManyArgs = { /** * The data used to create many Plans. */ data: Prisma.PlanCreateManyInput | Prisma.PlanCreateManyInput[] skipDuplicates?: boolean } /** * Plan createManyAndReturn */ export type PlanCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the Plan */ select?: Prisma.PlanSelectCreateManyAndReturn | null /** * Omit specific fields from the Plan */ omit?: Prisma.PlanOmit | null /** * The data used to create many Plans. */ data: Prisma.PlanCreateManyInput | Prisma.PlanCreateManyInput[] skipDuplicates?: boolean } /** * Plan update */ export type PlanUpdateArgs = { /** * Select specific fields to fetch from the Plan */ select?: Prisma.PlanSelect | null /** * Omit specific fields from the Plan */ omit?: Prisma.PlanOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PlanInclude | null /** * The data needed to update a Plan. */ data: Prisma.XOR /** * Choose, which Plan to update. */ where: Prisma.PlanWhereUniqueInput } /** * Plan updateMany */ export type PlanUpdateManyArgs = { /** * The data used to update Plans. */ data: Prisma.XOR /** * Filter which Plans to update */ where?: Prisma.PlanWhereInput /** * Limit how many Plans to update. */ limit?: number } /** * Plan updateManyAndReturn */ export type PlanUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the Plan */ select?: Prisma.PlanSelectUpdateManyAndReturn | null /** * Omit specific fields from the Plan */ omit?: Prisma.PlanOmit | null /** * The data used to update Plans. */ data: Prisma.XOR /** * Filter which Plans to update */ where?: Prisma.PlanWhereInput /** * Limit how many Plans to update. */ limit?: number } /** * Plan upsert */ export type PlanUpsertArgs = { /** * Select specific fields to fetch from the Plan */ select?: Prisma.PlanSelect | null /** * Omit specific fields from the Plan */ omit?: Prisma.PlanOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PlanInclude | null /** * The filter to search for the Plan to update in case it exists. */ where: Prisma.PlanWhereUniqueInput /** * In case the Plan found by the `where` argument doesn't exist, create a new Plan with this data. */ create: Prisma.XOR /** * In case the Plan was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * Plan delete */ export type PlanDeleteArgs = { /** * Select specific fields to fetch from the Plan */ select?: Prisma.PlanSelect | null /** * Omit specific fields from the Plan */ omit?: Prisma.PlanOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PlanInclude | null /** * Filter which Plan to delete. */ where: Prisma.PlanWhereUniqueInput } /** * Plan deleteMany */ export type PlanDeleteManyArgs = { /** * Filter which Plans to delete */ where?: Prisma.PlanWhereInput /** * Limit how many Plans to delete. */ limit?: number } /** * Plan.complexes */ export type Plan$complexesArgs = { /** * Select specific fields to fetch from the Complex */ select?: Prisma.ComplexSelect | null /** * Omit specific fields from the Complex */ omit?: Prisma.ComplexOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.ComplexInclude | null where?: Prisma.ComplexWhereInput orderBy?: Prisma.ComplexOrderByWithRelationInput | Prisma.ComplexOrderByWithRelationInput[] cursor?: Prisma.ComplexWhereUniqueInput take?: number skip?: number distinct?: Prisma.ComplexScalarFieldEnum | Prisma.ComplexScalarFieldEnum[] } /** * Plan without action */ export type PlanDefaultArgs = { /** * Select specific fields to fetch from the Plan */ select?: Prisma.PlanSelect | null /** * Omit specific fields from the Plan */ omit?: Prisma.PlanOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PlanInclude | null }