Files
psp_api/src/generated/prisma/models/StockBalance.ts
T

1518 lines
63 KiB
TypeScript
Raw Normal View History

/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
* This file exports the `StockBalance` model and its related types.
*
* 🟢 You can import this file directly.
*/
import type * as runtime from "@prisma/client/runtime/client"
import type * as $Enums from "../enums.js"
import type * as Prisma from "../internal/prismaNamespace.js"
/**
* Model StockBalance
*
*/
export type StockBalanceModel = runtime.Types.Result.DefaultSelection<Prisma.$StockBalancePayload>
export type AggregateStockBalance = {
_count: StockBalanceCountAggregateOutputType | null
_avg: StockBalanceAvgAggregateOutputType | null
_sum: StockBalanceSumAggregateOutputType | null
_min: StockBalanceMinAggregateOutputType | null
_max: StockBalanceMaxAggregateOutputType | null
}
export type StockBalanceAvgAggregateOutputType = {
quantity: runtime.Decimal | null
totalCost: runtime.Decimal | null
avgCost: runtime.Decimal | null
inventoryId: number | null
productId: number | null
id: number | null
}
export type StockBalanceSumAggregateOutputType = {
quantity: runtime.Decimal | null
totalCost: runtime.Decimal | null
avgCost: runtime.Decimal | null
inventoryId: number | null
productId: number | null
id: number | null
}
export type StockBalanceMinAggregateOutputType = {
quantity: runtime.Decimal | null
totalCost: runtime.Decimal | null
updatedAt: Date | null
avgCost: runtime.Decimal | null
inventoryId: number | null
productId: number | null
createdAt: Date | null
id: number | null
}
export type StockBalanceMaxAggregateOutputType = {
quantity: runtime.Decimal | null
totalCost: runtime.Decimal | null
updatedAt: Date | null
avgCost: runtime.Decimal | null
inventoryId: number | null
productId: number | null
createdAt: Date | null
id: number | null
}
export type StockBalanceCountAggregateOutputType = {
quantity: number
totalCost: number
updatedAt: number
avgCost: number
inventoryId: number
productId: number
createdAt: number
id: number
_all: number
}
export type StockBalanceAvgAggregateInputType = {
quantity?: true
totalCost?: true
avgCost?: true
inventoryId?: true
productId?: true
id?: true
}
export type StockBalanceSumAggregateInputType = {
quantity?: true
totalCost?: true
avgCost?: true
inventoryId?: true
productId?: true
id?: true
}
export type StockBalanceMinAggregateInputType = {
quantity?: true
totalCost?: true
updatedAt?: true
avgCost?: true
inventoryId?: true
productId?: true
createdAt?: true
id?: true
}
export type StockBalanceMaxAggregateInputType = {
quantity?: true
totalCost?: true
updatedAt?: true
avgCost?: true
inventoryId?: true
productId?: true
createdAt?: true
id?: true
}
export type StockBalanceCountAggregateInputType = {
quantity?: true
totalCost?: true
updatedAt?: true
avgCost?: true
inventoryId?: true
productId?: true
createdAt?: true
id?: true
_all?: true
}
export type StockBalanceAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which StockBalance to aggregate.
*/
where?: Prisma.StockBalanceWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of StockBalances to fetch.
*/
orderBy?: Prisma.StockBalanceOrderByWithRelationInput | Prisma.StockBalanceOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: Prisma.StockBalanceWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` StockBalances 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` StockBalances.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned StockBalances
**/
_count?: true | StockBalanceCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to average
**/
_avg?: StockBalanceAvgAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to sum
**/
_sum?: StockBalanceSumAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: StockBalanceMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: StockBalanceMaxAggregateInputType
}
export type GetStockBalanceAggregateType<T extends StockBalanceAggregateArgs> = {
[P in keyof T & keyof AggregateStockBalance]: P extends '_count' | 'count'
? T[P] extends true
? number
: Prisma.GetScalarType<T[P], AggregateStockBalance[P]>
: Prisma.GetScalarType<T[P], AggregateStockBalance[P]>
}
export type StockBalanceGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.StockBalanceWhereInput
orderBy?: Prisma.StockBalanceOrderByWithAggregationInput | Prisma.StockBalanceOrderByWithAggregationInput[]
by: Prisma.StockBalanceScalarFieldEnum[] | Prisma.StockBalanceScalarFieldEnum
having?: Prisma.StockBalanceScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: StockBalanceCountAggregateInputType | true
_avg?: StockBalanceAvgAggregateInputType
_sum?: StockBalanceSumAggregateInputType
_min?: StockBalanceMinAggregateInputType
_max?: StockBalanceMaxAggregateInputType
}
export type StockBalanceGroupByOutputType = {
quantity: runtime.Decimal
totalCost: runtime.Decimal
updatedAt: Date
avgCost: runtime.Decimal
inventoryId: number
productId: number
createdAt: Date
id: number
_count: StockBalanceCountAggregateOutputType | null
_avg: StockBalanceAvgAggregateOutputType | null
_sum: StockBalanceSumAggregateOutputType | null
_min: StockBalanceMinAggregateOutputType | null
_max: StockBalanceMaxAggregateOutputType | null
}
type GetStockBalanceGroupByPayload<T extends StockBalanceGroupByArgs> = Prisma.PrismaPromise<
Array<
Prisma.PickEnumerable<StockBalanceGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof StockBalanceGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: Prisma.GetScalarType<T[P], StockBalanceGroupByOutputType[P]>
: Prisma.GetScalarType<T[P], StockBalanceGroupByOutputType[P]>
}
>
>
export type StockBalanceWhereInput = {
AND?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[]
OR?: Prisma.StockBalanceWhereInput[]
NOT?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[]
quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryId?: Prisma.IntFilter<"StockBalance"> | number
productId?: Prisma.IntFilter<"StockBalance"> | number
createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
id?: Prisma.IntFilter<"StockBalance"> | number
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput>
}
export type StockBalanceOrderByWithRelationInput = {
quantity?: Prisma.SortOrder
totalCost?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
avgCost?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder
productId?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
id?: Prisma.SortOrder
inventory?: Prisma.InventoryOrderByWithRelationInput
product?: Prisma.ProductOrderByWithRelationInput
}
export type StockBalanceWhereUniqueInput = Prisma.AtLeast<{
id?: number
productId_inventoryId?: Prisma.StockBalanceProductIdInventoryIdCompoundUniqueInput
AND?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[]
OR?: Prisma.StockBalanceWhereInput[]
NOT?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[]
quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryId?: Prisma.IntFilter<"StockBalance"> | number
productId?: Prisma.IntFilter<"StockBalance"> | number
createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput>
}, "id" | "productId_inventoryId">
export type StockBalanceOrderByWithAggregationInput = {
quantity?: Prisma.SortOrder
totalCost?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
avgCost?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder
productId?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
id?: Prisma.SortOrder
_count?: Prisma.StockBalanceCountOrderByAggregateInput
_avg?: Prisma.StockBalanceAvgOrderByAggregateInput
_max?: Prisma.StockBalanceMaxOrderByAggregateInput
_min?: Prisma.StockBalanceMinOrderByAggregateInput
_sum?: Prisma.StockBalanceSumOrderByAggregateInput
}
export type StockBalanceScalarWhereWithAggregatesInput = {
AND?: Prisma.StockBalanceScalarWhereWithAggregatesInput | Prisma.StockBalanceScalarWhereWithAggregatesInput[]
OR?: Prisma.StockBalanceScalarWhereWithAggregatesInput[]
NOT?: Prisma.StockBalanceScalarWhereWithAggregatesInput | Prisma.StockBalanceScalarWhereWithAggregatesInput[]
quantity?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"StockBalance"> | Date | string
avgCost?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryId?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number
productId?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number
createdAt?: Prisma.DateTimeWithAggregatesFilter<"StockBalance"> | Date | string
id?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number
}
export type StockBalanceCreateInput = {
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Date | string
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
createdAt?: Date | string
inventory: Prisma.InventoryCreateNestedOneWithoutStockBalancesInput
product: Prisma.ProductCreateNestedOneWithoutStockBalancesInput
}
export type StockBalanceUncheckedCreateInput = {
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Date | string
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryId: number
productId: number
createdAt?: Date | string
id?: number
}
export type StockBalanceUpdateInput = {
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockBalancesNestedInput
product?: Prisma.ProductUpdateOneRequiredWithoutStockBalancesNestedInput
}
export type StockBalanceUncheckedUpdateInput = {
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
productId?: Prisma.IntFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
id?: Prisma.IntFieldUpdateOperationsInput | number
}
export type StockBalanceCreateManyInput = {
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Date | string
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryId: number
productId: number
createdAt?: Date | string
id?: number
}
export type StockBalanceUpdateManyMutationInput = {
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type StockBalanceUncheckedUpdateManyInput = {
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
productId?: Prisma.IntFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
id?: Prisma.IntFieldUpdateOperationsInput | number
}
export type StockBalanceListRelationFilter = {
every?: Prisma.StockBalanceWhereInput
some?: Prisma.StockBalanceWhereInput
none?: Prisma.StockBalanceWhereInput
}
export type StockBalanceOrderByRelationAggregateInput = {
_count?: Prisma.SortOrder
}
export type StockBalanceProductIdInventoryIdCompoundUniqueInput = {
productId: number
inventoryId: number
}
export type StockBalanceCountOrderByAggregateInput = {
quantity?: Prisma.SortOrder
totalCost?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
avgCost?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder
productId?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
id?: Prisma.SortOrder
}
export type StockBalanceAvgOrderByAggregateInput = {
quantity?: Prisma.SortOrder
totalCost?: Prisma.SortOrder
avgCost?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder
productId?: Prisma.SortOrder
id?: Prisma.SortOrder
}
export type StockBalanceMaxOrderByAggregateInput = {
quantity?: Prisma.SortOrder
totalCost?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
avgCost?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder
productId?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
id?: Prisma.SortOrder
}
export type StockBalanceMinOrderByAggregateInput = {
quantity?: Prisma.SortOrder
totalCost?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
avgCost?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder
productId?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
id?: Prisma.SortOrder
}
export type StockBalanceSumOrderByAggregateInput = {
quantity?: Prisma.SortOrder
totalCost?: Prisma.SortOrder
avgCost?: Prisma.SortOrder
inventoryId?: Prisma.SortOrder
productId?: Prisma.SortOrder
id?: Prisma.SortOrder
}
export type StockBalanceCreateNestedManyWithoutInventoryInput = {
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutInventoryInput, Prisma.StockBalanceUncheckedCreateWithoutInventoryInput> | Prisma.StockBalanceCreateWithoutInventoryInput[] | Prisma.StockBalanceUncheckedCreateWithoutInventoryInput[]
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutInventoryInput | Prisma.StockBalanceCreateOrConnectWithoutInventoryInput[]
createMany?: Prisma.StockBalanceCreateManyInventoryInputEnvelope
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
}
export type StockBalanceUncheckedCreateNestedManyWithoutInventoryInput = {
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutInventoryInput, Prisma.StockBalanceUncheckedCreateWithoutInventoryInput> | Prisma.StockBalanceCreateWithoutInventoryInput[] | Prisma.StockBalanceUncheckedCreateWithoutInventoryInput[]
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutInventoryInput | Prisma.StockBalanceCreateOrConnectWithoutInventoryInput[]
createMany?: Prisma.StockBalanceCreateManyInventoryInputEnvelope
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
}
export type StockBalanceUpdateManyWithoutInventoryNestedInput = {
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutInventoryInput, Prisma.StockBalanceUncheckedCreateWithoutInventoryInput> | Prisma.StockBalanceCreateWithoutInventoryInput[] | Prisma.StockBalanceUncheckedCreateWithoutInventoryInput[]
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutInventoryInput | Prisma.StockBalanceCreateOrConnectWithoutInventoryInput[]
upsert?: Prisma.StockBalanceUpsertWithWhereUniqueWithoutInventoryInput | Prisma.StockBalanceUpsertWithWhereUniqueWithoutInventoryInput[]
createMany?: Prisma.StockBalanceCreateManyInventoryInputEnvelope
set?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
disconnect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
delete?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
update?: Prisma.StockBalanceUpdateWithWhereUniqueWithoutInventoryInput | Prisma.StockBalanceUpdateWithWhereUniqueWithoutInventoryInput[]
updateMany?: Prisma.StockBalanceUpdateManyWithWhereWithoutInventoryInput | Prisma.StockBalanceUpdateManyWithWhereWithoutInventoryInput[]
deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
}
export type StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput = {
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutInventoryInput, Prisma.StockBalanceUncheckedCreateWithoutInventoryInput> | Prisma.StockBalanceCreateWithoutInventoryInput[] | Prisma.StockBalanceUncheckedCreateWithoutInventoryInput[]
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutInventoryInput | Prisma.StockBalanceCreateOrConnectWithoutInventoryInput[]
upsert?: Prisma.StockBalanceUpsertWithWhereUniqueWithoutInventoryInput | Prisma.StockBalanceUpsertWithWhereUniqueWithoutInventoryInput[]
createMany?: Prisma.StockBalanceCreateManyInventoryInputEnvelope
set?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
disconnect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
delete?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
update?: Prisma.StockBalanceUpdateWithWhereUniqueWithoutInventoryInput | Prisma.StockBalanceUpdateWithWhereUniqueWithoutInventoryInput[]
updateMany?: Prisma.StockBalanceUpdateManyWithWhereWithoutInventoryInput | Prisma.StockBalanceUpdateManyWithWhereWithoutInventoryInput[]
deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
}
export type StockBalanceCreateNestedManyWithoutProductInput = {
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput> | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[]
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[]
createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
}
export type StockBalanceUncheckedCreateNestedManyWithoutProductInput = {
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput> | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[]
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[]
createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
}
export type StockBalanceUpdateManyWithoutProductNestedInput = {
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput> | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[]
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[]
upsert?: Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput[]
createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope
set?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
disconnect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
delete?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
update?: Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput[]
updateMany?: Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput | Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput[]
deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
}
export type StockBalanceUncheckedUpdateManyWithoutProductNestedInput = {
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput> | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[]
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[]
upsert?: Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput[]
createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope
set?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
disconnect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
delete?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
update?: Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput[]
updateMany?: Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput | Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput[]
deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
}
export type StockBalanceCreateWithoutInventoryInput = {
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Date | string
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
createdAt?: Date | string
product: Prisma.ProductCreateNestedOneWithoutStockBalancesInput
}
export type StockBalanceUncheckedCreateWithoutInventoryInput = {
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Date | string
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
productId: number
createdAt?: Date | string
id?: number
}
export type StockBalanceCreateOrConnectWithoutInventoryInput = {
where: Prisma.StockBalanceWhereUniqueInput
create: Prisma.XOR<Prisma.StockBalanceCreateWithoutInventoryInput, Prisma.StockBalanceUncheckedCreateWithoutInventoryInput>
}
export type StockBalanceCreateManyInventoryInputEnvelope = {
data: Prisma.StockBalanceCreateManyInventoryInput | Prisma.StockBalanceCreateManyInventoryInput[]
skipDuplicates?: boolean
}
export type StockBalanceUpsertWithWhereUniqueWithoutInventoryInput = {
where: Prisma.StockBalanceWhereUniqueInput
update: Prisma.XOR<Prisma.StockBalanceUpdateWithoutInventoryInput, Prisma.StockBalanceUncheckedUpdateWithoutInventoryInput>
create: Prisma.XOR<Prisma.StockBalanceCreateWithoutInventoryInput, Prisma.StockBalanceUncheckedCreateWithoutInventoryInput>
}
export type StockBalanceUpdateWithWhereUniqueWithoutInventoryInput = {
where: Prisma.StockBalanceWhereUniqueInput
data: Prisma.XOR<Prisma.StockBalanceUpdateWithoutInventoryInput, Prisma.StockBalanceUncheckedUpdateWithoutInventoryInput>
}
export type StockBalanceUpdateManyWithWhereWithoutInventoryInput = {
where: Prisma.StockBalanceScalarWhereInput
data: Prisma.XOR<Prisma.StockBalanceUpdateManyMutationInput, Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryInput>
}
export type StockBalanceScalarWhereInput = {
AND?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
OR?: Prisma.StockBalanceScalarWhereInput[]
NOT?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryId?: Prisma.IntFilter<"StockBalance"> | number
productId?: Prisma.IntFilter<"StockBalance"> | number
createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
id?: Prisma.IntFilter<"StockBalance"> | number
}
export type StockBalanceCreateWithoutProductInput = {
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Date | string
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
createdAt?: Date | string
inventory: Prisma.InventoryCreateNestedOneWithoutStockBalancesInput
}
export type StockBalanceUncheckedCreateWithoutProductInput = {
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Date | string
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryId: number
createdAt?: Date | string
id?: number
}
export type StockBalanceCreateOrConnectWithoutProductInput = {
where: Prisma.StockBalanceWhereUniqueInput
create: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput>
}
export type StockBalanceCreateManyProductInputEnvelope = {
data: Prisma.StockBalanceCreateManyProductInput | Prisma.StockBalanceCreateManyProductInput[]
skipDuplicates?: boolean
}
export type StockBalanceUpsertWithWhereUniqueWithoutProductInput = {
where: Prisma.StockBalanceWhereUniqueInput
update: Prisma.XOR<Prisma.StockBalanceUpdateWithoutProductInput, Prisma.StockBalanceUncheckedUpdateWithoutProductInput>
create: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput>
}
export type StockBalanceUpdateWithWhereUniqueWithoutProductInput = {
where: Prisma.StockBalanceWhereUniqueInput
data: Prisma.XOR<Prisma.StockBalanceUpdateWithoutProductInput, Prisma.StockBalanceUncheckedUpdateWithoutProductInput>
}
export type StockBalanceUpdateManyWithWhereWithoutProductInput = {
where: Prisma.StockBalanceScalarWhereInput
data: Prisma.XOR<Prisma.StockBalanceUpdateManyMutationInput, Prisma.StockBalanceUncheckedUpdateManyWithoutProductInput>
}
export type StockBalanceCreateManyInventoryInput = {
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Date | string
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
productId: number
createdAt?: Date | string
id?: number
}
export type StockBalanceUpdateWithoutInventoryInput = {
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
product?: Prisma.ProductUpdateOneRequiredWithoutStockBalancesNestedInput
}
export type StockBalanceUncheckedUpdateWithoutInventoryInput = {
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
productId?: Prisma.IntFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
id?: Prisma.IntFieldUpdateOperationsInput | number
}
export type StockBalanceUncheckedUpdateManyWithoutInventoryInput = {
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
productId?: Prisma.IntFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
id?: Prisma.IntFieldUpdateOperationsInput | number
}
export type StockBalanceCreateManyProductInput = {
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Date | string
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryId: number
createdAt?: Date | string
id?: number
}
export type StockBalanceUpdateWithoutProductInput = {
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockBalancesNestedInput
}
export type StockBalanceUncheckedUpdateWithoutProductInput = {
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
id?: Prisma.IntFieldUpdateOperationsInput | number
}
export type StockBalanceUncheckedUpdateManyWithoutProductInput = {
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
id?: Prisma.IntFieldUpdateOperationsInput | number
}
export type StockBalanceSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
quantity?: boolean
totalCost?: boolean
updatedAt?: boolean
avgCost?: boolean
inventoryId?: boolean
productId?: boolean
createdAt?: boolean
id?: boolean
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
}, ExtArgs["result"]["stockBalance"]>
export type StockBalanceSelectScalar = {
quantity?: boolean
totalCost?: boolean
updatedAt?: boolean
avgCost?: boolean
inventoryId?: boolean
productId?: boolean
createdAt?: boolean
id?: boolean
}
export type StockBalanceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"quantity" | "totalCost" | "updatedAt" | "avgCost" | "inventoryId" | "productId" | "createdAt" | "id", ExtArgs["result"]["stockBalance"]>
export type StockBalanceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
}
export type $StockBalancePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "StockBalance"
objects: {
inventory: Prisma.$InventoryPayload<ExtArgs>
product: Prisma.$ProductPayload<ExtArgs>
}
scalars: runtime.Types.Extensions.GetPayloadResult<{
quantity: runtime.Decimal
totalCost: runtime.Decimal
updatedAt: Date
avgCost: runtime.Decimal
inventoryId: number
productId: number
createdAt: Date
id: number
}, ExtArgs["result"]["stockBalance"]>
composites: {}
}
export type StockBalanceGetPayload<S extends boolean | null | undefined | StockBalanceDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$StockBalancePayload, S>
export type StockBalanceCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
Omit<StockBalanceFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
select?: StockBalanceCountAggregateInputType | true
}
export interface StockBalanceDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['StockBalance'], meta: { name: 'StockBalance' } }
/**
* Find zero or one StockBalance that matches the filter.
* @param {StockBalanceFindUniqueArgs} args - Arguments to find a StockBalance
* @example
* // Get one StockBalance
* const stockBalance = await prisma.stockBalance.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends StockBalanceFindUniqueArgs>(args: Prisma.SelectSubset<T, StockBalanceFindUniqueArgs<ExtArgs>>): Prisma.Prisma__StockBalanceClient<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find one StockBalance that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {StockBalanceFindUniqueOrThrowArgs} args - Arguments to find a StockBalance
* @example
* // Get one StockBalance
* const stockBalance = await prisma.stockBalance.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends StockBalanceFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, StockBalanceFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__StockBalanceClient<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find the first StockBalance 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 {StockBalanceFindFirstArgs} args - Arguments to find a StockBalance
* @example
* // Get one StockBalance
* const stockBalance = await prisma.stockBalance.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends StockBalanceFindFirstArgs>(args?: Prisma.SelectSubset<T, StockBalanceFindFirstArgs<ExtArgs>>): Prisma.Prisma__StockBalanceClient<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find the first StockBalance 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 {StockBalanceFindFirstOrThrowArgs} args - Arguments to find a StockBalance
* @example
* // Get one StockBalance
* const stockBalance = await prisma.stockBalance.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends StockBalanceFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, StockBalanceFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__StockBalanceClient<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find zero or more StockBalances 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 {StockBalanceFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all StockBalances
* const stockBalances = await prisma.stockBalance.findMany()
*
* // Get first 10 StockBalances
* const stockBalances = await prisma.stockBalance.findMany({ take: 10 })
*
* // Only select the `quantity`
* const stockBalanceWithQuantityOnly = await prisma.stockBalance.findMany({ select: { quantity: true } })
*
*/
findMany<T extends StockBalanceFindManyArgs>(args?: Prisma.SelectSubset<T, StockBalanceFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
/**
* Create a StockBalance.
* @param {StockBalanceCreateArgs} args - Arguments to create a StockBalance.
* @example
* // Create one StockBalance
* const StockBalance = await prisma.stockBalance.create({
* data: {
* // ... data to create a StockBalance
* }
* })
*
*/
create<T extends StockBalanceCreateArgs>(args: Prisma.SelectSubset<T, StockBalanceCreateArgs<ExtArgs>>): Prisma.Prisma__StockBalanceClient<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Create many StockBalances.
* @param {StockBalanceCreateManyArgs} args - Arguments to create many StockBalances.
* @example
* // Create many StockBalances
* const stockBalance = await prisma.stockBalance.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends StockBalanceCreateManyArgs>(args?: Prisma.SelectSubset<T, StockBalanceCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Delete a StockBalance.
* @param {StockBalanceDeleteArgs} args - Arguments to delete one StockBalance.
* @example
* // Delete one StockBalance
* const StockBalance = await prisma.stockBalance.delete({
* where: {
* // ... filter to delete one StockBalance
* }
* })
*
*/
delete<T extends StockBalanceDeleteArgs>(args: Prisma.SelectSubset<T, StockBalanceDeleteArgs<ExtArgs>>): Prisma.Prisma__StockBalanceClient<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Update one StockBalance.
* @param {StockBalanceUpdateArgs} args - Arguments to update one StockBalance.
* @example
* // Update one StockBalance
* const stockBalance = await prisma.stockBalance.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends StockBalanceUpdateArgs>(args: Prisma.SelectSubset<T, StockBalanceUpdateArgs<ExtArgs>>): Prisma.Prisma__StockBalanceClient<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Delete zero or more StockBalances.
* @param {StockBalanceDeleteManyArgs} args - Arguments to filter StockBalances to delete.
* @example
* // Delete a few StockBalances
* const { count } = await prisma.stockBalance.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends StockBalanceDeleteManyArgs>(args?: Prisma.SelectSubset<T, StockBalanceDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more StockBalances.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {StockBalanceUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many StockBalances
* const stockBalance = await prisma.stockBalance.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends StockBalanceUpdateManyArgs>(args: Prisma.SelectSubset<T, StockBalanceUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create or update one StockBalance.
* @param {StockBalanceUpsertArgs} args - Arguments to update or create a StockBalance.
* @example
* // Update or create a StockBalance
* const stockBalance = await prisma.stockBalance.upsert({
* create: {
* // ... data to create a StockBalance
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the StockBalance we want to update
* }
* })
*/
upsert<T extends StockBalanceUpsertArgs>(args: Prisma.SelectSubset<T, StockBalanceUpsertArgs<ExtArgs>>): Prisma.Prisma__StockBalanceClient<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Count the number of StockBalances.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {StockBalanceCountArgs} args - Arguments to filter StockBalances to count.
* @example
* // Count the number of StockBalances
* const count = await prisma.stockBalance.count({
* where: {
* // ... the filter for the StockBalances we want to count
* }
* })
**/
count<T extends StockBalanceCountArgs>(
args?: Prisma.Subset<T, StockBalanceCountArgs>,
): Prisma.PrismaPromise<
T extends runtime.Types.Utils.Record<'select', any>
? T['select'] extends true
? number
: Prisma.GetScalarType<T['select'], StockBalanceCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a StockBalance.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {StockBalanceAggregateArgs} 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 StockBalanceAggregateArgs>(args: Prisma.Subset<T, StockBalanceAggregateArgs>): Prisma.PrismaPromise<GetStockBalanceAggregateType<T>>
/**
* Group by StockBalance.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {StockBalanceGroupByArgs} 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 StockBalanceGroupByArgs,
HasSelectOrTake extends Prisma.Or<
Prisma.Extends<'skip', Prisma.Keys<T>>,
Prisma.Extends<'take', Prisma.Keys<T>>
>,
OrderByArg extends Prisma.True extends HasSelectOrTake
? { orderBy: StockBalanceGroupByArgs['orderBy'] }
: { orderBy?: StockBalanceGroupByArgs['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, StockBalanceGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetStockBalanceGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the StockBalance model
*/
readonly fields: StockBalanceFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for StockBalance.
* 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__StockBalanceClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
inventory<T extends Prisma.InventoryDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.InventoryDefaultArgs<ExtArgs>>): Prisma.Prisma__InventoryClient<runtime.Types.Result.GetResult<Prisma.$InventoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
product<T extends Prisma.ProductDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ProductDefaultArgs<ExtArgs>>): Prisma.Prisma__ProductClient<runtime.Types.Result.GetResult<Prisma.$ProductPayload<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 StockBalance model
*/
export interface StockBalanceFieldRefs {
readonly quantity: Prisma.FieldRef<"StockBalance", 'Decimal'>
readonly totalCost: Prisma.FieldRef<"StockBalance", 'Decimal'>
readonly updatedAt: Prisma.FieldRef<"StockBalance", 'DateTime'>
readonly avgCost: Prisma.FieldRef<"StockBalance", 'Decimal'>
readonly inventoryId: Prisma.FieldRef<"StockBalance", 'Int'>
readonly productId: Prisma.FieldRef<"StockBalance", 'Int'>
readonly createdAt: Prisma.FieldRef<"StockBalance", 'DateTime'>
readonly id: Prisma.FieldRef<"StockBalance", 'Int'>
}
// Custom InputTypes
/**
* StockBalance findUnique
*/
export type StockBalanceFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the StockBalance
*/
select?: Prisma.StockBalanceSelect<ExtArgs> | null
/**
* Omit specific fields from the StockBalance
*/
omit?: Prisma.StockBalanceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.StockBalanceInclude<ExtArgs> | null
/**
* Filter, which StockBalance to fetch.
*/
where: Prisma.StockBalanceWhereUniqueInput
}
/**
* StockBalance findUniqueOrThrow
*/
export type StockBalanceFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the StockBalance
*/
select?: Prisma.StockBalanceSelect<ExtArgs> | null
/**
* Omit specific fields from the StockBalance
*/
omit?: Prisma.StockBalanceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.StockBalanceInclude<ExtArgs> | null
/**
* Filter, which StockBalance to fetch.
*/
where: Prisma.StockBalanceWhereUniqueInput
}
/**
* StockBalance findFirst
*/
export type StockBalanceFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the StockBalance
*/
select?: Prisma.StockBalanceSelect<ExtArgs> | null
/**
* Omit specific fields from the StockBalance
*/
omit?: Prisma.StockBalanceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.StockBalanceInclude<ExtArgs> | null
/**
* Filter, which StockBalance to fetch.
*/
where?: Prisma.StockBalanceWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of StockBalances to fetch.
*/
orderBy?: Prisma.StockBalanceOrderByWithRelationInput | Prisma.StockBalanceOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for StockBalances.
*/
cursor?: Prisma.StockBalanceWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` StockBalances 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` StockBalances.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of StockBalances.
*/
distinct?: Prisma.StockBalanceScalarFieldEnum | Prisma.StockBalanceScalarFieldEnum[]
}
/**
* StockBalance findFirstOrThrow
*/
export type StockBalanceFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the StockBalance
*/
select?: Prisma.StockBalanceSelect<ExtArgs> | null
/**
* Omit specific fields from the StockBalance
*/
omit?: Prisma.StockBalanceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.StockBalanceInclude<ExtArgs> | null
/**
* Filter, which StockBalance to fetch.
*/
where?: Prisma.StockBalanceWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of StockBalances to fetch.
*/
orderBy?: Prisma.StockBalanceOrderByWithRelationInput | Prisma.StockBalanceOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for StockBalances.
*/
cursor?: Prisma.StockBalanceWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` StockBalances 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` StockBalances.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of StockBalances.
*/
distinct?: Prisma.StockBalanceScalarFieldEnum | Prisma.StockBalanceScalarFieldEnum[]
}
/**
* StockBalance findMany
*/
export type StockBalanceFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the StockBalance
*/
select?: Prisma.StockBalanceSelect<ExtArgs> | null
/**
* Omit specific fields from the StockBalance
*/
omit?: Prisma.StockBalanceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.StockBalanceInclude<ExtArgs> | null
/**
* Filter, which StockBalances to fetch.
*/
where?: Prisma.StockBalanceWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of StockBalances to fetch.
*/
orderBy?: Prisma.StockBalanceOrderByWithRelationInput | Prisma.StockBalanceOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing StockBalances.
*/
cursor?: Prisma.StockBalanceWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` StockBalances 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` StockBalances.
*/
skip?: number
distinct?: Prisma.StockBalanceScalarFieldEnum | Prisma.StockBalanceScalarFieldEnum[]
}
/**
* StockBalance create
*/
export type StockBalanceCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the StockBalance
*/
select?: Prisma.StockBalanceSelect<ExtArgs> | null
/**
* Omit specific fields from the StockBalance
*/
omit?: Prisma.StockBalanceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.StockBalanceInclude<ExtArgs> | null
/**
* The data needed to create a StockBalance.
*/
data: Prisma.XOR<Prisma.StockBalanceCreateInput, Prisma.StockBalanceUncheckedCreateInput>
}
/**
* StockBalance createMany
*/
export type StockBalanceCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to create many StockBalances.
*/
data: Prisma.StockBalanceCreateManyInput | Prisma.StockBalanceCreateManyInput[]
skipDuplicates?: boolean
}
/**
* StockBalance update
*/
export type StockBalanceUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the StockBalance
*/
select?: Prisma.StockBalanceSelect<ExtArgs> | null
/**
* Omit specific fields from the StockBalance
*/
omit?: Prisma.StockBalanceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.StockBalanceInclude<ExtArgs> | null
/**
* The data needed to update a StockBalance.
*/
data: Prisma.XOR<Prisma.StockBalanceUpdateInput, Prisma.StockBalanceUncheckedUpdateInput>
/**
* Choose, which StockBalance to update.
*/
where: Prisma.StockBalanceWhereUniqueInput
}
/**
* StockBalance updateMany
*/
export type StockBalanceUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to update StockBalances.
*/
data: Prisma.XOR<Prisma.StockBalanceUpdateManyMutationInput, Prisma.StockBalanceUncheckedUpdateManyInput>
/**
* Filter which StockBalances to update
*/
where?: Prisma.StockBalanceWhereInput
/**
* Limit how many StockBalances to update.
*/
limit?: number
}
/**
* StockBalance upsert
*/
export type StockBalanceUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the StockBalance
*/
select?: Prisma.StockBalanceSelect<ExtArgs> | null
/**
* Omit specific fields from the StockBalance
*/
omit?: Prisma.StockBalanceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.StockBalanceInclude<ExtArgs> | null
/**
* The filter to search for the StockBalance to update in case it exists.
*/
where: Prisma.StockBalanceWhereUniqueInput
/**
* In case the StockBalance found by the `where` argument doesn't exist, create a new StockBalance with this data.
*/
create: Prisma.XOR<Prisma.StockBalanceCreateInput, Prisma.StockBalanceUncheckedCreateInput>
/**
* In case the StockBalance was found with the provided `where` argument, update it with this data.
*/
update: Prisma.XOR<Prisma.StockBalanceUpdateInput, Prisma.StockBalanceUncheckedUpdateInput>
}
/**
* StockBalance delete
*/
export type StockBalanceDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the StockBalance
*/
select?: Prisma.StockBalanceSelect<ExtArgs> | null
/**
* Omit specific fields from the StockBalance
*/
omit?: Prisma.StockBalanceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.StockBalanceInclude<ExtArgs> | null
/**
* Filter which StockBalance to delete.
*/
where: Prisma.StockBalanceWhereUniqueInput
}
/**
* StockBalance deleteMany
*/
export type StockBalanceDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which StockBalances to delete
*/
where?: Prisma.StockBalanceWhereInput
/**
* Limit how many StockBalances to delete.
*/
limit?: number
}
/**
* StockBalance without action
*/
export type StockBalanceDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the StockBalance
*/
select?: Prisma.StockBalanceSelect<ExtArgs> | null
/**
* Omit specific fields from the StockBalance
*/
omit?: Prisma.StockBalanceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.StockBalanceInclude<ExtArgs> | null
}