/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `User` 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 User * */ export type UserModel = runtime.Types.Result.DefaultSelection export type AggregateUser = { _count: UserCountAggregateOutputType | null _min: UserMinAggregateOutputType | null _max: UserMaxAggregateOutputType | null } export type UserMinAggregateOutputType = { id: string | null created_at: Date | null updated_at: Date | null mobile_number: string | null national_code: string | null first_name: string | null last_name: string | null } export type UserMaxAggregateOutputType = { id: string | null created_at: Date | null updated_at: Date | null mobile_number: string | null national_code: string | null first_name: string | null last_name: string | null } export type UserCountAggregateOutputType = { id: number created_at: number updated_at: number mobile_number: number national_code: number first_name: number last_name: number _all: number } export type UserMinAggregateInputType = { id?: true created_at?: true updated_at?: true mobile_number?: true national_code?: true first_name?: true last_name?: true } export type UserMaxAggregateInputType = { id?: true created_at?: true updated_at?: true mobile_number?: true national_code?: true first_name?: true last_name?: true } export type UserCountAggregateInputType = { id?: true created_at?: true updated_at?: true mobile_number?: true national_code?: true first_name?: true last_name?: true _all?: true } export type UserAggregateArgs = { /** * Filter which User to aggregate. */ where?: Prisma.UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Users to fetch. */ orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Users 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` Users. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Users **/ _count?: true | UserCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: UserMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: UserMaxAggregateInputType } export type GetUserAggregateType = { [P in keyof T & keyof AggregateUser]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type UserGroupByArgs = { where?: Prisma.UserWhereInput orderBy?: Prisma.UserOrderByWithAggregationInput | Prisma.UserOrderByWithAggregationInput[] by: Prisma.UserScalarFieldEnum[] | Prisma.UserScalarFieldEnum having?: Prisma.UserScalarWhereWithAggregatesInput take?: number skip?: number _count?: UserCountAggregateInputType | true _min?: UserMinAggregateInputType _max?: UserMaxAggregateInputType } export type UserGroupByOutputType = { id: string created_at: Date updated_at: Date mobile_number: string national_code: string | null first_name: string last_name: string _count: UserCountAggregateOutputType | null _min: UserMinAggregateOutputType | null _max: UserMaxAggregateOutputType | null } type GetUserGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type UserWhereInput = { AND?: Prisma.UserWhereInput | Prisma.UserWhereInput[] OR?: Prisma.UserWhereInput[] NOT?: Prisma.UserWhereInput | Prisma.UserWhereInput[] id?: Prisma.StringFilter<"User"> | string created_at?: Prisma.DateTimeFilter<"User"> | Date | string updated_at?: Prisma.DateTimeFilter<"User"> | Date | string mobile_number?: Prisma.StringFilter<"User"> | string national_code?: Prisma.StringNullableFilter<"User"> | string | null first_name?: Prisma.StringFilter<"User"> | string last_name?: Prisma.StringFilter<"User"> | string accounts?: Prisma.AccountListRelationFilter businessActivities?: Prisma.BusinessActivityListRelationFilter } export type UserOrderByWithRelationInput = { id?: Prisma.SortOrder created_at?: Prisma.SortOrder updated_at?: Prisma.SortOrder mobile_number?: Prisma.SortOrder national_code?: Prisma.SortOrderInput | Prisma.SortOrder first_name?: Prisma.SortOrder last_name?: Prisma.SortOrder accounts?: Prisma.AccountOrderByRelationAggregateInput businessActivities?: Prisma.BusinessActivityOrderByRelationAggregateInput _relevance?: Prisma.UserOrderByRelevanceInput } export type UserWhereUniqueInput = Prisma.AtLeast<{ id?: string mobile_number?: string national_code?: string AND?: Prisma.UserWhereInput | Prisma.UserWhereInput[] OR?: Prisma.UserWhereInput[] NOT?: Prisma.UserWhereInput | Prisma.UserWhereInput[] created_at?: Prisma.DateTimeFilter<"User"> | Date | string updated_at?: Prisma.DateTimeFilter<"User"> | Date | string first_name?: Prisma.StringFilter<"User"> | string last_name?: Prisma.StringFilter<"User"> | string accounts?: Prisma.AccountListRelationFilter businessActivities?: Prisma.BusinessActivityListRelationFilter }, "id" | "mobile_number" | "national_code"> export type UserOrderByWithAggregationInput = { id?: Prisma.SortOrder created_at?: Prisma.SortOrder updated_at?: Prisma.SortOrder mobile_number?: Prisma.SortOrder national_code?: Prisma.SortOrderInput | Prisma.SortOrder first_name?: Prisma.SortOrder last_name?: Prisma.SortOrder _count?: Prisma.UserCountOrderByAggregateInput _max?: Prisma.UserMaxOrderByAggregateInput _min?: Prisma.UserMinOrderByAggregateInput } export type UserScalarWhereWithAggregatesInput = { AND?: Prisma.UserScalarWhereWithAggregatesInput | Prisma.UserScalarWhereWithAggregatesInput[] OR?: Prisma.UserScalarWhereWithAggregatesInput[] NOT?: Prisma.UserScalarWhereWithAggregatesInput | Prisma.UserScalarWhereWithAggregatesInput[] id?: Prisma.StringWithAggregatesFilter<"User"> | string created_at?: Prisma.DateTimeWithAggregatesFilter<"User"> | Date | string updated_at?: Prisma.DateTimeWithAggregatesFilter<"User"> | Date | string mobile_number?: Prisma.StringWithAggregatesFilter<"User"> | string national_code?: Prisma.StringNullableWithAggregatesFilter<"User"> | string | null first_name?: Prisma.StringWithAggregatesFilter<"User"> | string last_name?: Prisma.StringWithAggregatesFilter<"User"> | string } export type UserCreateInput = { id?: string created_at?: Date | string updated_at?: Date | string mobile_number: string national_code?: string | null first_name: string last_name: string accounts?: Prisma.AccountCreateNestedManyWithoutUserInput businessActivities?: Prisma.BusinessActivityCreateNestedManyWithoutUserInput } export type UserUncheckedCreateInput = { id?: string created_at?: Date | string updated_at?: Date | string mobile_number: string national_code?: string | null first_name: string last_name: string accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput businessActivities?: Prisma.BusinessActivityUncheckedCreateNestedManyWithoutUserInput } export type UserUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string mobile_number?: Prisma.StringFieldUpdateOperationsInput | string national_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null first_name?: Prisma.StringFieldUpdateOperationsInput | string last_name?: Prisma.StringFieldUpdateOperationsInput | string accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput businessActivities?: Prisma.BusinessActivityUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string mobile_number?: Prisma.StringFieldUpdateOperationsInput | string national_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null first_name?: Prisma.StringFieldUpdateOperationsInput | string last_name?: Prisma.StringFieldUpdateOperationsInput | string accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput businessActivities?: Prisma.BusinessActivityUncheckedUpdateManyWithoutUserNestedInput } export type UserCreateManyInput = { id?: string created_at?: Date | string updated_at?: Date | string mobile_number: string national_code?: string | null first_name: string last_name: string } export type UserUpdateManyMutationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string mobile_number?: Prisma.StringFieldUpdateOperationsInput | string national_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null first_name?: Prisma.StringFieldUpdateOperationsInput | string last_name?: Prisma.StringFieldUpdateOperationsInput | string } export type UserUncheckedUpdateManyInput = { id?: Prisma.StringFieldUpdateOperationsInput | string created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string mobile_number?: Prisma.StringFieldUpdateOperationsInput | string national_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null first_name?: Prisma.StringFieldUpdateOperationsInput | string last_name?: Prisma.StringFieldUpdateOperationsInput | string } export type UserScalarRelationFilter = { is?: Prisma.UserWhereInput isNot?: Prisma.UserWhereInput } export type UserOrderByRelevanceInput = { fields: Prisma.UserOrderByRelevanceFieldEnum | Prisma.UserOrderByRelevanceFieldEnum[] sort: Prisma.SortOrder search: string } export type UserCountOrderByAggregateInput = { id?: Prisma.SortOrder created_at?: Prisma.SortOrder updated_at?: Prisma.SortOrder mobile_number?: Prisma.SortOrder national_code?: Prisma.SortOrder first_name?: Prisma.SortOrder last_name?: Prisma.SortOrder } export type UserMaxOrderByAggregateInput = { id?: Prisma.SortOrder created_at?: Prisma.SortOrder updated_at?: Prisma.SortOrder mobile_number?: Prisma.SortOrder national_code?: Prisma.SortOrder first_name?: Prisma.SortOrder last_name?: Prisma.SortOrder } export type UserMinOrderByAggregateInput = { id?: Prisma.SortOrder created_at?: Prisma.SortOrder updated_at?: Prisma.SortOrder mobile_number?: Prisma.SortOrder national_code?: Prisma.SortOrder first_name?: Prisma.SortOrder last_name?: Prisma.SortOrder } export type UserCreateNestedOneWithoutBusinessActivitiesInput = { create?: Prisma.XOR connectOrCreate?: Prisma.UserCreateOrConnectWithoutBusinessActivitiesInput connect?: Prisma.UserWhereUniqueInput } export type UserUpdateOneRequiredWithoutBusinessActivitiesNestedInput = { create?: Prisma.XOR connectOrCreate?: Prisma.UserCreateOrConnectWithoutBusinessActivitiesInput upsert?: Prisma.UserUpsertWithoutBusinessActivitiesInput connect?: Prisma.UserWhereUniqueInput update?: Prisma.XOR, Prisma.UserUncheckedUpdateWithoutBusinessActivitiesInput> } export type UserCreateNestedOneWithoutAccountsInput = { create?: Prisma.XOR connectOrCreate?: Prisma.UserCreateOrConnectWithoutAccountsInput connect?: Prisma.UserWhereUniqueInput } export type UserUpdateOneRequiredWithoutAccountsNestedInput = { create?: Prisma.XOR connectOrCreate?: Prisma.UserCreateOrConnectWithoutAccountsInput upsert?: Prisma.UserUpsertWithoutAccountsInput connect?: Prisma.UserWhereUniqueInput update?: Prisma.XOR, Prisma.UserUncheckedUpdateWithoutAccountsInput> } export type UserCreateWithoutBusinessActivitiesInput = { id?: string created_at?: Date | string updated_at?: Date | string mobile_number: string national_code?: string | null first_name: string last_name: string accounts?: Prisma.AccountCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutBusinessActivitiesInput = { id?: string created_at?: Date | string updated_at?: Date | string mobile_number: string national_code?: string | null first_name: string last_name: string accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutBusinessActivitiesInput = { where: Prisma.UserWhereUniqueInput create: Prisma.XOR } export type UserUpsertWithoutBusinessActivitiesInput = { update: Prisma.XOR create: Prisma.XOR where?: Prisma.UserWhereInput } export type UserUpdateToOneWithWhereWithoutBusinessActivitiesInput = { where?: Prisma.UserWhereInput data: Prisma.XOR } export type UserUpdateWithoutBusinessActivitiesInput = { id?: Prisma.StringFieldUpdateOperationsInput | string created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string mobile_number?: Prisma.StringFieldUpdateOperationsInput | string national_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null first_name?: Prisma.StringFieldUpdateOperationsInput | string last_name?: Prisma.StringFieldUpdateOperationsInput | string accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutBusinessActivitiesInput = { id?: Prisma.StringFieldUpdateOperationsInput | string created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string mobile_number?: Prisma.StringFieldUpdateOperationsInput | string national_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null first_name?: Prisma.StringFieldUpdateOperationsInput | string last_name?: Prisma.StringFieldUpdateOperationsInput | string accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput } export type UserCreateWithoutAccountsInput = { id?: string created_at?: Date | string updated_at?: Date | string mobile_number: string national_code?: string | null first_name: string last_name: string businessActivities?: Prisma.BusinessActivityCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutAccountsInput = { id?: string created_at?: Date | string updated_at?: Date | string mobile_number: string national_code?: string | null first_name: string last_name: string businessActivities?: Prisma.BusinessActivityUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutAccountsInput = { where: Prisma.UserWhereUniqueInput create: Prisma.XOR } export type UserUpsertWithoutAccountsInput = { update: Prisma.XOR create: Prisma.XOR where?: Prisma.UserWhereInput } export type UserUpdateToOneWithWhereWithoutAccountsInput = { where?: Prisma.UserWhereInput data: Prisma.XOR } export type UserUpdateWithoutAccountsInput = { id?: Prisma.StringFieldUpdateOperationsInput | string created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string mobile_number?: Prisma.StringFieldUpdateOperationsInput | string national_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null first_name?: Prisma.StringFieldUpdateOperationsInput | string last_name?: Prisma.StringFieldUpdateOperationsInput | string businessActivities?: Prisma.BusinessActivityUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutAccountsInput = { id?: Prisma.StringFieldUpdateOperationsInput | string created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string mobile_number?: Prisma.StringFieldUpdateOperationsInput | string national_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null first_name?: Prisma.StringFieldUpdateOperationsInput | string last_name?: Prisma.StringFieldUpdateOperationsInput | string businessActivities?: Prisma.BusinessActivityUncheckedUpdateManyWithoutUserNestedInput } /** * Count Type UserCountOutputType */ export type UserCountOutputType = { accounts: number businessActivities: number } export type UserCountOutputTypeSelect = { accounts?: boolean | UserCountOutputTypeCountAccountsArgs businessActivities?: boolean | UserCountOutputTypeCountBusinessActivitiesArgs } /** * UserCountOutputType without action */ export type UserCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the UserCountOutputType */ select?: Prisma.UserCountOutputTypeSelect | null } /** * UserCountOutputType without action */ export type UserCountOutputTypeCountAccountsArgs = { where?: Prisma.AccountWhereInput } /** * UserCountOutputType without action */ export type UserCountOutputTypeCountBusinessActivitiesArgs = { where?: Prisma.BusinessActivityWhereInput } export type UserSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean created_at?: boolean updated_at?: boolean mobile_number?: boolean national_code?: boolean first_name?: boolean last_name?: boolean accounts?: boolean | Prisma.User$accountsArgs businessActivities?: boolean | Prisma.User$businessActivitiesArgs _count?: boolean | Prisma.UserCountOutputTypeDefaultArgs }, ExtArgs["result"]["user"]> export type UserSelectScalar = { id?: boolean created_at?: boolean updated_at?: boolean mobile_number?: boolean national_code?: boolean first_name?: boolean last_name?: boolean } export type UserOmit = runtime.Types.Extensions.GetOmit<"id" | "created_at" | "updated_at" | "mobile_number" | "national_code" | "first_name" | "last_name", ExtArgs["result"]["user"]> export type UserInclude = { accounts?: boolean | Prisma.User$accountsArgs businessActivities?: boolean | Prisma.User$businessActivitiesArgs _count?: boolean | Prisma.UserCountOutputTypeDefaultArgs } export type $UserPayload = { name: "User" objects: { accounts: Prisma.$AccountPayload[] businessActivities: Prisma.$BusinessActivityPayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string created_at: Date updated_at: Date mobile_number: string national_code: string | null first_name: string last_name: string }, ExtArgs["result"]["user"]> composites: {} } export type UserGetPayload = runtime.Types.Result.GetResult export type UserCountArgs = Omit & { select?: UserCountAggregateInputType | true } export interface UserDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['User'], meta: { name: 'User' } } /** * Find zero or one User that matches the filter. * @param {UserFindUniqueArgs} args - Arguments to find a User * @example * // Get one User * const user = await prisma.user.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one User that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User * @example * // Get one User * const user = await prisma.user.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first User 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 {UserFindFirstArgs} args - Arguments to find a User * @example * // Get one User * const user = await prisma.user.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first User 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 {UserFindFirstOrThrowArgs} args - Arguments to find a User * @example * // Get one User * const user = await prisma.user.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more Users 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 {UserFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Users * const users = await prisma.user.findMany() * * // Get first 10 Users * const users = await prisma.user.findMany({ take: 10 }) * * // Only select the `id` * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a User. * @param {UserCreateArgs} args - Arguments to create a User. * @example * // Create one User * const User = await prisma.user.create({ * data: { * // ... data to create a User * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many Users. * @param {UserCreateManyArgs} args - Arguments to create many Users. * @example * // Create many Users * const user = await prisma.user.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Delete a User. * @param {UserDeleteArgs} args - Arguments to delete one User. * @example * // Delete one User * const User = await prisma.user.delete({ * where: { * // ... filter to delete one User * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one User. * @param {UserUpdateArgs} args - Arguments to update one User. * @example * // Update one User * const user = await prisma.user.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more Users. * @param {UserDeleteManyArgs} args - Arguments to filter Users to delete. * @example * // Delete a few Users * const { count } = await prisma.user.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Users. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Users * const user = await prisma.user.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create or update one User. * @param {UserUpsertArgs} args - Arguments to update or create a User. * @example * // Update or create a User * const user = await prisma.user.upsert({ * create: { * // ... data to create a User * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the User we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of Users. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserCountArgs} args - Arguments to filter Users to count. * @example * // Count the number of Users * const count = await prisma.user.count({ * where: { * // ... the filter for the Users 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 User. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserAggregateArgs} 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 User. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserGroupByArgs} 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 UserGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: UserGroupByArgs['orderBy'] } : { orderBy?: UserGroupByArgs['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 ? GetUserGroupByPayload : Prisma.PrismaPromise /** * Fields of the User model */ readonly fields: UserFieldRefs; } /** * The delegate class that acts as a "Promise-like" for User. * 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__UserClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" accounts = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> businessActivities = {}>(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 User model */ export interface UserFieldRefs { readonly id: Prisma.FieldRef<"User", 'String'> readonly created_at: Prisma.FieldRef<"User", 'DateTime'> readonly updated_at: Prisma.FieldRef<"User", 'DateTime'> readonly mobile_number: Prisma.FieldRef<"User", 'String'> readonly national_code: Prisma.FieldRef<"User", 'String'> readonly first_name: Prisma.FieldRef<"User", 'String'> readonly last_name: Prisma.FieldRef<"User", 'String'> } // Custom InputTypes /** * User findUnique */ export type UserFindUniqueArgs = { /** * 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 /** * Filter, which User to fetch. */ where: Prisma.UserWhereUniqueInput } /** * User findUniqueOrThrow */ export type UserFindUniqueOrThrowArgs = { /** * 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 /** * Filter, which User to fetch. */ where: Prisma.UserWhereUniqueInput } /** * User findFirst */ export type UserFindFirstArgs = { /** * 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 /** * Filter, which User to fetch. */ where?: Prisma.UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Users to fetch. */ orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Users. */ cursor?: Prisma.UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Users 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` Users. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Users. */ distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[] } /** * User findFirstOrThrow */ export type UserFindFirstOrThrowArgs = { /** * 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 /** * Filter, which User to fetch. */ where?: Prisma.UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Users to fetch. */ orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Users. */ cursor?: Prisma.UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Users 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` Users. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Users. */ distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[] } /** * User findMany */ export type UserFindManyArgs = { /** * 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 /** * Filter, which Users to fetch. */ where?: Prisma.UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Users to fetch. */ orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Users. */ cursor?: Prisma.UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Users 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` Users. */ skip?: number distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[] } /** * User create */ export type UserCreateArgs = { /** * 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 /** * The data needed to create a User. */ data: Prisma.XOR } /** * User createMany */ export type UserCreateManyArgs = { /** * The data used to create many Users. */ data: Prisma.UserCreateManyInput | Prisma.UserCreateManyInput[] skipDuplicates?: boolean } /** * User update */ export type UserUpdateArgs = { /** * 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 /** * The data needed to update a User. */ data: Prisma.XOR /** * Choose, which User to update. */ where: Prisma.UserWhereUniqueInput } /** * User updateMany */ export type UserUpdateManyArgs = { /** * The data used to update Users. */ data: Prisma.XOR /** * Filter which Users to update */ where?: Prisma.UserWhereInput /** * Limit how many Users to update. */ limit?: number } /** * User upsert */ export type UserUpsertArgs = { /** * 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 /** * The filter to search for the User to update in case it exists. */ where: Prisma.UserWhereUniqueInput /** * In case the User found by the `where` argument doesn't exist, create a new User with this data. */ create: Prisma.XOR /** * In case the User was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * User delete */ export type UserDeleteArgs = { /** * 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 /** * Filter which User to delete. */ where: Prisma.UserWhereUniqueInput } /** * User deleteMany */ export type UserDeleteManyArgs = { /** * Filter which Users to delete */ where?: Prisma.UserWhereInput /** * Limit how many Users to delete. */ limit?: number } /** * User.accounts */ export type User$accountsArgs = { /** * Select specific fields to fetch from the Account */ select?: Prisma.AccountSelect | null /** * Omit specific fields from the Account */ omit?: Prisma.AccountOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AccountInclude | null where?: Prisma.AccountWhereInput orderBy?: Prisma.AccountOrderByWithRelationInput | Prisma.AccountOrderByWithRelationInput[] cursor?: Prisma.AccountWhereUniqueInput take?: number skip?: number distinct?: Prisma.AccountScalarFieldEnum | Prisma.AccountScalarFieldEnum[] } /** * User.businessActivities */ export type User$businessActivitiesArgs = { /** * Select specific fields to fetch from the BusinessActivity */ select?: Prisma.BusinessActivitySelect | null /** * Omit specific fields from the BusinessActivity */ omit?: Prisma.BusinessActivityOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.BusinessActivityInclude | null where?: Prisma.BusinessActivityWhereInput orderBy?: Prisma.BusinessActivityOrderByWithRelationInput | Prisma.BusinessActivityOrderByWithRelationInput[] cursor?: Prisma.BusinessActivityWhereUniqueInput take?: number skip?: number distinct?: Prisma.BusinessActivityScalarFieldEnum | Prisma.BusinessActivityScalarFieldEnum[] } /** * User without action */ export type UserDefaultArgs = { /** * 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 }