Files
HiveGrid-Wireframes/hivegrid-cloud/packages/db/generated/prisma/client/models/Credit.ts
T

1611 lines
58 KiB
TypeScript

/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
* This file exports the `Credit` 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 Credit
*
*/
export type CreditModel = runtime.Types.Result.DefaultSelection<Prisma.$CreditPayload>
export type AggregateCredit = {
_count: CreditCountAggregateOutputType | null
_avg: CreditAvgAggregateOutputType | null
_sum: CreditSumAggregateOutputType | null
_min: CreditMinAggregateOutputType | null
_max: CreditMaxAggregateOutputType | null
}
export type CreditAvgAggregateOutputType = {
amount: number | null
}
export type CreditSumAggregateOutputType = {
amount: number | null
}
export type CreditMinAggregateOutputType = {
id: string | null
createdAt: Date | null
tenantId: string | null
userId: string | null
amount: number | null
type: string | null
objectId: string | null
}
export type CreditMaxAggregateOutputType = {
id: string | null
createdAt: Date | null
tenantId: string | null
userId: string | null
amount: number | null
type: string | null
objectId: string | null
}
export type CreditCountAggregateOutputType = {
id: number
createdAt: number
tenantId: number
userId: number
amount: number
type: number
objectId: number
_all: number
}
export type CreditAvgAggregateInputType = {
amount?: true
}
export type CreditSumAggregateInputType = {
amount?: true
}
export type CreditMinAggregateInputType = {
id?: true
createdAt?: true
tenantId?: true
userId?: true
amount?: true
type?: true
objectId?: true
}
export type CreditMaxAggregateInputType = {
id?: true
createdAt?: true
tenantId?: true
userId?: true
amount?: true
type?: true
objectId?: true
}
export type CreditCountAggregateInputType = {
id?: true
createdAt?: true
tenantId?: true
userId?: true
amount?: true
type?: true
objectId?: true
_all?: true
}
export type CreditAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which Credit to aggregate.
*/
where?: Prisma.CreditWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Credits to fetch.
*/
orderBy?: Prisma.CreditOrderByWithRelationInput | Prisma.CreditOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: Prisma.CreditWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Credits 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` Credits.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned Credits
**/
_count?: true | CreditCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to average
**/
_avg?: CreditAvgAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to sum
**/
_sum?: CreditSumAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: CreditMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: CreditMaxAggregateInputType
}
export type GetCreditAggregateType<T extends CreditAggregateArgs> = {
[P in keyof T & keyof AggregateCredit]: P extends '_count' | 'count'
? T[P] extends true
? number
: Prisma.GetScalarType<T[P], AggregateCredit[P]>
: Prisma.GetScalarType<T[P], AggregateCredit[P]>
}
export type CreditGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.CreditWhereInput
orderBy?: Prisma.CreditOrderByWithAggregationInput | Prisma.CreditOrderByWithAggregationInput[]
by: Prisma.CreditScalarFieldEnum[] | Prisma.CreditScalarFieldEnum
having?: Prisma.CreditScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: CreditCountAggregateInputType | true
_avg?: CreditAvgAggregateInputType
_sum?: CreditSumAggregateInputType
_min?: CreditMinAggregateInputType
_max?: CreditMaxAggregateInputType
}
export type CreditGroupByOutputType = {
id: string
createdAt: Date
tenantId: string
userId: string | null
amount: number
type: string
objectId: string | null
_count: CreditCountAggregateOutputType | null
_avg: CreditAvgAggregateOutputType | null
_sum: CreditSumAggregateOutputType | null
_min: CreditMinAggregateOutputType | null
_max: CreditMaxAggregateOutputType | null
}
export type GetCreditGroupByPayload<T extends CreditGroupByArgs> = Prisma.PrismaPromise<
Array<
Prisma.PickEnumerable<CreditGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof CreditGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: Prisma.GetScalarType<T[P], CreditGroupByOutputType[P]>
: Prisma.GetScalarType<T[P], CreditGroupByOutputType[P]>
}
>
>
export type CreditWhereInput = {
AND?: Prisma.CreditWhereInput | Prisma.CreditWhereInput[]
OR?: Prisma.CreditWhereInput[]
NOT?: Prisma.CreditWhereInput | Prisma.CreditWhereInput[]
id?: Prisma.StringFilter<"Credit"> | string
createdAt?: Prisma.DateTimeFilter<"Credit"> | Date | string
tenantId?: Prisma.StringFilter<"Credit"> | string
userId?: Prisma.StringNullableFilter<"Credit"> | string | null
amount?: Prisma.IntFilter<"Credit"> | number
type?: Prisma.StringFilter<"Credit"> | string
objectId?: Prisma.StringNullableFilter<"Credit"> | string | null
tenant?: Prisma.XOR<Prisma.TenantScalarRelationFilter, Prisma.TenantWhereInput>
user?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
}
export type CreditOrderByWithRelationInput = {
id?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
tenantId?: Prisma.SortOrder
userId?: Prisma.SortOrderInput | Prisma.SortOrder
amount?: Prisma.SortOrder
type?: Prisma.SortOrder
objectId?: Prisma.SortOrderInput | Prisma.SortOrder
tenant?: Prisma.TenantOrderByWithRelationInput
user?: Prisma.UserOrderByWithRelationInput
}
export type CreditWhereUniqueInput = Prisma.AtLeast<{
id?: string
AND?: Prisma.CreditWhereInput | Prisma.CreditWhereInput[]
OR?: Prisma.CreditWhereInput[]
NOT?: Prisma.CreditWhereInput | Prisma.CreditWhereInput[]
createdAt?: Prisma.DateTimeFilter<"Credit"> | Date | string
tenantId?: Prisma.StringFilter<"Credit"> | string
userId?: Prisma.StringNullableFilter<"Credit"> | string | null
amount?: Prisma.IntFilter<"Credit"> | number
type?: Prisma.StringFilter<"Credit"> | string
objectId?: Prisma.StringNullableFilter<"Credit"> | string | null
tenant?: Prisma.XOR<Prisma.TenantScalarRelationFilter, Prisma.TenantWhereInput>
user?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
}, "id">
export type CreditOrderByWithAggregationInput = {
id?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
tenantId?: Prisma.SortOrder
userId?: Prisma.SortOrderInput | Prisma.SortOrder
amount?: Prisma.SortOrder
type?: Prisma.SortOrder
objectId?: Prisma.SortOrderInput | Prisma.SortOrder
_count?: Prisma.CreditCountOrderByAggregateInput
_avg?: Prisma.CreditAvgOrderByAggregateInput
_max?: Prisma.CreditMaxOrderByAggregateInput
_min?: Prisma.CreditMinOrderByAggregateInput
_sum?: Prisma.CreditSumOrderByAggregateInput
}
export type CreditScalarWhereWithAggregatesInput = {
AND?: Prisma.CreditScalarWhereWithAggregatesInput | Prisma.CreditScalarWhereWithAggregatesInput[]
OR?: Prisma.CreditScalarWhereWithAggregatesInput[]
NOT?: Prisma.CreditScalarWhereWithAggregatesInput | Prisma.CreditScalarWhereWithAggregatesInput[]
id?: Prisma.StringWithAggregatesFilter<"Credit"> | string
createdAt?: Prisma.DateTimeWithAggregatesFilter<"Credit"> | Date | string
tenantId?: Prisma.StringWithAggregatesFilter<"Credit"> | string
userId?: Prisma.StringNullableWithAggregatesFilter<"Credit"> | string | null
amount?: Prisma.IntWithAggregatesFilter<"Credit"> | number
type?: Prisma.StringWithAggregatesFilter<"Credit"> | string
objectId?: Prisma.StringNullableWithAggregatesFilter<"Credit"> | string | null
}
export type CreditCreateInput = {
id?: string
createdAt?: Date | string
amount: number
type: string
objectId?: string | null
tenant: Prisma.TenantCreateNestedOneWithoutCreditsInput
user?: Prisma.UserCreateNestedOneWithoutCreditsInput
}
export type CreditUncheckedCreateInput = {
id?: string
createdAt?: Date | string
tenantId: string
userId?: string | null
amount: number
type: string
objectId?: string | null
}
export type CreditUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
amount?: Prisma.IntFieldUpdateOperationsInput | number
type?: Prisma.StringFieldUpdateOperationsInput | string
objectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
tenant?: Prisma.TenantUpdateOneRequiredWithoutCreditsNestedInput
user?: Prisma.UserUpdateOneWithoutCreditsNestedInput
}
export type CreditUncheckedUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
tenantId?: Prisma.StringFieldUpdateOperationsInput | string
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
amount?: Prisma.IntFieldUpdateOperationsInput | number
type?: Prisma.StringFieldUpdateOperationsInput | string
objectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type CreditCreateManyInput = {
id?: string
createdAt?: Date | string
tenantId: string
userId?: string | null
amount: number
type: string
objectId?: string | null
}
export type CreditUpdateManyMutationInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
amount?: Prisma.IntFieldUpdateOperationsInput | number
type?: Prisma.StringFieldUpdateOperationsInput | string
objectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type CreditUncheckedUpdateManyInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
tenantId?: Prisma.StringFieldUpdateOperationsInput | string
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
amount?: Prisma.IntFieldUpdateOperationsInput | number
type?: Prisma.StringFieldUpdateOperationsInput | string
objectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type CreditListRelationFilter = {
every?: Prisma.CreditWhereInput
some?: Prisma.CreditWhereInput
none?: Prisma.CreditWhereInput
}
export type CreditOrderByRelationAggregateInput = {
_count?: Prisma.SortOrder
}
export type CreditCountOrderByAggregateInput = {
id?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
tenantId?: Prisma.SortOrder
userId?: Prisma.SortOrder
amount?: Prisma.SortOrder
type?: Prisma.SortOrder
objectId?: Prisma.SortOrder
}
export type CreditAvgOrderByAggregateInput = {
amount?: Prisma.SortOrder
}
export type CreditMaxOrderByAggregateInput = {
id?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
tenantId?: Prisma.SortOrder
userId?: Prisma.SortOrder
amount?: Prisma.SortOrder
type?: Prisma.SortOrder
objectId?: Prisma.SortOrder
}
export type CreditMinOrderByAggregateInput = {
id?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
tenantId?: Prisma.SortOrder
userId?: Prisma.SortOrder
amount?: Prisma.SortOrder
type?: Prisma.SortOrder
objectId?: Prisma.SortOrder
}
export type CreditSumOrderByAggregateInput = {
amount?: Prisma.SortOrder
}
export type CreditCreateNestedManyWithoutUserInput = {
create?: Prisma.XOR<Prisma.CreditCreateWithoutUserInput, Prisma.CreditUncheckedCreateWithoutUserInput> | Prisma.CreditCreateWithoutUserInput[] | Prisma.CreditUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.CreditCreateOrConnectWithoutUserInput | Prisma.CreditCreateOrConnectWithoutUserInput[]
createMany?: Prisma.CreditCreateManyUserInputEnvelope
connect?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
}
export type CreditUncheckedCreateNestedManyWithoutUserInput = {
create?: Prisma.XOR<Prisma.CreditCreateWithoutUserInput, Prisma.CreditUncheckedCreateWithoutUserInput> | Prisma.CreditCreateWithoutUserInput[] | Prisma.CreditUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.CreditCreateOrConnectWithoutUserInput | Prisma.CreditCreateOrConnectWithoutUserInput[]
createMany?: Prisma.CreditCreateManyUserInputEnvelope
connect?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
}
export type CreditUpdateManyWithoutUserNestedInput = {
create?: Prisma.XOR<Prisma.CreditCreateWithoutUserInput, Prisma.CreditUncheckedCreateWithoutUserInput> | Prisma.CreditCreateWithoutUserInput[] | Prisma.CreditUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.CreditCreateOrConnectWithoutUserInput | Prisma.CreditCreateOrConnectWithoutUserInput[]
upsert?: Prisma.CreditUpsertWithWhereUniqueWithoutUserInput | Prisma.CreditUpsertWithWhereUniqueWithoutUserInput[]
createMany?: Prisma.CreditCreateManyUserInputEnvelope
set?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
disconnect?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
delete?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
connect?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
update?: Prisma.CreditUpdateWithWhereUniqueWithoutUserInput | Prisma.CreditUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: Prisma.CreditUpdateManyWithWhereWithoutUserInput | Prisma.CreditUpdateManyWithWhereWithoutUserInput[]
deleteMany?: Prisma.CreditScalarWhereInput | Prisma.CreditScalarWhereInput[]
}
export type CreditUncheckedUpdateManyWithoutUserNestedInput = {
create?: Prisma.XOR<Prisma.CreditCreateWithoutUserInput, Prisma.CreditUncheckedCreateWithoutUserInput> | Prisma.CreditCreateWithoutUserInput[] | Prisma.CreditUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.CreditCreateOrConnectWithoutUserInput | Prisma.CreditCreateOrConnectWithoutUserInput[]
upsert?: Prisma.CreditUpsertWithWhereUniqueWithoutUserInput | Prisma.CreditUpsertWithWhereUniqueWithoutUserInput[]
createMany?: Prisma.CreditCreateManyUserInputEnvelope
set?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
disconnect?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
delete?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
connect?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
update?: Prisma.CreditUpdateWithWhereUniqueWithoutUserInput | Prisma.CreditUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: Prisma.CreditUpdateManyWithWhereWithoutUserInput | Prisma.CreditUpdateManyWithWhereWithoutUserInput[]
deleteMany?: Prisma.CreditScalarWhereInput | Prisma.CreditScalarWhereInput[]
}
export type CreditCreateNestedManyWithoutTenantInput = {
create?: Prisma.XOR<Prisma.CreditCreateWithoutTenantInput, Prisma.CreditUncheckedCreateWithoutTenantInput> | Prisma.CreditCreateWithoutTenantInput[] | Prisma.CreditUncheckedCreateWithoutTenantInput[]
connectOrCreate?: Prisma.CreditCreateOrConnectWithoutTenantInput | Prisma.CreditCreateOrConnectWithoutTenantInput[]
createMany?: Prisma.CreditCreateManyTenantInputEnvelope
connect?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
}
export type CreditUncheckedCreateNestedManyWithoutTenantInput = {
create?: Prisma.XOR<Prisma.CreditCreateWithoutTenantInput, Prisma.CreditUncheckedCreateWithoutTenantInput> | Prisma.CreditCreateWithoutTenantInput[] | Prisma.CreditUncheckedCreateWithoutTenantInput[]
connectOrCreate?: Prisma.CreditCreateOrConnectWithoutTenantInput | Prisma.CreditCreateOrConnectWithoutTenantInput[]
createMany?: Prisma.CreditCreateManyTenantInputEnvelope
connect?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
}
export type CreditUpdateManyWithoutTenantNestedInput = {
create?: Prisma.XOR<Prisma.CreditCreateWithoutTenantInput, Prisma.CreditUncheckedCreateWithoutTenantInput> | Prisma.CreditCreateWithoutTenantInput[] | Prisma.CreditUncheckedCreateWithoutTenantInput[]
connectOrCreate?: Prisma.CreditCreateOrConnectWithoutTenantInput | Prisma.CreditCreateOrConnectWithoutTenantInput[]
upsert?: Prisma.CreditUpsertWithWhereUniqueWithoutTenantInput | Prisma.CreditUpsertWithWhereUniqueWithoutTenantInput[]
createMany?: Prisma.CreditCreateManyTenantInputEnvelope
set?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
disconnect?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
delete?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
connect?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
update?: Prisma.CreditUpdateWithWhereUniqueWithoutTenantInput | Prisma.CreditUpdateWithWhereUniqueWithoutTenantInput[]
updateMany?: Prisma.CreditUpdateManyWithWhereWithoutTenantInput | Prisma.CreditUpdateManyWithWhereWithoutTenantInput[]
deleteMany?: Prisma.CreditScalarWhereInput | Prisma.CreditScalarWhereInput[]
}
export type CreditUncheckedUpdateManyWithoutTenantNestedInput = {
create?: Prisma.XOR<Prisma.CreditCreateWithoutTenantInput, Prisma.CreditUncheckedCreateWithoutTenantInput> | Prisma.CreditCreateWithoutTenantInput[] | Prisma.CreditUncheckedCreateWithoutTenantInput[]
connectOrCreate?: Prisma.CreditCreateOrConnectWithoutTenantInput | Prisma.CreditCreateOrConnectWithoutTenantInput[]
upsert?: Prisma.CreditUpsertWithWhereUniqueWithoutTenantInput | Prisma.CreditUpsertWithWhereUniqueWithoutTenantInput[]
createMany?: Prisma.CreditCreateManyTenantInputEnvelope
set?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
disconnect?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
delete?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
connect?: Prisma.CreditWhereUniqueInput | Prisma.CreditWhereUniqueInput[]
update?: Prisma.CreditUpdateWithWhereUniqueWithoutTenantInput | Prisma.CreditUpdateWithWhereUniqueWithoutTenantInput[]
updateMany?: Prisma.CreditUpdateManyWithWhereWithoutTenantInput | Prisma.CreditUpdateManyWithWhereWithoutTenantInput[]
deleteMany?: Prisma.CreditScalarWhereInput | Prisma.CreditScalarWhereInput[]
}
export type CreditCreateWithoutUserInput = {
id?: string
createdAt?: Date | string
amount: number
type: string
objectId?: string | null
tenant: Prisma.TenantCreateNestedOneWithoutCreditsInput
}
export type CreditUncheckedCreateWithoutUserInput = {
id?: string
createdAt?: Date | string
tenantId: string
amount: number
type: string
objectId?: string | null
}
export type CreditCreateOrConnectWithoutUserInput = {
where: Prisma.CreditWhereUniqueInput
create: Prisma.XOR<Prisma.CreditCreateWithoutUserInput, Prisma.CreditUncheckedCreateWithoutUserInput>
}
export type CreditCreateManyUserInputEnvelope = {
data: Prisma.CreditCreateManyUserInput | Prisma.CreditCreateManyUserInput[]
skipDuplicates?: boolean
}
export type CreditUpsertWithWhereUniqueWithoutUserInput = {
where: Prisma.CreditWhereUniqueInput
update: Prisma.XOR<Prisma.CreditUpdateWithoutUserInput, Prisma.CreditUncheckedUpdateWithoutUserInput>
create: Prisma.XOR<Prisma.CreditCreateWithoutUserInput, Prisma.CreditUncheckedCreateWithoutUserInput>
}
export type CreditUpdateWithWhereUniqueWithoutUserInput = {
where: Prisma.CreditWhereUniqueInput
data: Prisma.XOR<Prisma.CreditUpdateWithoutUserInput, Prisma.CreditUncheckedUpdateWithoutUserInput>
}
export type CreditUpdateManyWithWhereWithoutUserInput = {
where: Prisma.CreditScalarWhereInput
data: Prisma.XOR<Prisma.CreditUpdateManyMutationInput, Prisma.CreditUncheckedUpdateManyWithoutUserInput>
}
export type CreditScalarWhereInput = {
AND?: Prisma.CreditScalarWhereInput | Prisma.CreditScalarWhereInput[]
OR?: Prisma.CreditScalarWhereInput[]
NOT?: Prisma.CreditScalarWhereInput | Prisma.CreditScalarWhereInput[]
id?: Prisma.StringFilter<"Credit"> | string
createdAt?: Prisma.DateTimeFilter<"Credit"> | Date | string
tenantId?: Prisma.StringFilter<"Credit"> | string
userId?: Prisma.StringNullableFilter<"Credit"> | string | null
amount?: Prisma.IntFilter<"Credit"> | number
type?: Prisma.StringFilter<"Credit"> | string
objectId?: Prisma.StringNullableFilter<"Credit"> | string | null
}
export type CreditCreateWithoutTenantInput = {
id?: string
createdAt?: Date | string
amount: number
type: string
objectId?: string | null
user?: Prisma.UserCreateNestedOneWithoutCreditsInput
}
export type CreditUncheckedCreateWithoutTenantInput = {
id?: string
createdAt?: Date | string
userId?: string | null
amount: number
type: string
objectId?: string | null
}
export type CreditCreateOrConnectWithoutTenantInput = {
where: Prisma.CreditWhereUniqueInput
create: Prisma.XOR<Prisma.CreditCreateWithoutTenantInput, Prisma.CreditUncheckedCreateWithoutTenantInput>
}
export type CreditCreateManyTenantInputEnvelope = {
data: Prisma.CreditCreateManyTenantInput | Prisma.CreditCreateManyTenantInput[]
skipDuplicates?: boolean
}
export type CreditUpsertWithWhereUniqueWithoutTenantInput = {
where: Prisma.CreditWhereUniqueInput
update: Prisma.XOR<Prisma.CreditUpdateWithoutTenantInput, Prisma.CreditUncheckedUpdateWithoutTenantInput>
create: Prisma.XOR<Prisma.CreditCreateWithoutTenantInput, Prisma.CreditUncheckedCreateWithoutTenantInput>
}
export type CreditUpdateWithWhereUniqueWithoutTenantInput = {
where: Prisma.CreditWhereUniqueInput
data: Prisma.XOR<Prisma.CreditUpdateWithoutTenantInput, Prisma.CreditUncheckedUpdateWithoutTenantInput>
}
export type CreditUpdateManyWithWhereWithoutTenantInput = {
where: Prisma.CreditScalarWhereInput
data: Prisma.XOR<Prisma.CreditUpdateManyMutationInput, Prisma.CreditUncheckedUpdateManyWithoutTenantInput>
}
export type CreditCreateManyUserInput = {
id?: string
createdAt?: Date | string
tenantId: string
amount: number
type: string
objectId?: string | null
}
export type CreditUpdateWithoutUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
amount?: Prisma.IntFieldUpdateOperationsInput | number
type?: Prisma.StringFieldUpdateOperationsInput | string
objectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
tenant?: Prisma.TenantUpdateOneRequiredWithoutCreditsNestedInput
}
export type CreditUncheckedUpdateWithoutUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
tenantId?: Prisma.StringFieldUpdateOperationsInput | string
amount?: Prisma.IntFieldUpdateOperationsInput | number
type?: Prisma.StringFieldUpdateOperationsInput | string
objectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type CreditUncheckedUpdateManyWithoutUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
tenantId?: Prisma.StringFieldUpdateOperationsInput | string
amount?: Prisma.IntFieldUpdateOperationsInput | number
type?: Prisma.StringFieldUpdateOperationsInput | string
objectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type CreditCreateManyTenantInput = {
id?: string
createdAt?: Date | string
userId?: string | null
amount: number
type: string
objectId?: string | null
}
export type CreditUpdateWithoutTenantInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
amount?: Prisma.IntFieldUpdateOperationsInput | number
type?: Prisma.StringFieldUpdateOperationsInput | string
objectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
user?: Prisma.UserUpdateOneWithoutCreditsNestedInput
}
export type CreditUncheckedUpdateWithoutTenantInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
amount?: Prisma.IntFieldUpdateOperationsInput | number
type?: Prisma.StringFieldUpdateOperationsInput | string
objectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type CreditUncheckedUpdateManyWithoutTenantInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
amount?: Prisma.IntFieldUpdateOperationsInput | number
type?: Prisma.StringFieldUpdateOperationsInput | string
objectId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type CreditSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
createdAt?: boolean
tenantId?: boolean
userId?: boolean
amount?: boolean
type?: boolean
objectId?: boolean
tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>
user?: boolean | Prisma.Credit$userArgs<ExtArgs>
}, ExtArgs["result"]["credit"]>
export type CreditSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
createdAt?: boolean
tenantId?: boolean
userId?: boolean
amount?: boolean
type?: boolean
objectId?: boolean
tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>
user?: boolean | Prisma.Credit$userArgs<ExtArgs>
}, ExtArgs["result"]["credit"]>
export type CreditSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
createdAt?: boolean
tenantId?: boolean
userId?: boolean
amount?: boolean
type?: boolean
objectId?: boolean
tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>
user?: boolean | Prisma.Credit$userArgs<ExtArgs>
}, ExtArgs["result"]["credit"]>
export type CreditSelectScalar = {
id?: boolean
createdAt?: boolean
tenantId?: boolean
userId?: boolean
amount?: boolean
type?: boolean
objectId?: boolean
}
export type CreditOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "createdAt" | "tenantId" | "userId" | "amount" | "type" | "objectId", ExtArgs["result"]["credit"]>
export type CreditInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>
user?: boolean | Prisma.Credit$userArgs<ExtArgs>
}
export type CreditIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>
user?: boolean | Prisma.Credit$userArgs<ExtArgs>
}
export type CreditIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>
user?: boolean | Prisma.Credit$userArgs<ExtArgs>
}
export type $CreditPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "Credit"
objects: {
tenant: Prisma.$TenantPayload<ExtArgs>
user: Prisma.$UserPayload<ExtArgs> | null
}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: string
createdAt: Date
tenantId: string
userId: string | null
amount: number
type: string
objectId: string | null
}, ExtArgs["result"]["credit"]>
composites: {}
}
export type CreditGetPayload<S extends boolean | null | undefined | CreditDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$CreditPayload, S>
export type CreditCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
Omit<CreditFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
select?: CreditCountAggregateInputType | true
}
export interface CreditDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Credit'], meta: { name: 'Credit' } }
/**
* Find zero or one Credit that matches the filter.
* @param {CreditFindUniqueArgs} args - Arguments to find a Credit
* @example
* // Get one Credit
* const credit = await prisma.credit.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends CreditFindUniqueArgs>(args: Prisma.SelectSubset<T, CreditFindUniqueArgs<ExtArgs>>): Prisma.Prisma__CreditClient<runtime.Types.Result.GetResult<Prisma.$CreditPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find one Credit that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {CreditFindUniqueOrThrowArgs} args - Arguments to find a Credit
* @example
* // Get one Credit
* const credit = await prisma.credit.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends CreditFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, CreditFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__CreditClient<runtime.Types.Result.GetResult<Prisma.$CreditPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find the first Credit 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 {CreditFindFirstArgs} args - Arguments to find a Credit
* @example
* // Get one Credit
* const credit = await prisma.credit.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends CreditFindFirstArgs>(args?: Prisma.SelectSubset<T, CreditFindFirstArgs<ExtArgs>>): Prisma.Prisma__CreditClient<runtime.Types.Result.GetResult<Prisma.$CreditPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find the first Credit 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 {CreditFindFirstOrThrowArgs} args - Arguments to find a Credit
* @example
* // Get one Credit
* const credit = await prisma.credit.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends CreditFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, CreditFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__CreditClient<runtime.Types.Result.GetResult<Prisma.$CreditPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find zero or more Credits 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 {CreditFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all Credits
* const credits = await prisma.credit.findMany()
*
* // Get first 10 Credits
* const credits = await prisma.credit.findMany({ take: 10 })
*
* // Only select the `id`
* const creditWithIdOnly = await prisma.credit.findMany({ select: { id: true } })
*
*/
findMany<T extends CreditFindManyArgs>(args?: Prisma.SelectSubset<T, CreditFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CreditPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
/**
* Create a Credit.
* @param {CreditCreateArgs} args - Arguments to create a Credit.
* @example
* // Create one Credit
* const Credit = await prisma.credit.create({
* data: {
* // ... data to create a Credit
* }
* })
*
*/
create<T extends CreditCreateArgs>(args: Prisma.SelectSubset<T, CreditCreateArgs<ExtArgs>>): Prisma.Prisma__CreditClient<runtime.Types.Result.GetResult<Prisma.$CreditPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Create many Credits.
* @param {CreditCreateManyArgs} args - Arguments to create many Credits.
* @example
* // Create many Credits
* const credit = await prisma.credit.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends CreditCreateManyArgs>(args?: Prisma.SelectSubset<T, CreditCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create many Credits and returns the data saved in the database.
* @param {CreditCreateManyAndReturnArgs} args - Arguments to create many Credits.
* @example
* // Create many Credits
* const credit = await prisma.credit.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many Credits and only return the `id`
* const creditWithIdOnly = await prisma.credit.createManyAndReturn({
* select: { id: true },
* data: [
* // ... provide data here
* ]
* })
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
*
*/
createManyAndReturn<T extends CreditCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, CreditCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CreditPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
/**
* Delete a Credit.
* @param {CreditDeleteArgs} args - Arguments to delete one Credit.
* @example
* // Delete one Credit
* const Credit = await prisma.credit.delete({
* where: {
* // ... filter to delete one Credit
* }
* })
*
*/
delete<T extends CreditDeleteArgs>(args: Prisma.SelectSubset<T, CreditDeleteArgs<ExtArgs>>): Prisma.Prisma__CreditClient<runtime.Types.Result.GetResult<Prisma.$CreditPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Update one Credit.
* @param {CreditUpdateArgs} args - Arguments to update one Credit.
* @example
* // Update one Credit
* const credit = await prisma.credit.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends CreditUpdateArgs>(args: Prisma.SelectSubset<T, CreditUpdateArgs<ExtArgs>>): Prisma.Prisma__CreditClient<runtime.Types.Result.GetResult<Prisma.$CreditPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Delete zero or more Credits.
* @param {CreditDeleteManyArgs} args - Arguments to filter Credits to delete.
* @example
* // Delete a few Credits
* const { count } = await prisma.credit.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends CreditDeleteManyArgs>(args?: Prisma.SelectSubset<T, CreditDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more Credits.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {CreditUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many Credits
* const credit = await prisma.credit.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends CreditUpdateManyArgs>(args: Prisma.SelectSubset<T, CreditUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more Credits and returns the data updated in the database.
* @param {CreditUpdateManyAndReturnArgs} args - Arguments to update many Credits.
* @example
* // Update many Credits
* const credit = await prisma.credit.updateManyAndReturn({
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
*
* // Update zero or more Credits and only return the `id`
* const creditWithIdOnly = await prisma.credit.updateManyAndReturn({
* select: { id: true },
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
*
*/
updateManyAndReturn<T extends CreditUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, CreditUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CreditPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
/**
* Create or update one Credit.
* @param {CreditUpsertArgs} args - Arguments to update or create a Credit.
* @example
* // Update or create a Credit
* const credit = await prisma.credit.upsert({
* create: {
* // ... data to create a Credit
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the Credit we want to update
* }
* })
*/
upsert<T extends CreditUpsertArgs>(args: Prisma.SelectSubset<T, CreditUpsertArgs<ExtArgs>>): Prisma.Prisma__CreditClient<runtime.Types.Result.GetResult<Prisma.$CreditPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Count the number of Credits.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {CreditCountArgs} args - Arguments to filter Credits to count.
* @example
* // Count the number of Credits
* const count = await prisma.credit.count({
* where: {
* // ... the filter for the Credits we want to count
* }
* })
**/
count<T extends CreditCountArgs>(
args?: Prisma.Subset<T, CreditCountArgs>,
): Prisma.PrismaPromise<
T extends runtime.Types.Utils.Record<'select', any>
? T['select'] extends true
? number
: Prisma.GetScalarType<T['select'], CreditCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a Credit.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {CreditAggregateArgs} 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<T extends CreditAggregateArgs>(args: Prisma.Subset<T, CreditAggregateArgs>): Prisma.PrismaPromise<GetCreditAggregateType<T>>
/**
* Group by Credit.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {CreditGroupByArgs} 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 CreditGroupByArgs,
HasSelectOrTake extends Prisma.Or<
Prisma.Extends<'skip', Prisma.Keys<T>>,
Prisma.Extends<'take', Prisma.Keys<T>>
>,
OrderByArg extends Prisma.True extends HasSelectOrTake
? { orderBy: CreditGroupByArgs['orderBy'] }
: { orderBy?: CreditGroupByArgs['orderBy'] },
OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
ByValid extends Prisma.Has<ByFields, OrderFields>,
HavingFields extends Prisma.GetHavingFields<T['having']>,
HavingValid extends Prisma.Has<ByFields, HavingFields>,
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<T>
? 'orderBy' extends Prisma.Keys<T>
? 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<T>
? 'orderBy' extends Prisma.Keys<T>
? 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<T, CreditGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetCreditGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the Credit model
*/
readonly fields: CreditFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for Credit.
* 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__CreditClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
tenant<T extends Prisma.TenantDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.TenantDefaultArgs<ExtArgs>>): Prisma.Prisma__TenantClient<runtime.Types.Result.GetResult<Prisma.$TenantPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
user<T extends Prisma.Credit$userArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Credit$userArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, 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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
/**
* 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<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
/**
* 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<T>
}
/**
* Fields of the Credit model
*/
export interface CreditFieldRefs {
readonly id: Prisma.FieldRef<"Credit", 'String'>
readonly createdAt: Prisma.FieldRef<"Credit", 'DateTime'>
readonly tenantId: Prisma.FieldRef<"Credit", 'String'>
readonly userId: Prisma.FieldRef<"Credit", 'String'>
readonly amount: Prisma.FieldRef<"Credit", 'Int'>
readonly type: Prisma.FieldRef<"Credit", 'String'>
readonly objectId: Prisma.FieldRef<"Credit", 'String'>
}
// Custom InputTypes
/**
* Credit findUnique
*/
export type CreditFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Credit
*/
select?: Prisma.CreditSelect<ExtArgs> | null
/**
* Omit specific fields from the Credit
*/
omit?: Prisma.CreditOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CreditInclude<ExtArgs> | null
/**
* Filter, which Credit to fetch.
*/
where: Prisma.CreditWhereUniqueInput
}
/**
* Credit findUniqueOrThrow
*/
export type CreditFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Credit
*/
select?: Prisma.CreditSelect<ExtArgs> | null
/**
* Omit specific fields from the Credit
*/
omit?: Prisma.CreditOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CreditInclude<ExtArgs> | null
/**
* Filter, which Credit to fetch.
*/
where: Prisma.CreditWhereUniqueInput
}
/**
* Credit findFirst
*/
export type CreditFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Credit
*/
select?: Prisma.CreditSelect<ExtArgs> | null
/**
* Omit specific fields from the Credit
*/
omit?: Prisma.CreditOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CreditInclude<ExtArgs> | null
/**
* Filter, which Credit to fetch.
*/
where?: Prisma.CreditWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Credits to fetch.
*/
orderBy?: Prisma.CreditOrderByWithRelationInput | Prisma.CreditOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Credits.
*/
cursor?: Prisma.CreditWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Credits 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` Credits.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Credits.
*/
distinct?: Prisma.CreditScalarFieldEnum | Prisma.CreditScalarFieldEnum[]
}
/**
* Credit findFirstOrThrow
*/
export type CreditFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Credit
*/
select?: Prisma.CreditSelect<ExtArgs> | null
/**
* Omit specific fields from the Credit
*/
omit?: Prisma.CreditOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CreditInclude<ExtArgs> | null
/**
* Filter, which Credit to fetch.
*/
where?: Prisma.CreditWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Credits to fetch.
*/
orderBy?: Prisma.CreditOrderByWithRelationInput | Prisma.CreditOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Credits.
*/
cursor?: Prisma.CreditWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Credits 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` Credits.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Credits.
*/
distinct?: Prisma.CreditScalarFieldEnum | Prisma.CreditScalarFieldEnum[]
}
/**
* Credit findMany
*/
export type CreditFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Credit
*/
select?: Prisma.CreditSelect<ExtArgs> | null
/**
* Omit specific fields from the Credit
*/
omit?: Prisma.CreditOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CreditInclude<ExtArgs> | null
/**
* Filter, which Credits to fetch.
*/
where?: Prisma.CreditWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Credits to fetch.
*/
orderBy?: Prisma.CreditOrderByWithRelationInput | Prisma.CreditOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing Credits.
*/
cursor?: Prisma.CreditWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Credits 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` Credits.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Credits.
*/
distinct?: Prisma.CreditScalarFieldEnum | Prisma.CreditScalarFieldEnum[]
}
/**
* Credit create
*/
export type CreditCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Credit
*/
select?: Prisma.CreditSelect<ExtArgs> | null
/**
* Omit specific fields from the Credit
*/
omit?: Prisma.CreditOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CreditInclude<ExtArgs> | null
/**
* The data needed to create a Credit.
*/
data: Prisma.XOR<Prisma.CreditCreateInput, Prisma.CreditUncheckedCreateInput>
}
/**
* Credit createMany
*/
export type CreditCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to create many Credits.
*/
data: Prisma.CreditCreateManyInput | Prisma.CreditCreateManyInput[]
skipDuplicates?: boolean
}
/**
* Credit createManyAndReturn
*/
export type CreditCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Credit
*/
select?: Prisma.CreditSelectCreateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the Credit
*/
omit?: Prisma.CreditOmit<ExtArgs> | null
/**
* The data used to create many Credits.
*/
data: Prisma.CreditCreateManyInput | Prisma.CreditCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CreditIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
* Credit update
*/
export type CreditUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Credit
*/
select?: Prisma.CreditSelect<ExtArgs> | null
/**
* Omit specific fields from the Credit
*/
omit?: Prisma.CreditOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CreditInclude<ExtArgs> | null
/**
* The data needed to update a Credit.
*/
data: Prisma.XOR<Prisma.CreditUpdateInput, Prisma.CreditUncheckedUpdateInput>
/**
* Choose, which Credit to update.
*/
where: Prisma.CreditWhereUniqueInput
}
/**
* Credit updateMany
*/
export type CreditUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to update Credits.
*/
data: Prisma.XOR<Prisma.CreditUpdateManyMutationInput, Prisma.CreditUncheckedUpdateManyInput>
/**
* Filter which Credits to update
*/
where?: Prisma.CreditWhereInput
/**
* Limit how many Credits to update.
*/
limit?: number
}
/**
* Credit updateManyAndReturn
*/
export type CreditUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Credit
*/
select?: Prisma.CreditSelectUpdateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the Credit
*/
omit?: Prisma.CreditOmit<ExtArgs> | null
/**
* The data used to update Credits.
*/
data: Prisma.XOR<Prisma.CreditUpdateManyMutationInput, Prisma.CreditUncheckedUpdateManyInput>
/**
* Filter which Credits to update
*/
where?: Prisma.CreditWhereInput
/**
* Limit how many Credits to update.
*/
limit?: number
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CreditIncludeUpdateManyAndReturn<ExtArgs> | null
}
/**
* Credit upsert
*/
export type CreditUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Credit
*/
select?: Prisma.CreditSelect<ExtArgs> | null
/**
* Omit specific fields from the Credit
*/
omit?: Prisma.CreditOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CreditInclude<ExtArgs> | null
/**
* The filter to search for the Credit to update in case it exists.
*/
where: Prisma.CreditWhereUniqueInput
/**
* In case the Credit found by the `where` argument doesn't exist, create a new Credit with this data.
*/
create: Prisma.XOR<Prisma.CreditCreateInput, Prisma.CreditUncheckedCreateInput>
/**
* In case the Credit was found with the provided `where` argument, update it with this data.
*/
update: Prisma.XOR<Prisma.CreditUpdateInput, Prisma.CreditUncheckedUpdateInput>
}
/**
* Credit delete
*/
export type CreditDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Credit
*/
select?: Prisma.CreditSelect<ExtArgs> | null
/**
* Omit specific fields from the Credit
*/
omit?: Prisma.CreditOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CreditInclude<ExtArgs> | null
/**
* Filter which Credit to delete.
*/
where: Prisma.CreditWhereUniqueInput
}
/**
* Credit deleteMany
*/
export type CreditDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which Credits to delete
*/
where?: Prisma.CreditWhereInput
/**
* Limit how many Credits to delete.
*/
limit?: number
}
/**
* Credit.user
*/
export type Credit$userArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the User
*/
select?: Prisma.UserSelect<ExtArgs> | null
/**
* Omit specific fields from the User
*/
omit?: Prisma.UserOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.UserInclude<ExtArgs> | null
where?: Prisma.UserWhereInput
}
/**
* Credit without action
*/
export type CreditDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Credit
*/
select?: Prisma.CreditSelect<ExtArgs> | null
/**
* Omit specific fields from the Credit
*/
omit?: Prisma.CreditOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CreditInclude<ExtArgs> | null
}