/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `UserRole` model and its related types. * * 🟢 You can import this file directly. */ import type * as runtime from "@prisma/client/runtime/client" import type * as $Enums from "../enums.ts" import type * as Prisma from "../internal/prismaNamespace.ts" /** * Model UserRole * */ export type UserRoleModel = runtime.Types.Result.DefaultSelection export type AggregateUserRole = { _count: UserRoleCountAggregateOutputType | null _min: UserRoleMinAggregateOutputType | null _max: UserRoleMaxAggregateOutputType | null } export type UserRoleMinAggregateOutputType = { userId: string | null roleId: string | null assignedAt: Date | null } export type UserRoleMaxAggregateOutputType = { userId: string | null roleId: string | null assignedAt: Date | null } export type UserRoleCountAggregateOutputType = { userId: number roleId: number assignedAt: number _all: number } export type UserRoleMinAggregateInputType = { userId?: true roleId?: true assignedAt?: true } export type UserRoleMaxAggregateInputType = { userId?: true roleId?: true assignedAt?: true } export type UserRoleCountAggregateInputType = { userId?: true roleId?: true assignedAt?: true _all?: true } export type UserRoleAggregateArgs = { /** * Filter which UserRole to aggregate. */ where?: Prisma.UserRoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of UserRoles to fetch. */ orderBy?: Prisma.UserRoleOrderByWithRelationInput | Prisma.UserRoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.UserRoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` UserRoles 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` UserRoles. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned UserRoles **/ _count?: true | UserRoleCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: UserRoleMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: UserRoleMaxAggregateInputType } export type GetUserRoleAggregateType = { [P in keyof T & keyof AggregateUserRole]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type UserRoleGroupByArgs = { where?: Prisma.UserRoleWhereInput orderBy?: Prisma.UserRoleOrderByWithAggregationInput | Prisma.UserRoleOrderByWithAggregationInput[] by: Prisma.UserRoleScalarFieldEnum[] | Prisma.UserRoleScalarFieldEnum having?: Prisma.UserRoleScalarWhereWithAggregatesInput take?: number skip?: number _count?: UserRoleCountAggregateInputType | true _min?: UserRoleMinAggregateInputType _max?: UserRoleMaxAggregateInputType } export type UserRoleGroupByOutputType = { userId: string roleId: string assignedAt: Date _count: UserRoleCountAggregateOutputType | null _min: UserRoleMinAggregateOutputType | null _max: UserRoleMaxAggregateOutputType | null } type GetUserRoleGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof UserRoleGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type UserRoleWhereInput = { AND?: Prisma.UserRoleWhereInput | Prisma.UserRoleWhereInput[] OR?: Prisma.UserRoleWhereInput[] NOT?: Prisma.UserRoleWhereInput | Prisma.UserRoleWhereInput[] userId?: Prisma.StringFilter<"UserRole"> | string roleId?: Prisma.StringFilter<"UserRole"> | string assignedAt?: Prisma.DateTimeFilter<"UserRole"> | Date | string role?: Prisma.XOR user?: Prisma.XOR } export type UserRoleOrderByWithRelationInput = { userId?: Prisma.SortOrder roleId?: Prisma.SortOrder assignedAt?: Prisma.SortOrder role?: Prisma.RoleOrderByWithRelationInput user?: Prisma.UserOrderByWithRelationInput } export type UserRoleWhereUniqueInput = Prisma.AtLeast<{ userId_roleId?: Prisma.UserRoleUserIdRoleIdCompoundUniqueInput AND?: Prisma.UserRoleWhereInput | Prisma.UserRoleWhereInput[] OR?: Prisma.UserRoleWhereInput[] NOT?: Prisma.UserRoleWhereInput | Prisma.UserRoleWhereInput[] userId?: Prisma.StringFilter<"UserRole"> | string roleId?: Prisma.StringFilter<"UserRole"> | string assignedAt?: Prisma.DateTimeFilter<"UserRole"> | Date | string role?: Prisma.XOR user?: Prisma.XOR }, "userId_roleId"> export type UserRoleOrderByWithAggregationInput = { userId?: Prisma.SortOrder roleId?: Prisma.SortOrder assignedAt?: Prisma.SortOrder _count?: Prisma.UserRoleCountOrderByAggregateInput _max?: Prisma.UserRoleMaxOrderByAggregateInput _min?: Prisma.UserRoleMinOrderByAggregateInput } export type UserRoleScalarWhereWithAggregatesInput = { AND?: Prisma.UserRoleScalarWhereWithAggregatesInput | Prisma.UserRoleScalarWhereWithAggregatesInput[] OR?: Prisma.UserRoleScalarWhereWithAggregatesInput[] NOT?: Prisma.UserRoleScalarWhereWithAggregatesInput | Prisma.UserRoleScalarWhereWithAggregatesInput[] userId?: Prisma.StringWithAggregatesFilter<"UserRole"> | string roleId?: Prisma.StringWithAggregatesFilter<"UserRole"> | string assignedAt?: Prisma.DateTimeWithAggregatesFilter<"UserRole"> | Date | string } export type UserRoleCreateInput = { assignedAt?: Date | string role: Prisma.RoleCreateNestedOneWithoutUsersInput user: Prisma.UserCreateNestedOneWithoutRolesInput } export type UserRoleUncheckedCreateInput = { userId: string roleId: string assignedAt?: Date | string } export type UserRoleUpdateInput = { assignedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string role?: Prisma.RoleUpdateOneRequiredWithoutUsersNestedInput user?: Prisma.UserUpdateOneRequiredWithoutRolesNestedInput } export type UserRoleUncheckedUpdateInput = { userId?: Prisma.StringFieldUpdateOperationsInput | string roleId?: Prisma.StringFieldUpdateOperationsInput | string assignedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type UserRoleCreateManyInput = { userId: string roleId: string assignedAt?: Date | string } export type UserRoleUpdateManyMutationInput = { assignedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type UserRoleUncheckedUpdateManyInput = { userId?: Prisma.StringFieldUpdateOperationsInput | string roleId?: Prisma.StringFieldUpdateOperationsInput | string assignedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type UserRoleListRelationFilter = { every?: Prisma.UserRoleWhereInput some?: Prisma.UserRoleWhereInput none?: Prisma.UserRoleWhereInput } export type UserRoleOrderByRelationAggregateInput = { _count?: Prisma.SortOrder } export type UserRoleUserIdRoleIdCompoundUniqueInput = { userId: string roleId: string } export type UserRoleCountOrderByAggregateInput = { userId?: Prisma.SortOrder roleId?: Prisma.SortOrder assignedAt?: Prisma.SortOrder } export type UserRoleMaxOrderByAggregateInput = { userId?: Prisma.SortOrder roleId?: Prisma.SortOrder assignedAt?: Prisma.SortOrder } export type UserRoleMinOrderByAggregateInput = { userId?: Prisma.SortOrder roleId?: Prisma.SortOrder assignedAt?: Prisma.SortOrder } export type UserRoleCreateNestedManyWithoutUserInput = { create?: Prisma.XOR | Prisma.UserRoleCreateWithoutUserInput[] | Prisma.UserRoleUncheckedCreateWithoutUserInput[] connectOrCreate?: Prisma.UserRoleCreateOrConnectWithoutUserInput | Prisma.UserRoleCreateOrConnectWithoutUserInput[] createMany?: Prisma.UserRoleCreateManyUserInputEnvelope connect?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] } export type UserRoleUncheckedCreateNestedManyWithoutUserInput = { create?: Prisma.XOR | Prisma.UserRoleCreateWithoutUserInput[] | Prisma.UserRoleUncheckedCreateWithoutUserInput[] connectOrCreate?: Prisma.UserRoleCreateOrConnectWithoutUserInput | Prisma.UserRoleCreateOrConnectWithoutUserInput[] createMany?: Prisma.UserRoleCreateManyUserInputEnvelope connect?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] } export type UserRoleUpdateManyWithoutUserNestedInput = { create?: Prisma.XOR | Prisma.UserRoleCreateWithoutUserInput[] | Prisma.UserRoleUncheckedCreateWithoutUserInput[] connectOrCreate?: Prisma.UserRoleCreateOrConnectWithoutUserInput | Prisma.UserRoleCreateOrConnectWithoutUserInput[] upsert?: Prisma.UserRoleUpsertWithWhereUniqueWithoutUserInput | Prisma.UserRoleUpsertWithWhereUniqueWithoutUserInput[] createMany?: Prisma.UserRoleCreateManyUserInputEnvelope set?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] disconnect?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] delete?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] connect?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] update?: Prisma.UserRoleUpdateWithWhereUniqueWithoutUserInput | Prisma.UserRoleUpdateWithWhereUniqueWithoutUserInput[] updateMany?: Prisma.UserRoleUpdateManyWithWhereWithoutUserInput | Prisma.UserRoleUpdateManyWithWhereWithoutUserInput[] deleteMany?: Prisma.UserRoleScalarWhereInput | Prisma.UserRoleScalarWhereInput[] } export type UserRoleUncheckedUpdateManyWithoutUserNestedInput = { create?: Prisma.XOR | Prisma.UserRoleCreateWithoutUserInput[] | Prisma.UserRoleUncheckedCreateWithoutUserInput[] connectOrCreate?: Prisma.UserRoleCreateOrConnectWithoutUserInput | Prisma.UserRoleCreateOrConnectWithoutUserInput[] upsert?: Prisma.UserRoleUpsertWithWhereUniqueWithoutUserInput | Prisma.UserRoleUpsertWithWhereUniqueWithoutUserInput[] createMany?: Prisma.UserRoleCreateManyUserInputEnvelope set?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] disconnect?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] delete?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] connect?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] update?: Prisma.UserRoleUpdateWithWhereUniqueWithoutUserInput | Prisma.UserRoleUpdateWithWhereUniqueWithoutUserInput[] updateMany?: Prisma.UserRoleUpdateManyWithWhereWithoutUserInput | Prisma.UserRoleUpdateManyWithWhereWithoutUserInput[] deleteMany?: Prisma.UserRoleScalarWhereInput | Prisma.UserRoleScalarWhereInput[] } export type UserRoleCreateNestedManyWithoutRoleInput = { create?: Prisma.XOR | Prisma.UserRoleCreateWithoutRoleInput[] | Prisma.UserRoleUncheckedCreateWithoutRoleInput[] connectOrCreate?: Prisma.UserRoleCreateOrConnectWithoutRoleInput | Prisma.UserRoleCreateOrConnectWithoutRoleInput[] createMany?: Prisma.UserRoleCreateManyRoleInputEnvelope connect?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] } export type UserRoleUncheckedCreateNestedManyWithoutRoleInput = { create?: Prisma.XOR | Prisma.UserRoleCreateWithoutRoleInput[] | Prisma.UserRoleUncheckedCreateWithoutRoleInput[] connectOrCreate?: Prisma.UserRoleCreateOrConnectWithoutRoleInput | Prisma.UserRoleCreateOrConnectWithoutRoleInput[] createMany?: Prisma.UserRoleCreateManyRoleInputEnvelope connect?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] } export type UserRoleUpdateManyWithoutRoleNestedInput = { create?: Prisma.XOR | Prisma.UserRoleCreateWithoutRoleInput[] | Prisma.UserRoleUncheckedCreateWithoutRoleInput[] connectOrCreate?: Prisma.UserRoleCreateOrConnectWithoutRoleInput | Prisma.UserRoleCreateOrConnectWithoutRoleInput[] upsert?: Prisma.UserRoleUpsertWithWhereUniqueWithoutRoleInput | Prisma.UserRoleUpsertWithWhereUniqueWithoutRoleInput[] createMany?: Prisma.UserRoleCreateManyRoleInputEnvelope set?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] disconnect?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] delete?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] connect?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] update?: Prisma.UserRoleUpdateWithWhereUniqueWithoutRoleInput | Prisma.UserRoleUpdateWithWhereUniqueWithoutRoleInput[] updateMany?: Prisma.UserRoleUpdateManyWithWhereWithoutRoleInput | Prisma.UserRoleUpdateManyWithWhereWithoutRoleInput[] deleteMany?: Prisma.UserRoleScalarWhereInput | Prisma.UserRoleScalarWhereInput[] } export type UserRoleUncheckedUpdateManyWithoutRoleNestedInput = { create?: Prisma.XOR | Prisma.UserRoleCreateWithoutRoleInput[] | Prisma.UserRoleUncheckedCreateWithoutRoleInput[] connectOrCreate?: Prisma.UserRoleCreateOrConnectWithoutRoleInput | Prisma.UserRoleCreateOrConnectWithoutRoleInput[] upsert?: Prisma.UserRoleUpsertWithWhereUniqueWithoutRoleInput | Prisma.UserRoleUpsertWithWhereUniqueWithoutRoleInput[] createMany?: Prisma.UserRoleCreateManyRoleInputEnvelope set?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] disconnect?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] delete?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] connect?: Prisma.UserRoleWhereUniqueInput | Prisma.UserRoleWhereUniqueInput[] update?: Prisma.UserRoleUpdateWithWhereUniqueWithoutRoleInput | Prisma.UserRoleUpdateWithWhereUniqueWithoutRoleInput[] updateMany?: Prisma.UserRoleUpdateManyWithWhereWithoutRoleInput | Prisma.UserRoleUpdateManyWithWhereWithoutRoleInput[] deleteMany?: Prisma.UserRoleScalarWhereInput | Prisma.UserRoleScalarWhereInput[] } export type UserRoleCreateWithoutUserInput = { assignedAt?: Date | string role: Prisma.RoleCreateNestedOneWithoutUsersInput } export type UserRoleUncheckedCreateWithoutUserInput = { roleId: string assignedAt?: Date | string } export type UserRoleCreateOrConnectWithoutUserInput = { where: Prisma.UserRoleWhereUniqueInput create: Prisma.XOR } export type UserRoleCreateManyUserInputEnvelope = { data: Prisma.UserRoleCreateManyUserInput | Prisma.UserRoleCreateManyUserInput[] skipDuplicates?: boolean } export type UserRoleUpsertWithWhereUniqueWithoutUserInput = { where: Prisma.UserRoleWhereUniqueInput update: Prisma.XOR create: Prisma.XOR } export type UserRoleUpdateWithWhereUniqueWithoutUserInput = { where: Prisma.UserRoleWhereUniqueInput data: Prisma.XOR } export type UserRoleUpdateManyWithWhereWithoutUserInput = { where: Prisma.UserRoleScalarWhereInput data: Prisma.XOR } export type UserRoleScalarWhereInput = { AND?: Prisma.UserRoleScalarWhereInput | Prisma.UserRoleScalarWhereInput[] OR?: Prisma.UserRoleScalarWhereInput[] NOT?: Prisma.UserRoleScalarWhereInput | Prisma.UserRoleScalarWhereInput[] userId?: Prisma.StringFilter<"UserRole"> | string roleId?: Prisma.StringFilter<"UserRole"> | string assignedAt?: Prisma.DateTimeFilter<"UserRole"> | Date | string } export type UserRoleCreateWithoutRoleInput = { assignedAt?: Date | string user: Prisma.UserCreateNestedOneWithoutRolesInput } export type UserRoleUncheckedCreateWithoutRoleInput = { userId: string assignedAt?: Date | string } export type UserRoleCreateOrConnectWithoutRoleInput = { where: Prisma.UserRoleWhereUniqueInput create: Prisma.XOR } export type UserRoleCreateManyRoleInputEnvelope = { data: Prisma.UserRoleCreateManyRoleInput | Prisma.UserRoleCreateManyRoleInput[] skipDuplicates?: boolean } export type UserRoleUpsertWithWhereUniqueWithoutRoleInput = { where: Prisma.UserRoleWhereUniqueInput update: Prisma.XOR create: Prisma.XOR } export type UserRoleUpdateWithWhereUniqueWithoutRoleInput = { where: Prisma.UserRoleWhereUniqueInput data: Prisma.XOR } export type UserRoleUpdateManyWithWhereWithoutRoleInput = { where: Prisma.UserRoleScalarWhereInput data: Prisma.XOR } export type UserRoleCreateManyUserInput = { roleId: string assignedAt?: Date | string } export type UserRoleUpdateWithoutUserInput = { assignedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string role?: Prisma.RoleUpdateOneRequiredWithoutUsersNestedInput } export type UserRoleUncheckedUpdateWithoutUserInput = { roleId?: Prisma.StringFieldUpdateOperationsInput | string assignedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type UserRoleUncheckedUpdateManyWithoutUserInput = { roleId?: Prisma.StringFieldUpdateOperationsInput | string assignedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type UserRoleCreateManyRoleInput = { userId: string assignedAt?: Date | string } export type UserRoleUpdateWithoutRoleInput = { assignedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string user?: Prisma.UserUpdateOneRequiredWithoutRolesNestedInput } export type UserRoleUncheckedUpdateWithoutRoleInput = { userId?: Prisma.StringFieldUpdateOperationsInput | string assignedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type UserRoleUncheckedUpdateManyWithoutRoleInput = { userId?: Prisma.StringFieldUpdateOperationsInput | string assignedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type UserRoleSelect = runtime.Types.Extensions.GetSelect<{ userId?: boolean roleId?: boolean assignedAt?: boolean role?: boolean | Prisma.RoleDefaultArgs user?: boolean | Prisma.UserDefaultArgs }, ExtArgs["result"]["userRole"]> export type UserRoleSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ userId?: boolean roleId?: boolean assignedAt?: boolean role?: boolean | Prisma.RoleDefaultArgs user?: boolean | Prisma.UserDefaultArgs }, ExtArgs["result"]["userRole"]> export type UserRoleSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ userId?: boolean roleId?: boolean assignedAt?: boolean role?: boolean | Prisma.RoleDefaultArgs user?: boolean | Prisma.UserDefaultArgs }, ExtArgs["result"]["userRole"]> export type UserRoleSelectScalar = { userId?: boolean roleId?: boolean assignedAt?: boolean } export type UserRoleOmit = runtime.Types.Extensions.GetOmit<"userId" | "roleId" | "assignedAt", ExtArgs["result"]["userRole"]> export type UserRoleInclude = { role?: boolean | Prisma.RoleDefaultArgs user?: boolean | Prisma.UserDefaultArgs } export type UserRoleIncludeCreateManyAndReturn = { role?: boolean | Prisma.RoleDefaultArgs user?: boolean | Prisma.UserDefaultArgs } export type UserRoleIncludeUpdateManyAndReturn = { role?: boolean | Prisma.RoleDefaultArgs user?: boolean | Prisma.UserDefaultArgs } export type $UserRolePayload = { name: "UserRole" objects: { role: Prisma.$RolePayload user: Prisma.$UserPayload } scalars: runtime.Types.Extensions.GetPayloadResult<{ userId: string roleId: string assignedAt: Date }, ExtArgs["result"]["userRole"]> composites: {} } export type UserRoleGetPayload = runtime.Types.Result.GetResult export type UserRoleCountArgs = Omit & { select?: UserRoleCountAggregateInputType | true } export interface UserRoleDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['UserRole'], meta: { name: 'UserRole' } } /** * Find zero or one UserRole that matches the filter. * @param {UserRoleFindUniqueArgs} args - Arguments to find a UserRole * @example * // Get one UserRole * const userRole = await prisma.userRole.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__UserRoleClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one UserRole that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {UserRoleFindUniqueOrThrowArgs} args - Arguments to find a UserRole * @example * // Get one UserRole * const userRole = await prisma.userRole.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__UserRoleClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first UserRole 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 {UserRoleFindFirstArgs} args - Arguments to find a UserRole * @example * // Get one UserRole * const userRole = await prisma.userRole.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__UserRoleClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first UserRole 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 {UserRoleFindFirstOrThrowArgs} args - Arguments to find a UserRole * @example * // Get one UserRole * const userRole = await prisma.userRole.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__UserRoleClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more UserRoles 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 {UserRoleFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all UserRoles * const userRoles = await prisma.userRole.findMany() * * // Get first 10 UserRoles * const userRoles = await prisma.userRole.findMany({ take: 10 }) * * // Only select the `userId` * const userRoleWithUserIdOnly = await prisma.userRole.findMany({ select: { userId: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a UserRole. * @param {UserRoleCreateArgs} args - Arguments to create a UserRole. * @example * // Create one UserRole * const UserRole = await prisma.userRole.create({ * data: { * // ... data to create a UserRole * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__UserRoleClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many UserRoles. * @param {UserRoleCreateManyArgs} args - Arguments to create many UserRoles. * @example * // Create many UserRoles * const userRole = await prisma.userRole.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many UserRoles and returns the data saved in the database. * @param {UserRoleCreateManyAndReturnArgs} args - Arguments to create many UserRoles. * @example * // Create many UserRoles * const userRole = await prisma.userRole.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many UserRoles and only return the `userId` * const userRoleWithUserIdOnly = await prisma.userRole.createManyAndReturn({ * select: { userId: 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 UserRole. * @param {UserRoleDeleteArgs} args - Arguments to delete one UserRole. * @example * // Delete one UserRole * const UserRole = await prisma.userRole.delete({ * where: { * // ... filter to delete one UserRole * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__UserRoleClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one UserRole. * @param {UserRoleUpdateArgs} args - Arguments to update one UserRole. * @example * // Update one UserRole * const userRole = await prisma.userRole.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__UserRoleClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more UserRoles. * @param {UserRoleDeleteManyArgs} args - Arguments to filter UserRoles to delete. * @example * // Delete a few UserRoles * const { count } = await prisma.userRole.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more UserRoles. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserRoleUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many UserRoles * const userRole = await prisma.userRole.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more UserRoles and returns the data updated in the database. * @param {UserRoleUpdateManyAndReturnArgs} args - Arguments to update many UserRoles. * @example * // Update many UserRoles * const userRole = await prisma.userRole.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more UserRoles and only return the `userId` * const userRoleWithUserIdOnly = await prisma.userRole.updateManyAndReturn({ * select: { userId: 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 UserRole. * @param {UserRoleUpsertArgs} args - Arguments to update or create a UserRole. * @example * // Update or create a UserRole * const userRole = await prisma.userRole.upsert({ * create: { * // ... data to create a UserRole * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the UserRole we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__UserRoleClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of UserRoles. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserRoleCountArgs} args - Arguments to filter UserRoles to count. * @example * // Count the number of UserRoles * const count = await prisma.userRole.count({ * where: { * // ... the filter for the UserRoles 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 UserRole. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserRoleAggregateArgs} 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 UserRole. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserRoleGroupByArgs} 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 UserRoleGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: UserRoleGroupByArgs['orderBy'] } : { orderBy?: UserRoleGroupByArgs['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 ? GetUserRoleGroupByPayload : Prisma.PrismaPromise /** * Fields of the UserRole model */ readonly fields: UserRoleFieldRefs; } /** * The delegate class that acts as a "Promise-like" for UserRole. * 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__UserRoleClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" role = {}>(args?: Prisma.Subset>): Prisma.Prisma__RoleClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> user = {}>(args?: Prisma.Subset>): Prisma.Prisma__UserClient, 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 UserRole model */ export interface UserRoleFieldRefs { readonly userId: Prisma.FieldRef<"UserRole", 'String'> readonly roleId: Prisma.FieldRef<"UserRole", 'String'> readonly assignedAt: Prisma.FieldRef<"UserRole", 'DateTime'> } // Custom InputTypes /** * UserRole findUnique */ export type UserRoleFindUniqueArgs = { /** * Select specific fields to fetch from the UserRole */ select?: Prisma.UserRoleSelect | null /** * Omit specific fields from the UserRole */ omit?: Prisma.UserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserRoleInclude | null /** * Filter, which UserRole to fetch. */ where: Prisma.UserRoleWhereUniqueInput } /** * UserRole findUniqueOrThrow */ export type UserRoleFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the UserRole */ select?: Prisma.UserRoleSelect | null /** * Omit specific fields from the UserRole */ omit?: Prisma.UserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserRoleInclude | null /** * Filter, which UserRole to fetch. */ where: Prisma.UserRoleWhereUniqueInput } /** * UserRole findFirst */ export type UserRoleFindFirstArgs = { /** * Select specific fields to fetch from the UserRole */ select?: Prisma.UserRoleSelect | null /** * Omit specific fields from the UserRole */ omit?: Prisma.UserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserRoleInclude | null /** * Filter, which UserRole to fetch. */ where?: Prisma.UserRoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of UserRoles to fetch. */ orderBy?: Prisma.UserRoleOrderByWithRelationInput | Prisma.UserRoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for UserRoles. */ cursor?: Prisma.UserRoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` UserRoles 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` UserRoles. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of UserRoles. */ distinct?: Prisma.UserRoleScalarFieldEnum | Prisma.UserRoleScalarFieldEnum[] } /** * UserRole findFirstOrThrow */ export type UserRoleFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the UserRole */ select?: Prisma.UserRoleSelect | null /** * Omit specific fields from the UserRole */ omit?: Prisma.UserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserRoleInclude | null /** * Filter, which UserRole to fetch. */ where?: Prisma.UserRoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of UserRoles to fetch. */ orderBy?: Prisma.UserRoleOrderByWithRelationInput | Prisma.UserRoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for UserRoles. */ cursor?: Prisma.UserRoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` UserRoles 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` UserRoles. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of UserRoles. */ distinct?: Prisma.UserRoleScalarFieldEnum | Prisma.UserRoleScalarFieldEnum[] } /** * UserRole findMany */ export type UserRoleFindManyArgs = { /** * Select specific fields to fetch from the UserRole */ select?: Prisma.UserRoleSelect | null /** * Omit specific fields from the UserRole */ omit?: Prisma.UserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserRoleInclude | null /** * Filter, which UserRoles to fetch. */ where?: Prisma.UserRoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of UserRoles to fetch. */ orderBy?: Prisma.UserRoleOrderByWithRelationInput | Prisma.UserRoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing UserRoles. */ cursor?: Prisma.UserRoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` UserRoles 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` UserRoles. */ skip?: number distinct?: Prisma.UserRoleScalarFieldEnum | Prisma.UserRoleScalarFieldEnum[] } /** * UserRole create */ export type UserRoleCreateArgs = { /** * Select specific fields to fetch from the UserRole */ select?: Prisma.UserRoleSelect | null /** * Omit specific fields from the UserRole */ omit?: Prisma.UserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserRoleInclude | null /** * The data needed to create a UserRole. */ data: Prisma.XOR } /** * UserRole createMany */ export type UserRoleCreateManyArgs = { /** * The data used to create many UserRoles. */ data: Prisma.UserRoleCreateManyInput | Prisma.UserRoleCreateManyInput[] skipDuplicates?: boolean } /** * UserRole createManyAndReturn */ export type UserRoleCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the UserRole */ select?: Prisma.UserRoleSelectCreateManyAndReturn | null /** * Omit specific fields from the UserRole */ omit?: Prisma.UserRoleOmit | null /** * The data used to create many UserRoles. */ data: Prisma.UserRoleCreateManyInput | Prisma.UserRoleCreateManyInput[] skipDuplicates?: boolean /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserRoleIncludeCreateManyAndReturn | null } /** * UserRole update */ export type UserRoleUpdateArgs = { /** * Select specific fields to fetch from the UserRole */ select?: Prisma.UserRoleSelect | null /** * Omit specific fields from the UserRole */ omit?: Prisma.UserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserRoleInclude | null /** * The data needed to update a UserRole. */ data: Prisma.XOR /** * Choose, which UserRole to update. */ where: Prisma.UserRoleWhereUniqueInput } /** * UserRole updateMany */ export type UserRoleUpdateManyArgs = { /** * The data used to update UserRoles. */ data: Prisma.XOR /** * Filter which UserRoles to update */ where?: Prisma.UserRoleWhereInput /** * Limit how many UserRoles to update. */ limit?: number } /** * UserRole updateManyAndReturn */ export type UserRoleUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the UserRole */ select?: Prisma.UserRoleSelectUpdateManyAndReturn | null /** * Omit specific fields from the UserRole */ omit?: Prisma.UserRoleOmit | null /** * The data used to update UserRoles. */ data: Prisma.XOR /** * Filter which UserRoles to update */ where?: Prisma.UserRoleWhereInput /** * Limit how many UserRoles to update. */ limit?: number /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserRoleIncludeUpdateManyAndReturn | null } /** * UserRole upsert */ export type UserRoleUpsertArgs = { /** * Select specific fields to fetch from the UserRole */ select?: Prisma.UserRoleSelect | null /** * Omit specific fields from the UserRole */ omit?: Prisma.UserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserRoleInclude | null /** * The filter to search for the UserRole to update in case it exists. */ where: Prisma.UserRoleWhereUniqueInput /** * In case the UserRole found by the `where` argument doesn't exist, create a new UserRole with this data. */ create: Prisma.XOR /** * In case the UserRole was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * UserRole delete */ export type UserRoleDeleteArgs = { /** * Select specific fields to fetch from the UserRole */ select?: Prisma.UserRoleSelect | null /** * Omit specific fields from the UserRole */ omit?: Prisma.UserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserRoleInclude | null /** * Filter which UserRole to delete. */ where: Prisma.UserRoleWhereUniqueInput } /** * UserRole deleteMany */ export type UserRoleDeleteManyArgs = { /** * Filter which UserRoles to delete */ where?: Prisma.UserRoleWhereInput /** * Limit how many UserRoles to delete. */ limit?: number } /** * UserRole without action */ export type UserRoleDefaultArgs = { /** * Select specific fields to fetch from the UserRole */ select?: Prisma.UserRoleSelect | null /** * Omit specific fields from the UserRole */ omit?: Prisma.UserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserRoleInclude | null }