Files
psp_api/src/generated/prisma/models/Good.ts
T
2026-02-04 13:49:07 +03:30

1688 lines
61 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 `Good` 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 Good
*
*/
export type GoodModel = runtime.Types.Result.DefaultSelection<Prisma.$GoodPayload>
export type AggregateGood = {
_count: GoodCountAggregateOutputType | null
_avg: GoodAvgAggregateOutputType | null
_sum: GoodSumAggregateOutputType | null
_min: GoodMinAggregateOutputType | null
_max: GoodMaxAggregateOutputType | null
}
export type GoodAvgAggregateOutputType = {
id: number | null
categoryId: number | null
baseSalePrice: runtime.Decimal | null
}
export type GoodSumAggregateOutputType = {
id: number | null
categoryId: number | null
baseSalePrice: runtime.Decimal | null
}
export type GoodMinAggregateOutputType = {
id: number | null
name: string | null
description: string | null
sku: string | null
localSku: string | null
barcode: string | null
createdAt: Date | null
updatedAt: Date | null
deletedAt: Date | null
categoryId: number | null
baseSalePrice: runtime.Decimal | null
}
export type GoodMaxAggregateOutputType = {
id: number | null
name: string | null
description: string | null
sku: string | null
localSku: string | null
barcode: string | null
createdAt: Date | null
updatedAt: Date | null
deletedAt: Date | null
categoryId: number | null
baseSalePrice: runtime.Decimal | null
}
export type GoodCountAggregateOutputType = {
id: number
name: number
description: number
sku: number
localSku: number
barcode: number
createdAt: number
updatedAt: number
deletedAt: number
categoryId: number
baseSalePrice: number
_all: number
}
export type GoodAvgAggregateInputType = {
id?: true
categoryId?: true
baseSalePrice?: true
}
export type GoodSumAggregateInputType = {
id?: true
categoryId?: true
baseSalePrice?: true
}
export type GoodMinAggregateInputType = {
id?: true
name?: true
description?: true
sku?: true
localSku?: true
barcode?: true
createdAt?: true
updatedAt?: true
deletedAt?: true
categoryId?: true
baseSalePrice?: true
}
export type GoodMaxAggregateInputType = {
id?: true
name?: true
description?: true
sku?: true
localSku?: true
barcode?: true
createdAt?: true
updatedAt?: true
deletedAt?: true
categoryId?: true
baseSalePrice?: true
}
export type GoodCountAggregateInputType = {
id?: true
name?: true
description?: true
sku?: true
localSku?: true
barcode?: true
createdAt?: true
updatedAt?: true
deletedAt?: true
categoryId?: true
baseSalePrice?: true
_all?: true
}
export type GoodAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which Good to aggregate.
*/
where?: Prisma.GoodWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Goods to fetch.
*/
orderBy?: Prisma.GoodOrderByWithRelationInput | Prisma.GoodOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: Prisma.GoodWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Goods 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` Goods.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned Goods
**/
_count?: true | GoodCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to average
**/
_avg?: GoodAvgAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to sum
**/
_sum?: GoodSumAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: GoodMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: GoodMaxAggregateInputType
}
export type GetGoodAggregateType<T extends GoodAggregateArgs> = {
[P in keyof T & keyof AggregateGood]: P extends '_count' | 'count'
? T[P] extends true
? number
: Prisma.GetScalarType<T[P], AggregateGood[P]>
: Prisma.GetScalarType<T[P], AggregateGood[P]>
}
export type GoodGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.GoodWhereInput
orderBy?: Prisma.GoodOrderByWithAggregationInput | Prisma.GoodOrderByWithAggregationInput[]
by: Prisma.GoodScalarFieldEnum[] | Prisma.GoodScalarFieldEnum
having?: Prisma.GoodScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: GoodCountAggregateInputType | true
_avg?: GoodAvgAggregateInputType
_sum?: GoodSumAggregateInputType
_min?: GoodMinAggregateInputType
_max?: GoodMaxAggregateInputType
}
export type GoodGroupByOutputType = {
id: number
name: string
description: string | null
sku: string
localSku: string
barcode: string | null
createdAt: Date
updatedAt: Date
deletedAt: Date | null
categoryId: number | null
baseSalePrice: runtime.Decimal
_count: GoodCountAggregateOutputType | null
_avg: GoodAvgAggregateOutputType | null
_sum: GoodSumAggregateOutputType | null
_min: GoodMinAggregateOutputType | null
_max: GoodMaxAggregateOutputType | null
}
type GetGoodGroupByPayload<T extends GoodGroupByArgs> = Prisma.PrismaPromise<
Array<
Prisma.PickEnumerable<GoodGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof GoodGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: Prisma.GetScalarType<T[P], GoodGroupByOutputType[P]>
: Prisma.GetScalarType<T[P], GoodGroupByOutputType[P]>
}
>
>
export type GoodWhereInput = {
AND?: Prisma.GoodWhereInput | Prisma.GoodWhereInput[]
OR?: Prisma.GoodWhereInput[]
NOT?: Prisma.GoodWhereInput | Prisma.GoodWhereInput[]
id?: Prisma.IntFilter<"Good"> | number
name?: Prisma.StringFilter<"Good"> | string
description?: Prisma.StringNullableFilter<"Good"> | string | null
sku?: Prisma.StringFilter<"Good"> | string
localSku?: Prisma.StringFilter<"Good"> | string
barcode?: Prisma.StringNullableFilter<"Good"> | string | null
createdAt?: Prisma.DateTimeFilter<"Good"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"Good"> | Date | string
deletedAt?: Prisma.DateTimeNullableFilter<"Good"> | Date | string | null
categoryId?: Prisma.IntNullableFilter<"Good"> | number | null
baseSalePrice?: Prisma.DecimalFilter<"Good"> | runtime.Decimal | runtime.DecimalJsLike | number | string
category?: Prisma.XOR<Prisma.GoodCategoryNullableScalarRelationFilter, Prisma.GoodCategoryWhereInput> | null
salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter
}
export type GoodOrderByWithRelationInput = {
id?: Prisma.SortOrder
name?: Prisma.SortOrder
description?: Prisma.SortOrderInput | Prisma.SortOrder
sku?: Prisma.SortOrder
localSku?: Prisma.SortOrder
barcode?: Prisma.SortOrderInput | Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
categoryId?: Prisma.SortOrderInput | Prisma.SortOrder
baseSalePrice?: Prisma.SortOrder
category?: Prisma.GoodCategoryOrderByWithRelationInput
salesInvoiceItems?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
_relevance?: Prisma.GoodOrderByRelevanceInput
}
export type GoodWhereUniqueInput = Prisma.AtLeast<{
id?: number
localSku?: string
barcode?: string
AND?: Prisma.GoodWhereInput | Prisma.GoodWhereInput[]
OR?: Prisma.GoodWhereInput[]
NOT?: Prisma.GoodWhereInput | Prisma.GoodWhereInput[]
name?: Prisma.StringFilter<"Good"> | string
description?: Prisma.StringNullableFilter<"Good"> | string | null
sku?: Prisma.StringFilter<"Good"> | string
createdAt?: Prisma.DateTimeFilter<"Good"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"Good"> | Date | string
deletedAt?: Prisma.DateTimeNullableFilter<"Good"> | Date | string | null
categoryId?: Prisma.IntNullableFilter<"Good"> | number | null
baseSalePrice?: Prisma.DecimalFilter<"Good"> | runtime.Decimal | runtime.DecimalJsLike | number | string
category?: Prisma.XOR<Prisma.GoodCategoryNullableScalarRelationFilter, Prisma.GoodCategoryWhereInput> | null
salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter
}, "id" | "localSku" | "barcode">
export type GoodOrderByWithAggregationInput = {
id?: Prisma.SortOrder
name?: Prisma.SortOrder
description?: Prisma.SortOrderInput | Prisma.SortOrder
sku?: Prisma.SortOrder
localSku?: Prisma.SortOrder
barcode?: Prisma.SortOrderInput | Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
categoryId?: Prisma.SortOrderInput | Prisma.SortOrder
baseSalePrice?: Prisma.SortOrder
_count?: Prisma.GoodCountOrderByAggregateInput
_avg?: Prisma.GoodAvgOrderByAggregateInput
_max?: Prisma.GoodMaxOrderByAggregateInput
_min?: Prisma.GoodMinOrderByAggregateInput
_sum?: Prisma.GoodSumOrderByAggregateInput
}
export type GoodScalarWhereWithAggregatesInput = {
AND?: Prisma.GoodScalarWhereWithAggregatesInput | Prisma.GoodScalarWhereWithAggregatesInput[]
OR?: Prisma.GoodScalarWhereWithAggregatesInput[]
NOT?: Prisma.GoodScalarWhereWithAggregatesInput | Prisma.GoodScalarWhereWithAggregatesInput[]
id?: Prisma.IntWithAggregatesFilter<"Good"> | number
name?: Prisma.StringWithAggregatesFilter<"Good"> | string
description?: Prisma.StringNullableWithAggregatesFilter<"Good"> | string | null
sku?: Prisma.StringWithAggregatesFilter<"Good"> | string
localSku?: Prisma.StringWithAggregatesFilter<"Good"> | string
barcode?: Prisma.StringNullableWithAggregatesFilter<"Good"> | string | null
createdAt?: Prisma.DateTimeWithAggregatesFilter<"Good"> | Date | string
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Good"> | Date | string
deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Good"> | Date | string | null
categoryId?: Prisma.IntNullableWithAggregatesFilter<"Good"> | number | null
baseSalePrice?: Prisma.DecimalWithAggregatesFilter<"Good"> | runtime.Decimal | runtime.DecimalJsLike | number | string
}
export type GoodCreateInput = {
name: string
description?: string | null
sku: string
localSku: string
barcode?: string | null
createdAt?: Date | string
updatedAt?: Date | string
deletedAt?: Date | string | null
baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
category?: Prisma.GoodCategoryCreateNestedOneWithoutGoodsInput
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutGoodInput
}
export type GoodUncheckedCreateInput = {
id?: number
name: string
description?: string | null
sku: string
localSku: string
barcode?: string | null
createdAt?: Date | string
updatedAt?: Date | string
deletedAt?: Date | string | null
categoryId?: number | null
baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutGoodInput
}
export type GoodUpdateInput = {
name?: Prisma.StringFieldUpdateOperationsInput | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
sku?: Prisma.StringFieldUpdateOperationsInput | string
localSku?: Prisma.StringFieldUpdateOperationsInput | string
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
category?: Prisma.GoodCategoryUpdateOneWithoutGoodsNestedInput
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutGoodNestedInput
}
export type GoodUncheckedUpdateInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
sku?: Prisma.StringFieldUpdateOperationsInput | string
localSku?: Prisma.StringFieldUpdateOperationsInput | string
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutGoodNestedInput
}
export type GoodCreateManyInput = {
id?: number
name: string
description?: string | null
sku: string
localSku: string
barcode?: string | null
createdAt?: Date | string
updatedAt?: Date | string
deletedAt?: Date | string | null
categoryId?: number | null
baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
}
export type GoodUpdateManyMutationInput = {
name?: Prisma.StringFieldUpdateOperationsInput | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
sku?: Prisma.StringFieldUpdateOperationsInput | string
localSku?: Prisma.StringFieldUpdateOperationsInput | string
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
}
export type GoodUncheckedUpdateManyInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
sku?: Prisma.StringFieldUpdateOperationsInput | string
localSku?: Prisma.StringFieldUpdateOperationsInput | string
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
}
export type GoodOrderByRelevanceInput = {
fields: Prisma.GoodOrderByRelevanceFieldEnum | Prisma.GoodOrderByRelevanceFieldEnum[]
sort: Prisma.SortOrder
search: string
}
export type GoodCountOrderByAggregateInput = {
id?: Prisma.SortOrder
name?: Prisma.SortOrder
description?: Prisma.SortOrder
sku?: Prisma.SortOrder
localSku?: Prisma.SortOrder
barcode?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
deletedAt?: Prisma.SortOrder
categoryId?: Prisma.SortOrder
baseSalePrice?: Prisma.SortOrder
}
export type GoodAvgOrderByAggregateInput = {
id?: Prisma.SortOrder
categoryId?: Prisma.SortOrder
baseSalePrice?: Prisma.SortOrder
}
export type GoodMaxOrderByAggregateInput = {
id?: Prisma.SortOrder
name?: Prisma.SortOrder
description?: Prisma.SortOrder
sku?: Prisma.SortOrder
localSku?: Prisma.SortOrder
barcode?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
deletedAt?: Prisma.SortOrder
categoryId?: Prisma.SortOrder
baseSalePrice?: Prisma.SortOrder
}
export type GoodMinOrderByAggregateInput = {
id?: Prisma.SortOrder
name?: Prisma.SortOrder
description?: Prisma.SortOrder
sku?: Prisma.SortOrder
localSku?: Prisma.SortOrder
barcode?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
deletedAt?: Prisma.SortOrder
categoryId?: Prisma.SortOrder
baseSalePrice?: Prisma.SortOrder
}
export type GoodSumOrderByAggregateInput = {
id?: Prisma.SortOrder
categoryId?: Prisma.SortOrder
baseSalePrice?: Prisma.SortOrder
}
export type GoodListRelationFilter = {
every?: Prisma.GoodWhereInput
some?: Prisma.GoodWhereInput
none?: Prisma.GoodWhereInput
}
export type GoodOrderByRelationAggregateInput = {
_count?: Prisma.SortOrder
}
export type GoodNullableScalarRelationFilter = {
is?: Prisma.GoodWhereInput | null
isNot?: Prisma.GoodWhereInput | null
}
export type StringFieldUpdateOperationsInput = {
set?: string
}
export type NullableStringFieldUpdateOperationsInput = {
set?: string | null
}
export type DateTimeFieldUpdateOperationsInput = {
set?: Date | string
}
export type NullableDateTimeFieldUpdateOperationsInput = {
set?: Date | string | null
}
export type DecimalFieldUpdateOperationsInput = {
set?: runtime.Decimal | runtime.DecimalJsLike | number | string
increment?: runtime.Decimal | runtime.DecimalJsLike | number | string
decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string
multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string
divide?: runtime.Decimal | runtime.DecimalJsLike | number | string
}
export type IntFieldUpdateOperationsInput = {
set?: number
increment?: number
decrement?: number
multiply?: number
divide?: number
}
export type NullableIntFieldUpdateOperationsInput = {
set?: number | null
increment?: number
decrement?: number
multiply?: number
divide?: number
}
export type GoodCreateNestedManyWithoutCategoryInput = {
create?: Prisma.XOR<Prisma.GoodCreateWithoutCategoryInput, Prisma.GoodUncheckedCreateWithoutCategoryInput> | Prisma.GoodCreateWithoutCategoryInput[] | Prisma.GoodUncheckedCreateWithoutCategoryInput[]
connectOrCreate?: Prisma.GoodCreateOrConnectWithoutCategoryInput | Prisma.GoodCreateOrConnectWithoutCategoryInput[]
createMany?: Prisma.GoodCreateManyCategoryInputEnvelope
connect?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[]
}
export type GoodUncheckedCreateNestedManyWithoutCategoryInput = {
create?: Prisma.XOR<Prisma.GoodCreateWithoutCategoryInput, Prisma.GoodUncheckedCreateWithoutCategoryInput> | Prisma.GoodCreateWithoutCategoryInput[] | Prisma.GoodUncheckedCreateWithoutCategoryInput[]
connectOrCreate?: Prisma.GoodCreateOrConnectWithoutCategoryInput | Prisma.GoodCreateOrConnectWithoutCategoryInput[]
createMany?: Prisma.GoodCreateManyCategoryInputEnvelope
connect?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[]
}
export type GoodUpdateManyWithoutCategoryNestedInput = {
create?: Prisma.XOR<Prisma.GoodCreateWithoutCategoryInput, Prisma.GoodUncheckedCreateWithoutCategoryInput> | Prisma.GoodCreateWithoutCategoryInput[] | Prisma.GoodUncheckedCreateWithoutCategoryInput[]
connectOrCreate?: Prisma.GoodCreateOrConnectWithoutCategoryInput | Prisma.GoodCreateOrConnectWithoutCategoryInput[]
upsert?: Prisma.GoodUpsertWithWhereUniqueWithoutCategoryInput | Prisma.GoodUpsertWithWhereUniqueWithoutCategoryInput[]
createMany?: Prisma.GoodCreateManyCategoryInputEnvelope
set?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[]
disconnect?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[]
delete?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[]
connect?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[]
update?: Prisma.GoodUpdateWithWhereUniqueWithoutCategoryInput | Prisma.GoodUpdateWithWhereUniqueWithoutCategoryInput[]
updateMany?: Prisma.GoodUpdateManyWithWhereWithoutCategoryInput | Prisma.GoodUpdateManyWithWhereWithoutCategoryInput[]
deleteMany?: Prisma.GoodScalarWhereInput | Prisma.GoodScalarWhereInput[]
}
export type GoodUncheckedUpdateManyWithoutCategoryNestedInput = {
create?: Prisma.XOR<Prisma.GoodCreateWithoutCategoryInput, Prisma.GoodUncheckedCreateWithoutCategoryInput> | Prisma.GoodCreateWithoutCategoryInput[] | Prisma.GoodUncheckedCreateWithoutCategoryInput[]
connectOrCreate?: Prisma.GoodCreateOrConnectWithoutCategoryInput | Prisma.GoodCreateOrConnectWithoutCategoryInput[]
upsert?: Prisma.GoodUpsertWithWhereUniqueWithoutCategoryInput | Prisma.GoodUpsertWithWhereUniqueWithoutCategoryInput[]
createMany?: Prisma.GoodCreateManyCategoryInputEnvelope
set?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[]
disconnect?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[]
delete?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[]
connect?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[]
update?: Prisma.GoodUpdateWithWhereUniqueWithoutCategoryInput | Prisma.GoodUpdateWithWhereUniqueWithoutCategoryInput[]
updateMany?: Prisma.GoodUpdateManyWithWhereWithoutCategoryInput | Prisma.GoodUpdateManyWithWhereWithoutCategoryInput[]
deleteMany?: Prisma.GoodScalarWhereInput | Prisma.GoodScalarWhereInput[]
}
export type GoodCreateNestedOneWithoutSalesInvoiceItemsInput = {
create?: Prisma.XOR<Prisma.GoodCreateWithoutSalesInvoiceItemsInput, Prisma.GoodUncheckedCreateWithoutSalesInvoiceItemsInput>
connectOrCreate?: Prisma.GoodCreateOrConnectWithoutSalesInvoiceItemsInput
connect?: Prisma.GoodWhereUniqueInput
}
export type GoodUpdateOneWithoutSalesInvoiceItemsNestedInput = {
create?: Prisma.XOR<Prisma.GoodCreateWithoutSalesInvoiceItemsInput, Prisma.GoodUncheckedCreateWithoutSalesInvoiceItemsInput>
connectOrCreate?: Prisma.GoodCreateOrConnectWithoutSalesInvoiceItemsInput
upsert?: Prisma.GoodUpsertWithoutSalesInvoiceItemsInput
disconnect?: Prisma.GoodWhereInput | boolean
delete?: Prisma.GoodWhereInput | boolean
connect?: Prisma.GoodWhereUniqueInput
update?: Prisma.XOR<Prisma.XOR<Prisma.GoodUpdateToOneWithWhereWithoutSalesInvoiceItemsInput, Prisma.GoodUpdateWithoutSalesInvoiceItemsInput>, Prisma.GoodUncheckedUpdateWithoutSalesInvoiceItemsInput>
}
export type GoodCreateWithoutCategoryInput = {
name: string
description?: string | null
sku: string
localSku: string
barcode?: string | null
createdAt?: Date | string
updatedAt?: Date | string
deletedAt?: Date | string | null
baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutGoodInput
}
export type GoodUncheckedCreateWithoutCategoryInput = {
id?: number
name: string
description?: string | null
sku: string
localSku: string
barcode?: string | null
createdAt?: Date | string
updatedAt?: Date | string
deletedAt?: Date | string | null
baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutGoodInput
}
export type GoodCreateOrConnectWithoutCategoryInput = {
where: Prisma.GoodWhereUniqueInput
create: Prisma.XOR<Prisma.GoodCreateWithoutCategoryInput, Prisma.GoodUncheckedCreateWithoutCategoryInput>
}
export type GoodCreateManyCategoryInputEnvelope = {
data: Prisma.GoodCreateManyCategoryInput | Prisma.GoodCreateManyCategoryInput[]
skipDuplicates?: boolean
}
export type GoodUpsertWithWhereUniqueWithoutCategoryInput = {
where: Prisma.GoodWhereUniqueInput
update: Prisma.XOR<Prisma.GoodUpdateWithoutCategoryInput, Prisma.GoodUncheckedUpdateWithoutCategoryInput>
create: Prisma.XOR<Prisma.GoodCreateWithoutCategoryInput, Prisma.GoodUncheckedCreateWithoutCategoryInput>
}
export type GoodUpdateWithWhereUniqueWithoutCategoryInput = {
where: Prisma.GoodWhereUniqueInput
data: Prisma.XOR<Prisma.GoodUpdateWithoutCategoryInput, Prisma.GoodUncheckedUpdateWithoutCategoryInput>
}
export type GoodUpdateManyWithWhereWithoutCategoryInput = {
where: Prisma.GoodScalarWhereInput
data: Prisma.XOR<Prisma.GoodUpdateManyMutationInput, Prisma.GoodUncheckedUpdateManyWithoutCategoryInput>
}
export type GoodScalarWhereInput = {
AND?: Prisma.GoodScalarWhereInput | Prisma.GoodScalarWhereInput[]
OR?: Prisma.GoodScalarWhereInput[]
NOT?: Prisma.GoodScalarWhereInput | Prisma.GoodScalarWhereInput[]
id?: Prisma.IntFilter<"Good"> | number
name?: Prisma.StringFilter<"Good"> | string
description?: Prisma.StringNullableFilter<"Good"> | string | null
sku?: Prisma.StringFilter<"Good"> | string
localSku?: Prisma.StringFilter<"Good"> | string
barcode?: Prisma.StringNullableFilter<"Good"> | string | null
createdAt?: Prisma.DateTimeFilter<"Good"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"Good"> | Date | string
deletedAt?: Prisma.DateTimeNullableFilter<"Good"> | Date | string | null
categoryId?: Prisma.IntNullableFilter<"Good"> | number | null
baseSalePrice?: Prisma.DecimalFilter<"Good"> | runtime.Decimal | runtime.DecimalJsLike | number | string
}
export type GoodCreateWithoutSalesInvoiceItemsInput = {
name: string
description?: string | null
sku: string
localSku: string
barcode?: string | null
createdAt?: Date | string
updatedAt?: Date | string
deletedAt?: Date | string | null
baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
category?: Prisma.GoodCategoryCreateNestedOneWithoutGoodsInput
}
export type GoodUncheckedCreateWithoutSalesInvoiceItemsInput = {
id?: number
name: string
description?: string | null
sku: string
localSku: string
barcode?: string | null
createdAt?: Date | string
updatedAt?: Date | string
deletedAt?: Date | string | null
categoryId?: number | null
baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
}
export type GoodCreateOrConnectWithoutSalesInvoiceItemsInput = {
where: Prisma.GoodWhereUniqueInput
create: Prisma.XOR<Prisma.GoodCreateWithoutSalesInvoiceItemsInput, Prisma.GoodUncheckedCreateWithoutSalesInvoiceItemsInput>
}
export type GoodUpsertWithoutSalesInvoiceItemsInput = {
update: Prisma.XOR<Prisma.GoodUpdateWithoutSalesInvoiceItemsInput, Prisma.GoodUncheckedUpdateWithoutSalesInvoiceItemsInput>
create: Prisma.XOR<Prisma.GoodCreateWithoutSalesInvoiceItemsInput, Prisma.GoodUncheckedCreateWithoutSalesInvoiceItemsInput>
where?: Prisma.GoodWhereInput
}
export type GoodUpdateToOneWithWhereWithoutSalesInvoiceItemsInput = {
where?: Prisma.GoodWhereInput
data: Prisma.XOR<Prisma.GoodUpdateWithoutSalesInvoiceItemsInput, Prisma.GoodUncheckedUpdateWithoutSalesInvoiceItemsInput>
}
export type GoodUpdateWithoutSalesInvoiceItemsInput = {
name?: Prisma.StringFieldUpdateOperationsInput | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
sku?: Prisma.StringFieldUpdateOperationsInput | string
localSku?: Prisma.StringFieldUpdateOperationsInput | string
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
category?: Prisma.GoodCategoryUpdateOneWithoutGoodsNestedInput
}
export type GoodUncheckedUpdateWithoutSalesInvoiceItemsInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
sku?: Prisma.StringFieldUpdateOperationsInput | string
localSku?: Prisma.StringFieldUpdateOperationsInput | string
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
}
export type GoodCreateManyCategoryInput = {
id?: number
name: string
description?: string | null
sku: string
localSku: string
barcode?: string | null
createdAt?: Date | string
updatedAt?: Date | string
deletedAt?: Date | string | null
baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
}
export type GoodUpdateWithoutCategoryInput = {
name?: Prisma.StringFieldUpdateOperationsInput | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
sku?: Prisma.StringFieldUpdateOperationsInput | string
localSku?: Prisma.StringFieldUpdateOperationsInput | string
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutGoodNestedInput
}
export type GoodUncheckedUpdateWithoutCategoryInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
sku?: Prisma.StringFieldUpdateOperationsInput | string
localSku?: Prisma.StringFieldUpdateOperationsInput | string
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutGoodNestedInput
}
export type GoodUncheckedUpdateManyWithoutCategoryInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
sku?: Prisma.StringFieldUpdateOperationsInput | string
localSku?: Prisma.StringFieldUpdateOperationsInput | string
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
}
/**
* Count Type GoodCountOutputType
*/
export type GoodCountOutputType = {
salesInvoiceItems: number
}
export type GoodCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
salesInvoiceItems?: boolean | GoodCountOutputTypeCountSalesInvoiceItemsArgs
}
/**
* GoodCountOutputType without action
*/
export type GoodCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the GoodCountOutputType
*/
select?: Prisma.GoodCountOutputTypeSelect<ExtArgs> | null
}
/**
* GoodCountOutputType without action
*/
export type GoodCountOutputTypeCountSalesInvoiceItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.SalesInvoiceItemWhereInput
}
export type GoodSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
name?: boolean
description?: boolean
sku?: boolean
localSku?: boolean
barcode?: boolean
createdAt?: boolean
updatedAt?: boolean
deletedAt?: boolean
categoryId?: boolean
baseSalePrice?: boolean
category?: boolean | Prisma.Good$categoryArgs<ExtArgs>
salesInvoiceItems?: boolean | Prisma.Good$salesInvoiceItemsArgs<ExtArgs>
_count?: boolean | Prisma.GoodCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["good"]>
export type GoodSelectScalar = {
id?: boolean
name?: boolean
description?: boolean
sku?: boolean
localSku?: boolean
barcode?: boolean
createdAt?: boolean
updatedAt?: boolean
deletedAt?: boolean
categoryId?: boolean
baseSalePrice?: boolean
}
export type GoodOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "sku" | "localSku" | "barcode" | "createdAt" | "updatedAt" | "deletedAt" | "categoryId" | "baseSalePrice", ExtArgs["result"]["good"]>
export type GoodInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
category?: boolean | Prisma.Good$categoryArgs<ExtArgs>
salesInvoiceItems?: boolean | Prisma.Good$salesInvoiceItemsArgs<ExtArgs>
_count?: boolean | Prisma.GoodCountOutputTypeDefaultArgs<ExtArgs>
}
export type $GoodPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "Good"
objects: {
category: Prisma.$GoodCategoryPayload<ExtArgs> | null
salesInvoiceItems: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: number
name: string
description: string | null
sku: string
localSku: string
barcode: string | null
createdAt: Date
updatedAt: Date
deletedAt: Date | null
categoryId: number | null
baseSalePrice: runtime.Decimal
}, ExtArgs["result"]["good"]>
composites: {}
}
export type GoodGetPayload<S extends boolean | null | undefined | GoodDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$GoodPayload, S>
export type GoodCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
Omit<GoodFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
select?: GoodCountAggregateInputType | true
}
export interface GoodDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Good'], meta: { name: 'Good' } }
/**
* Find zero or one Good that matches the filter.
* @param {GoodFindUniqueArgs} args - Arguments to find a Good
* @example
* // Get one Good
* const good = await prisma.good.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends GoodFindUniqueArgs>(args: Prisma.SelectSubset<T, GoodFindUniqueArgs<ExtArgs>>): Prisma.Prisma__GoodClient<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find one Good that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {GoodFindUniqueOrThrowArgs} args - Arguments to find a Good
* @example
* // Get one Good
* const good = await prisma.good.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends GoodFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, GoodFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__GoodClient<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find the first Good 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 {GoodFindFirstArgs} args - Arguments to find a Good
* @example
* // Get one Good
* const good = await prisma.good.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends GoodFindFirstArgs>(args?: Prisma.SelectSubset<T, GoodFindFirstArgs<ExtArgs>>): Prisma.Prisma__GoodClient<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find the first Good 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 {GoodFindFirstOrThrowArgs} args - Arguments to find a Good
* @example
* // Get one Good
* const good = await prisma.good.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends GoodFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, GoodFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__GoodClient<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find zero or more Goods 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 {GoodFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all Goods
* const goods = await prisma.good.findMany()
*
* // Get first 10 Goods
* const goods = await prisma.good.findMany({ take: 10 })
*
* // Only select the `id`
* const goodWithIdOnly = await prisma.good.findMany({ select: { id: true } })
*
*/
findMany<T extends GoodFindManyArgs>(args?: Prisma.SelectSubset<T, GoodFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
/**
* Create a Good.
* @param {GoodCreateArgs} args - Arguments to create a Good.
* @example
* // Create one Good
* const Good = await prisma.good.create({
* data: {
* // ... data to create a Good
* }
* })
*
*/
create<T extends GoodCreateArgs>(args: Prisma.SelectSubset<T, GoodCreateArgs<ExtArgs>>): Prisma.Prisma__GoodClient<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Create many Goods.
* @param {GoodCreateManyArgs} args - Arguments to create many Goods.
* @example
* // Create many Goods
* const good = await prisma.good.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends GoodCreateManyArgs>(args?: Prisma.SelectSubset<T, GoodCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Delete a Good.
* @param {GoodDeleteArgs} args - Arguments to delete one Good.
* @example
* // Delete one Good
* const Good = await prisma.good.delete({
* where: {
* // ... filter to delete one Good
* }
* })
*
*/
delete<T extends GoodDeleteArgs>(args: Prisma.SelectSubset<T, GoodDeleteArgs<ExtArgs>>): Prisma.Prisma__GoodClient<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Update one Good.
* @param {GoodUpdateArgs} args - Arguments to update one Good.
* @example
* // Update one Good
* const good = await prisma.good.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends GoodUpdateArgs>(args: Prisma.SelectSubset<T, GoodUpdateArgs<ExtArgs>>): Prisma.Prisma__GoodClient<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Delete zero or more Goods.
* @param {GoodDeleteManyArgs} args - Arguments to filter Goods to delete.
* @example
* // Delete a few Goods
* const { count } = await prisma.good.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends GoodDeleteManyArgs>(args?: Prisma.SelectSubset<T, GoodDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more Goods.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {GoodUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many Goods
* const good = await prisma.good.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends GoodUpdateManyArgs>(args: Prisma.SelectSubset<T, GoodUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create or update one Good.
* @param {GoodUpsertArgs} args - Arguments to update or create a Good.
* @example
* // Update or create a Good
* const good = await prisma.good.upsert({
* create: {
* // ... data to create a Good
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the Good we want to update
* }
* })
*/
upsert<T extends GoodUpsertArgs>(args: Prisma.SelectSubset<T, GoodUpsertArgs<ExtArgs>>): Prisma.Prisma__GoodClient<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Count the number of Goods.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {GoodCountArgs} args - Arguments to filter Goods to count.
* @example
* // Count the number of Goods
* const count = await prisma.good.count({
* where: {
* // ... the filter for the Goods we want to count
* }
* })
**/
count<T extends GoodCountArgs>(
args?: Prisma.Subset<T, GoodCountArgs>,
): Prisma.PrismaPromise<
T extends runtime.Types.Utils.Record<'select', any>
? T['select'] extends true
? number
: Prisma.GetScalarType<T['select'], GoodCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a Good.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {GoodAggregateArgs} 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 GoodAggregateArgs>(args: Prisma.Subset<T, GoodAggregateArgs>): Prisma.PrismaPromise<GetGoodAggregateType<T>>
/**
* Group by Good.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {GoodGroupByArgs} 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 GoodGroupByArgs,
HasSelectOrTake extends Prisma.Or<
Prisma.Extends<'skip', Prisma.Keys<T>>,
Prisma.Extends<'take', Prisma.Keys<T>>
>,
OrderByArg extends Prisma.True extends HasSelectOrTake
? { orderBy: GoodGroupByArgs['orderBy'] }
: { orderBy?: GoodGroupByArgs['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, GoodGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetGoodGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the Good model
*/
readonly fields: GoodFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for Good.
* 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__GoodClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
category<T extends Prisma.Good$categoryArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Good$categoryArgs<ExtArgs>>): Prisma.Prisma__GoodCategoryClient<runtime.Types.Result.GetResult<Prisma.$GoodCategoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
salesInvoiceItems<T extends Prisma.Good$salesInvoiceItemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Good$salesInvoiceItemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<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 Good model
*/
export interface GoodFieldRefs {
readonly id: Prisma.FieldRef<"Good", 'Int'>
readonly name: Prisma.FieldRef<"Good", 'String'>
readonly description: Prisma.FieldRef<"Good", 'String'>
readonly sku: Prisma.FieldRef<"Good", 'String'>
readonly localSku: Prisma.FieldRef<"Good", 'String'>
readonly barcode: Prisma.FieldRef<"Good", 'String'>
readonly createdAt: Prisma.FieldRef<"Good", 'DateTime'>
readonly updatedAt: Prisma.FieldRef<"Good", 'DateTime'>
readonly deletedAt: Prisma.FieldRef<"Good", 'DateTime'>
readonly categoryId: Prisma.FieldRef<"Good", 'Int'>
readonly baseSalePrice: Prisma.FieldRef<"Good", 'Decimal'>
}
// Custom InputTypes
/**
* Good findUnique
*/
export type GoodFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Good
*/
select?: Prisma.GoodSelect<ExtArgs> | null
/**
* Omit specific fields from the Good
*/
omit?: Prisma.GoodOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.GoodInclude<ExtArgs> | null
/**
* Filter, which Good to fetch.
*/
where: Prisma.GoodWhereUniqueInput
}
/**
* Good findUniqueOrThrow
*/
export type GoodFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Good
*/
select?: Prisma.GoodSelect<ExtArgs> | null
/**
* Omit specific fields from the Good
*/
omit?: Prisma.GoodOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.GoodInclude<ExtArgs> | null
/**
* Filter, which Good to fetch.
*/
where: Prisma.GoodWhereUniqueInput
}
/**
* Good findFirst
*/
export type GoodFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Good
*/
select?: Prisma.GoodSelect<ExtArgs> | null
/**
* Omit specific fields from the Good
*/
omit?: Prisma.GoodOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.GoodInclude<ExtArgs> | null
/**
* Filter, which Good to fetch.
*/
where?: Prisma.GoodWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Goods to fetch.
*/
orderBy?: Prisma.GoodOrderByWithRelationInput | Prisma.GoodOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Goods.
*/
cursor?: Prisma.GoodWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Goods 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` Goods.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Goods.
*/
distinct?: Prisma.GoodScalarFieldEnum | Prisma.GoodScalarFieldEnum[]
}
/**
* Good findFirstOrThrow
*/
export type GoodFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Good
*/
select?: Prisma.GoodSelect<ExtArgs> | null
/**
* Omit specific fields from the Good
*/
omit?: Prisma.GoodOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.GoodInclude<ExtArgs> | null
/**
* Filter, which Good to fetch.
*/
where?: Prisma.GoodWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Goods to fetch.
*/
orderBy?: Prisma.GoodOrderByWithRelationInput | Prisma.GoodOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for Goods.
*/
cursor?: Prisma.GoodWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Goods 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` Goods.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of Goods.
*/
distinct?: Prisma.GoodScalarFieldEnum | Prisma.GoodScalarFieldEnum[]
}
/**
* Good findMany
*/
export type GoodFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Good
*/
select?: Prisma.GoodSelect<ExtArgs> | null
/**
* Omit specific fields from the Good
*/
omit?: Prisma.GoodOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.GoodInclude<ExtArgs> | null
/**
* Filter, which Goods to fetch.
*/
where?: Prisma.GoodWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of Goods to fetch.
*/
orderBy?: Prisma.GoodOrderByWithRelationInput | Prisma.GoodOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing Goods.
*/
cursor?: Prisma.GoodWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` Goods 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` Goods.
*/
skip?: number
distinct?: Prisma.GoodScalarFieldEnum | Prisma.GoodScalarFieldEnum[]
}
/**
* Good create
*/
export type GoodCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Good
*/
select?: Prisma.GoodSelect<ExtArgs> | null
/**
* Omit specific fields from the Good
*/
omit?: Prisma.GoodOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.GoodInclude<ExtArgs> | null
/**
* The data needed to create a Good.
*/
data: Prisma.XOR<Prisma.GoodCreateInput, Prisma.GoodUncheckedCreateInput>
}
/**
* Good createMany
*/
export type GoodCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to create many Goods.
*/
data: Prisma.GoodCreateManyInput | Prisma.GoodCreateManyInput[]
skipDuplicates?: boolean
}
/**
* Good update
*/
export type GoodUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Good
*/
select?: Prisma.GoodSelect<ExtArgs> | null
/**
* Omit specific fields from the Good
*/
omit?: Prisma.GoodOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.GoodInclude<ExtArgs> | null
/**
* The data needed to update a Good.
*/
data: Prisma.XOR<Prisma.GoodUpdateInput, Prisma.GoodUncheckedUpdateInput>
/**
* Choose, which Good to update.
*/
where: Prisma.GoodWhereUniqueInput
}
/**
* Good updateMany
*/
export type GoodUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to update Goods.
*/
data: Prisma.XOR<Prisma.GoodUpdateManyMutationInput, Prisma.GoodUncheckedUpdateManyInput>
/**
* Filter which Goods to update
*/
where?: Prisma.GoodWhereInput
/**
* Limit how many Goods to update.
*/
limit?: number
}
/**
* Good upsert
*/
export type GoodUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Good
*/
select?: Prisma.GoodSelect<ExtArgs> | null
/**
* Omit specific fields from the Good
*/
omit?: Prisma.GoodOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.GoodInclude<ExtArgs> | null
/**
* The filter to search for the Good to update in case it exists.
*/
where: Prisma.GoodWhereUniqueInput
/**
* In case the Good found by the `where` argument doesn't exist, create a new Good with this data.
*/
create: Prisma.XOR<Prisma.GoodCreateInput, Prisma.GoodUncheckedCreateInput>
/**
* In case the Good was found with the provided `where` argument, update it with this data.
*/
update: Prisma.XOR<Prisma.GoodUpdateInput, Prisma.GoodUncheckedUpdateInput>
}
/**
* Good delete
*/
export type GoodDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Good
*/
select?: Prisma.GoodSelect<ExtArgs> | null
/**
* Omit specific fields from the Good
*/
omit?: Prisma.GoodOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.GoodInclude<ExtArgs> | null
/**
* Filter which Good to delete.
*/
where: Prisma.GoodWhereUniqueInput
}
/**
* Good deleteMany
*/
export type GoodDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which Goods to delete
*/
where?: Prisma.GoodWhereInput
/**
* Limit how many Goods to delete.
*/
limit?: number
}
/**
* Good.category
*/
export type Good$categoryArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the GoodCategory
*/
select?: Prisma.GoodCategorySelect<ExtArgs> | null
/**
* Omit specific fields from the GoodCategory
*/
omit?: Prisma.GoodCategoryOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.GoodCategoryInclude<ExtArgs> | null
where?: Prisma.GoodCategoryWhereInput
}
/**
* Good.salesInvoiceItems
*/
export type Good$salesInvoiceItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the SalesInvoiceItem
*/
select?: Prisma.SalesInvoiceItemSelect<ExtArgs> | null
/**
* Omit specific fields from the SalesInvoiceItem
*/
omit?: Prisma.SalesInvoiceItemOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.SalesInvoiceItemInclude<ExtArgs> | null
where?: Prisma.SalesInvoiceItemWhereInput
orderBy?: Prisma.SalesInvoiceItemOrderByWithRelationInput | Prisma.SalesInvoiceItemOrderByWithRelationInput[]
cursor?: Prisma.SalesInvoiceItemWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.SalesInvoiceItemScalarFieldEnum | Prisma.SalesInvoiceItemScalarFieldEnum[]
}
/**
* Good without action
*/
export type GoodDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Good
*/
select?: Prisma.GoodSelect<ExtArgs> | null
/**
* Omit specific fields from the Good
*/
omit?: Prisma.GoodOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.GoodInclude<ExtArgs> | null
}