7cb9d7d037
- Added CreateSupplierDto for supplier creation - Added UpdateSupplierDto for supplier updates - Implemented SuppliersController to handle HTTP requests for suppliers - Created SuppliersService to manage supplier data using Prisma - Integrated SuppliersModule to encapsulate suppliers-related components
1494 lines
53 KiB
TypeScript
1494 lines
53 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 `Supplier` 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 Supplier
|
|
*
|
|
*/
|
|
export type SupplierModel = runtime.Types.Result.DefaultSelection<Prisma.$SupplierPayload>
|
|
|
|
export type AggregateSupplier = {
|
|
_count: SupplierCountAggregateOutputType | null
|
|
_avg: SupplierAvgAggregateOutputType | null
|
|
_sum: SupplierSumAggregateOutputType | null
|
|
_min: SupplierMinAggregateOutputType | null
|
|
_max: SupplierMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type SupplierAvgAggregateOutputType = {
|
|
id: number | null
|
|
}
|
|
|
|
export type SupplierSumAggregateOutputType = {
|
|
id: number | null
|
|
}
|
|
|
|
export type SupplierMinAggregateOutputType = {
|
|
id: number | null
|
|
firstName: string | null
|
|
lastName: string | null
|
|
email: string | null
|
|
mobileNumber: string | null
|
|
address: string | null
|
|
city: string | null
|
|
state: string | null
|
|
country: string | null
|
|
isActive: boolean | null
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
deletedAt: Date | null
|
|
}
|
|
|
|
export type SupplierMaxAggregateOutputType = {
|
|
id: number | null
|
|
firstName: string | null
|
|
lastName: string | null
|
|
email: string | null
|
|
mobileNumber: string | null
|
|
address: string | null
|
|
city: string | null
|
|
state: string | null
|
|
country: string | null
|
|
isActive: boolean | null
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
deletedAt: Date | null
|
|
}
|
|
|
|
export type SupplierCountAggregateOutputType = {
|
|
id: number
|
|
firstName: number
|
|
lastName: number
|
|
email: number
|
|
mobileNumber: number
|
|
address: number
|
|
city: number
|
|
state: number
|
|
country: number
|
|
isActive: number
|
|
createdAt: number
|
|
updatedAt: number
|
|
deletedAt: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type SupplierAvgAggregateInputType = {
|
|
id?: true
|
|
}
|
|
|
|
export type SupplierSumAggregateInputType = {
|
|
id?: true
|
|
}
|
|
|
|
export type SupplierMinAggregateInputType = {
|
|
id?: true
|
|
firstName?: true
|
|
lastName?: true
|
|
email?: true
|
|
mobileNumber?: true
|
|
address?: true
|
|
city?: true
|
|
state?: true
|
|
country?: true
|
|
isActive?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
deletedAt?: true
|
|
}
|
|
|
|
export type SupplierMaxAggregateInputType = {
|
|
id?: true
|
|
firstName?: true
|
|
lastName?: true
|
|
email?: true
|
|
mobileNumber?: true
|
|
address?: true
|
|
city?: true
|
|
state?: true
|
|
country?: true
|
|
isActive?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
deletedAt?: true
|
|
}
|
|
|
|
export type SupplierCountAggregateInputType = {
|
|
id?: true
|
|
firstName?: true
|
|
lastName?: true
|
|
email?: true
|
|
mobileNumber?: true
|
|
address?: true
|
|
city?: true
|
|
state?: true
|
|
country?: true
|
|
isActive?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
deletedAt?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type SupplierAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which Supplier to aggregate.
|
|
*/
|
|
where?: Prisma.SupplierWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Suppliers to fetch.
|
|
*/
|
|
orderBy?: Prisma.SupplierOrderByWithRelationInput | Prisma.SupplierOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*/
|
|
cursor?: Prisma.SupplierWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Suppliers 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` Suppliers.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned Suppliers
|
|
**/
|
|
_count?: true | SupplierCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to average
|
|
**/
|
|
_avg?: SupplierAvgAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to sum
|
|
**/
|
|
_sum?: SupplierSumAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: SupplierMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: SupplierMaxAggregateInputType
|
|
}
|
|
|
|
export type GetSupplierAggregateType<T extends SupplierAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateSupplier]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: Prisma.GetScalarType<T[P], AggregateSupplier[P]>
|
|
: Prisma.GetScalarType<T[P], AggregateSupplier[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type SupplierGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
where?: Prisma.SupplierWhereInput
|
|
orderBy?: Prisma.SupplierOrderByWithAggregationInput | Prisma.SupplierOrderByWithAggregationInput[]
|
|
by: Prisma.SupplierScalarFieldEnum[] | Prisma.SupplierScalarFieldEnum
|
|
having?: Prisma.SupplierScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: SupplierCountAggregateInputType | true
|
|
_avg?: SupplierAvgAggregateInputType
|
|
_sum?: SupplierSumAggregateInputType
|
|
_min?: SupplierMinAggregateInputType
|
|
_max?: SupplierMaxAggregateInputType
|
|
}
|
|
|
|
export type SupplierGroupByOutputType = {
|
|
id: number
|
|
firstName: string
|
|
lastName: string
|
|
email: string | null
|
|
mobileNumber: string
|
|
address: string | null
|
|
city: string | null
|
|
state: string | null
|
|
country: string | null
|
|
isActive: boolean
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
deletedAt: Date | null
|
|
_count: SupplierCountAggregateOutputType | null
|
|
_avg: SupplierAvgAggregateOutputType | null
|
|
_sum: SupplierSumAggregateOutputType | null
|
|
_min: SupplierMinAggregateOutputType | null
|
|
_max: SupplierMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetSupplierGroupByPayload<T extends SupplierGroupByArgs> = Prisma.PrismaPromise<
|
|
Array<
|
|
Prisma.PickEnumerable<SupplierGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof SupplierGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: Prisma.GetScalarType<T[P], SupplierGroupByOutputType[P]>
|
|
: Prisma.GetScalarType<T[P], SupplierGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
|
|
export type SupplierWhereInput = {
|
|
AND?: Prisma.SupplierWhereInput | Prisma.SupplierWhereInput[]
|
|
OR?: Prisma.SupplierWhereInput[]
|
|
NOT?: Prisma.SupplierWhereInput | Prisma.SupplierWhereInput[]
|
|
id?: Prisma.IntFilter<"Supplier"> | number
|
|
firstName?: Prisma.StringFilter<"Supplier"> | string
|
|
lastName?: Prisma.StringFilter<"Supplier"> | string
|
|
email?: Prisma.StringNullableFilter<"Supplier"> | string | null
|
|
mobileNumber?: Prisma.StringFilter<"Supplier"> | string
|
|
address?: Prisma.StringNullableFilter<"Supplier"> | string | null
|
|
city?: Prisma.StringNullableFilter<"Supplier"> | string | null
|
|
state?: Prisma.StringNullableFilter<"Supplier"> | string | null
|
|
country?: Prisma.StringNullableFilter<"Supplier"> | string | null
|
|
isActive?: Prisma.BoolFilter<"Supplier"> | boolean
|
|
createdAt?: Prisma.DateTimeNullableFilter<"Supplier"> | Date | string | null
|
|
updatedAt?: Prisma.DateTimeNullableFilter<"Supplier"> | Date | string | null
|
|
deletedAt?: Prisma.DateTimeNullableFilter<"Supplier"> | Date | string | null
|
|
productInfo?: Prisma.ProductInfoListRelationFilter
|
|
}
|
|
|
|
export type SupplierOrderByWithRelationInput = {
|
|
id?: Prisma.SortOrder
|
|
firstName?: Prisma.SortOrder
|
|
lastName?: Prisma.SortOrder
|
|
email?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
mobileNumber?: Prisma.SortOrder
|
|
address?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
city?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
state?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
country?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
isActive?: Prisma.SortOrder
|
|
createdAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
updatedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
productInfo?: Prisma.ProductInfoOrderByRelationAggregateInput
|
|
_relevance?: Prisma.SupplierOrderByRelevanceInput
|
|
}
|
|
|
|
export type SupplierWhereUniqueInput = Prisma.AtLeast<{
|
|
id?: number
|
|
mobileNumber?: string
|
|
AND?: Prisma.SupplierWhereInput | Prisma.SupplierWhereInput[]
|
|
OR?: Prisma.SupplierWhereInput[]
|
|
NOT?: Prisma.SupplierWhereInput | Prisma.SupplierWhereInput[]
|
|
firstName?: Prisma.StringFilter<"Supplier"> | string
|
|
lastName?: Prisma.StringFilter<"Supplier"> | string
|
|
email?: Prisma.StringNullableFilter<"Supplier"> | string | null
|
|
address?: Prisma.StringNullableFilter<"Supplier"> | string | null
|
|
city?: Prisma.StringNullableFilter<"Supplier"> | string | null
|
|
state?: Prisma.StringNullableFilter<"Supplier"> | string | null
|
|
country?: Prisma.StringNullableFilter<"Supplier"> | string | null
|
|
isActive?: Prisma.BoolFilter<"Supplier"> | boolean
|
|
createdAt?: Prisma.DateTimeNullableFilter<"Supplier"> | Date | string | null
|
|
updatedAt?: Prisma.DateTimeNullableFilter<"Supplier"> | Date | string | null
|
|
deletedAt?: Prisma.DateTimeNullableFilter<"Supplier"> | Date | string | null
|
|
productInfo?: Prisma.ProductInfoListRelationFilter
|
|
}, "id" | "mobileNumber">
|
|
|
|
export type SupplierOrderByWithAggregationInput = {
|
|
id?: Prisma.SortOrder
|
|
firstName?: Prisma.SortOrder
|
|
lastName?: Prisma.SortOrder
|
|
email?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
mobileNumber?: Prisma.SortOrder
|
|
address?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
city?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
state?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
country?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
isActive?: Prisma.SortOrder
|
|
createdAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
updatedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
_count?: Prisma.SupplierCountOrderByAggregateInput
|
|
_avg?: Prisma.SupplierAvgOrderByAggregateInput
|
|
_max?: Prisma.SupplierMaxOrderByAggregateInput
|
|
_min?: Prisma.SupplierMinOrderByAggregateInput
|
|
_sum?: Prisma.SupplierSumOrderByAggregateInput
|
|
}
|
|
|
|
export type SupplierScalarWhereWithAggregatesInput = {
|
|
AND?: Prisma.SupplierScalarWhereWithAggregatesInput | Prisma.SupplierScalarWhereWithAggregatesInput[]
|
|
OR?: Prisma.SupplierScalarWhereWithAggregatesInput[]
|
|
NOT?: Prisma.SupplierScalarWhereWithAggregatesInput | Prisma.SupplierScalarWhereWithAggregatesInput[]
|
|
id?: Prisma.IntWithAggregatesFilter<"Supplier"> | number
|
|
firstName?: Prisma.StringWithAggregatesFilter<"Supplier"> | string
|
|
lastName?: Prisma.StringWithAggregatesFilter<"Supplier"> | string
|
|
email?: Prisma.StringNullableWithAggregatesFilter<"Supplier"> | string | null
|
|
mobileNumber?: Prisma.StringWithAggregatesFilter<"Supplier"> | string
|
|
address?: Prisma.StringNullableWithAggregatesFilter<"Supplier"> | string | null
|
|
city?: Prisma.StringNullableWithAggregatesFilter<"Supplier"> | string | null
|
|
state?: Prisma.StringNullableWithAggregatesFilter<"Supplier"> | string | null
|
|
country?: Prisma.StringNullableWithAggregatesFilter<"Supplier"> | string | null
|
|
isActive?: Prisma.BoolWithAggregatesFilter<"Supplier"> | boolean
|
|
createdAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Supplier"> | Date | string | null
|
|
updatedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Supplier"> | Date | string | null
|
|
deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Supplier"> | Date | string | null
|
|
}
|
|
|
|
export type SupplierCreateInput = {
|
|
firstName: string
|
|
lastName: string
|
|
email?: string | null
|
|
mobileNumber: string
|
|
address?: string | null
|
|
city?: string | null
|
|
state?: string | null
|
|
country?: string | null
|
|
isActive?: boolean
|
|
createdAt?: Date | string | null
|
|
updatedAt?: Date | string | null
|
|
deletedAt?: Date | string | null
|
|
productInfo?: Prisma.ProductInfoCreateNestedManyWithoutSupplierInput
|
|
}
|
|
|
|
export type SupplierUncheckedCreateInput = {
|
|
id?: number
|
|
firstName: string
|
|
lastName: string
|
|
email?: string | null
|
|
mobileNumber: string
|
|
address?: string | null
|
|
city?: string | null
|
|
state?: string | null
|
|
country?: string | null
|
|
isActive?: boolean
|
|
createdAt?: Date | string | null
|
|
updatedAt?: Date | string | null
|
|
deletedAt?: Date | string | null
|
|
productInfo?: Prisma.ProductInfoUncheckedCreateNestedManyWithoutSupplierInput
|
|
}
|
|
|
|
export type SupplierUpdateInput = {
|
|
firstName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
lastName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
|
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
productInfo?: Prisma.ProductInfoUpdateManyWithoutSupplierNestedInput
|
|
}
|
|
|
|
export type SupplierUncheckedUpdateInput = {
|
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
firstName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
lastName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
|
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
productInfo?: Prisma.ProductInfoUncheckedUpdateManyWithoutSupplierNestedInput
|
|
}
|
|
|
|
export type SupplierCreateManyInput = {
|
|
id?: number
|
|
firstName: string
|
|
lastName: string
|
|
email?: string | null
|
|
mobileNumber: string
|
|
address?: string | null
|
|
city?: string | null
|
|
state?: string | null
|
|
country?: string | null
|
|
isActive?: boolean
|
|
createdAt?: Date | string | null
|
|
updatedAt?: Date | string | null
|
|
deletedAt?: Date | string | null
|
|
}
|
|
|
|
export type SupplierUpdateManyMutationInput = {
|
|
firstName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
lastName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
|
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
}
|
|
|
|
export type SupplierUncheckedUpdateManyInput = {
|
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
firstName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
lastName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
|
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
}
|
|
|
|
export type SupplierScalarRelationFilter = {
|
|
is?: Prisma.SupplierWhereInput
|
|
isNot?: Prisma.SupplierWhereInput
|
|
}
|
|
|
|
export type SupplierOrderByRelevanceInput = {
|
|
fields: Prisma.SupplierOrderByRelevanceFieldEnum | Prisma.SupplierOrderByRelevanceFieldEnum[]
|
|
sort: Prisma.SortOrder
|
|
search: string
|
|
}
|
|
|
|
export type SupplierCountOrderByAggregateInput = {
|
|
id?: Prisma.SortOrder
|
|
firstName?: Prisma.SortOrder
|
|
lastName?: Prisma.SortOrder
|
|
email?: Prisma.SortOrder
|
|
mobileNumber?: Prisma.SortOrder
|
|
address?: Prisma.SortOrder
|
|
city?: Prisma.SortOrder
|
|
state?: Prisma.SortOrder
|
|
country?: Prisma.SortOrder
|
|
isActive?: Prisma.SortOrder
|
|
createdAt?: Prisma.SortOrder
|
|
updatedAt?: Prisma.SortOrder
|
|
deletedAt?: Prisma.SortOrder
|
|
}
|
|
|
|
export type SupplierAvgOrderByAggregateInput = {
|
|
id?: Prisma.SortOrder
|
|
}
|
|
|
|
export type SupplierMaxOrderByAggregateInput = {
|
|
id?: Prisma.SortOrder
|
|
firstName?: Prisma.SortOrder
|
|
lastName?: Prisma.SortOrder
|
|
email?: Prisma.SortOrder
|
|
mobileNumber?: Prisma.SortOrder
|
|
address?: Prisma.SortOrder
|
|
city?: Prisma.SortOrder
|
|
state?: Prisma.SortOrder
|
|
country?: Prisma.SortOrder
|
|
isActive?: Prisma.SortOrder
|
|
createdAt?: Prisma.SortOrder
|
|
updatedAt?: Prisma.SortOrder
|
|
deletedAt?: Prisma.SortOrder
|
|
}
|
|
|
|
export type SupplierMinOrderByAggregateInput = {
|
|
id?: Prisma.SortOrder
|
|
firstName?: Prisma.SortOrder
|
|
lastName?: Prisma.SortOrder
|
|
email?: Prisma.SortOrder
|
|
mobileNumber?: Prisma.SortOrder
|
|
address?: Prisma.SortOrder
|
|
city?: Prisma.SortOrder
|
|
state?: Prisma.SortOrder
|
|
country?: Prisma.SortOrder
|
|
isActive?: Prisma.SortOrder
|
|
createdAt?: Prisma.SortOrder
|
|
updatedAt?: Prisma.SortOrder
|
|
deletedAt?: Prisma.SortOrder
|
|
}
|
|
|
|
export type SupplierSumOrderByAggregateInput = {
|
|
id?: Prisma.SortOrder
|
|
}
|
|
|
|
export type SupplierCreateNestedOneWithoutProductInfoInput = {
|
|
create?: Prisma.XOR<Prisma.SupplierCreateWithoutProductInfoInput, Prisma.SupplierUncheckedCreateWithoutProductInfoInput>
|
|
connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutProductInfoInput
|
|
connect?: Prisma.SupplierWhereUniqueInput
|
|
}
|
|
|
|
export type SupplierUpdateOneRequiredWithoutProductInfoNestedInput = {
|
|
create?: Prisma.XOR<Prisma.SupplierCreateWithoutProductInfoInput, Prisma.SupplierUncheckedCreateWithoutProductInfoInput>
|
|
connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutProductInfoInput
|
|
upsert?: Prisma.SupplierUpsertWithoutProductInfoInput
|
|
connect?: Prisma.SupplierWhereUniqueInput
|
|
update?: Prisma.XOR<Prisma.XOR<Prisma.SupplierUpdateToOneWithWhereWithoutProductInfoInput, Prisma.SupplierUpdateWithoutProductInfoInput>, Prisma.SupplierUncheckedUpdateWithoutProductInfoInput>
|
|
}
|
|
|
|
export type SupplierCreateWithoutProductInfoInput = {
|
|
firstName: string
|
|
lastName: string
|
|
email?: string | null
|
|
mobileNumber: string
|
|
address?: string | null
|
|
city?: string | null
|
|
state?: string | null
|
|
country?: string | null
|
|
isActive?: boolean
|
|
createdAt?: Date | string | null
|
|
updatedAt?: Date | string | null
|
|
deletedAt?: Date | string | null
|
|
}
|
|
|
|
export type SupplierUncheckedCreateWithoutProductInfoInput = {
|
|
id?: number
|
|
firstName: string
|
|
lastName: string
|
|
email?: string | null
|
|
mobileNumber: string
|
|
address?: string | null
|
|
city?: string | null
|
|
state?: string | null
|
|
country?: string | null
|
|
isActive?: boolean
|
|
createdAt?: Date | string | null
|
|
updatedAt?: Date | string | null
|
|
deletedAt?: Date | string | null
|
|
}
|
|
|
|
export type SupplierCreateOrConnectWithoutProductInfoInput = {
|
|
where: Prisma.SupplierWhereUniqueInput
|
|
create: Prisma.XOR<Prisma.SupplierCreateWithoutProductInfoInput, Prisma.SupplierUncheckedCreateWithoutProductInfoInput>
|
|
}
|
|
|
|
export type SupplierUpsertWithoutProductInfoInput = {
|
|
update: Prisma.XOR<Prisma.SupplierUpdateWithoutProductInfoInput, Prisma.SupplierUncheckedUpdateWithoutProductInfoInput>
|
|
create: Prisma.XOR<Prisma.SupplierCreateWithoutProductInfoInput, Prisma.SupplierUncheckedCreateWithoutProductInfoInput>
|
|
where?: Prisma.SupplierWhereInput
|
|
}
|
|
|
|
export type SupplierUpdateToOneWithWhereWithoutProductInfoInput = {
|
|
where?: Prisma.SupplierWhereInput
|
|
data: Prisma.XOR<Prisma.SupplierUpdateWithoutProductInfoInput, Prisma.SupplierUncheckedUpdateWithoutProductInfoInput>
|
|
}
|
|
|
|
export type SupplierUpdateWithoutProductInfoInput = {
|
|
firstName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
lastName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
|
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
}
|
|
|
|
export type SupplierUncheckedUpdateWithoutProductInfoInput = {
|
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
firstName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
lastName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
|
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
createdAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
updatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
}
|
|
|
|
|
|
/**
|
|
* Count Type SupplierCountOutputType
|
|
*/
|
|
|
|
export type SupplierCountOutputType = {
|
|
productInfo: number
|
|
}
|
|
|
|
export type SupplierCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
productInfo?: boolean | SupplierCountOutputTypeCountProductInfoArgs
|
|
}
|
|
|
|
/**
|
|
* SupplierCountOutputType without action
|
|
*/
|
|
export type SupplierCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the SupplierCountOutputType
|
|
*/
|
|
select?: Prisma.SupplierCountOutputTypeSelect<ExtArgs> | null
|
|
}
|
|
|
|
/**
|
|
* SupplierCountOutputType without action
|
|
*/
|
|
export type SupplierCountOutputTypeCountProductInfoArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
where?: Prisma.ProductInfoWhereInput
|
|
}
|
|
|
|
|
|
export type SupplierSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
|
id?: boolean
|
|
firstName?: boolean
|
|
lastName?: boolean
|
|
email?: boolean
|
|
mobileNumber?: boolean
|
|
address?: boolean
|
|
city?: boolean
|
|
state?: boolean
|
|
country?: boolean
|
|
isActive?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
deletedAt?: boolean
|
|
productInfo?: boolean | Prisma.Supplier$productInfoArgs<ExtArgs>
|
|
_count?: boolean | Prisma.SupplierCountOutputTypeDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["supplier"]>
|
|
|
|
|
|
|
|
export type SupplierSelectScalar = {
|
|
id?: boolean
|
|
firstName?: boolean
|
|
lastName?: boolean
|
|
email?: boolean
|
|
mobileNumber?: boolean
|
|
address?: boolean
|
|
city?: boolean
|
|
state?: boolean
|
|
country?: boolean
|
|
isActive?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
deletedAt?: boolean
|
|
}
|
|
|
|
export type SupplierOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "firstName" | "lastName" | "email" | "mobileNumber" | "address" | "city" | "state" | "country" | "isActive" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["supplier"]>
|
|
export type SupplierInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
productInfo?: boolean | Prisma.Supplier$productInfoArgs<ExtArgs>
|
|
_count?: boolean | Prisma.SupplierCountOutputTypeDefaultArgs<ExtArgs>
|
|
}
|
|
|
|
export type $SupplierPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
name: "Supplier"
|
|
objects: {
|
|
productInfo: Prisma.$ProductInfoPayload<ExtArgs>[]
|
|
}
|
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
|
id: number
|
|
firstName: string
|
|
lastName: string
|
|
email: string | null
|
|
mobileNumber: string
|
|
address: string | null
|
|
city: string | null
|
|
state: string | null
|
|
country: string | null
|
|
isActive: boolean
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
deletedAt: Date | null
|
|
}, ExtArgs["result"]["supplier"]>
|
|
composites: {}
|
|
}
|
|
|
|
export type SupplierGetPayload<S extends boolean | null | undefined | SupplierDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$SupplierPayload, S>
|
|
|
|
export type SupplierCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
|
|
Omit<SupplierFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
|
|
select?: SupplierCountAggregateInputType | true
|
|
}
|
|
|
|
export interface SupplierDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
|
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Supplier'], meta: { name: 'Supplier' } }
|
|
/**
|
|
* Find zero or one Supplier that matches the filter.
|
|
* @param {SupplierFindUniqueArgs} args - Arguments to find a Supplier
|
|
* @example
|
|
* // Get one Supplier
|
|
* const supplier = await prisma.supplier.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUnique<T extends SupplierFindUniqueArgs>(args: Prisma.SelectSubset<T, SupplierFindUniqueArgs<ExtArgs>>): Prisma.Prisma__SupplierClient<runtime.Types.Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find one Supplier that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {SupplierFindUniqueOrThrowArgs} args - Arguments to find a Supplier
|
|
* @example
|
|
* // Get one Supplier
|
|
* const supplier = await prisma.supplier.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUniqueOrThrow<T extends SupplierFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, SupplierFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__SupplierClient<runtime.Types.Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find the first Supplier 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 {SupplierFindFirstArgs} args - Arguments to find a Supplier
|
|
* @example
|
|
* // Get one Supplier
|
|
* const supplier = await prisma.supplier.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirst<T extends SupplierFindFirstArgs>(args?: Prisma.SelectSubset<T, SupplierFindFirstArgs<ExtArgs>>): Prisma.Prisma__SupplierClient<runtime.Types.Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find the first Supplier 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 {SupplierFindFirstOrThrowArgs} args - Arguments to find a Supplier
|
|
* @example
|
|
* // Get one Supplier
|
|
* const supplier = await prisma.supplier.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirstOrThrow<T extends SupplierFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, SupplierFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__SupplierClient<runtime.Types.Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find zero or more Suppliers 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 {SupplierFindManyArgs} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all Suppliers
|
|
* const suppliers = await prisma.supplier.findMany()
|
|
*
|
|
* // Get first 10 Suppliers
|
|
* const suppliers = await prisma.supplier.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const supplierWithIdOnly = await prisma.supplier.findMany({ select: { id: true } })
|
|
*
|
|
*/
|
|
findMany<T extends SupplierFindManyArgs>(args?: Prisma.SelectSubset<T, SupplierFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
|
|
|
|
/**
|
|
* Create a Supplier.
|
|
* @param {SupplierCreateArgs} args - Arguments to create a Supplier.
|
|
* @example
|
|
* // Create one Supplier
|
|
* const Supplier = await prisma.supplier.create({
|
|
* data: {
|
|
* // ... data to create a Supplier
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
create<T extends SupplierCreateArgs>(args: Prisma.SelectSubset<T, SupplierCreateArgs<ExtArgs>>): Prisma.Prisma__SupplierClient<runtime.Types.Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Create many Suppliers.
|
|
* @param {SupplierCreateManyArgs} args - Arguments to create many Suppliers.
|
|
* @example
|
|
* // Create many Suppliers
|
|
* const supplier = await prisma.supplier.createMany({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
*/
|
|
createMany<T extends SupplierCreateManyArgs>(args?: Prisma.SelectSubset<T, SupplierCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
|
|
|
|
/**
|
|
* Delete a Supplier.
|
|
* @param {SupplierDeleteArgs} args - Arguments to delete one Supplier.
|
|
* @example
|
|
* // Delete one Supplier
|
|
* const Supplier = await prisma.supplier.delete({
|
|
* where: {
|
|
* // ... filter to delete one Supplier
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
delete<T extends SupplierDeleteArgs>(args: Prisma.SelectSubset<T, SupplierDeleteArgs<ExtArgs>>): Prisma.Prisma__SupplierClient<runtime.Types.Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Update one Supplier.
|
|
* @param {SupplierUpdateArgs} args - Arguments to update one Supplier.
|
|
* @example
|
|
* // Update one Supplier
|
|
* const supplier = await prisma.supplier.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
update<T extends SupplierUpdateArgs>(args: Prisma.SelectSubset<T, SupplierUpdateArgs<ExtArgs>>): Prisma.Prisma__SupplierClient<runtime.Types.Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Delete zero or more Suppliers.
|
|
* @param {SupplierDeleteManyArgs} args - Arguments to filter Suppliers to delete.
|
|
* @example
|
|
* // Delete a few Suppliers
|
|
* const { count } = await prisma.supplier.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
deleteMany<T extends SupplierDeleteManyArgs>(args?: Prisma.SelectSubset<T, SupplierDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more Suppliers.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {SupplierUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many Suppliers
|
|
* const supplier = await prisma.supplier.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
updateMany<T extends SupplierUpdateManyArgs>(args: Prisma.SelectSubset<T, SupplierUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
|
|
|
|
/**
|
|
* Create or update one Supplier.
|
|
* @param {SupplierUpsertArgs} args - Arguments to update or create a Supplier.
|
|
* @example
|
|
* // Update or create a Supplier
|
|
* const supplier = await prisma.supplier.upsert({
|
|
* create: {
|
|
* // ... data to create a Supplier
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the Supplier we want to update
|
|
* }
|
|
* })
|
|
*/
|
|
upsert<T extends SupplierUpsertArgs>(args: Prisma.SelectSubset<T, SupplierUpsertArgs<ExtArgs>>): Prisma.Prisma__SupplierClient<runtime.Types.Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
|
|
/**
|
|
* Count the number of Suppliers.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {SupplierCountArgs} args - Arguments to filter Suppliers to count.
|
|
* @example
|
|
* // Count the number of Suppliers
|
|
* const count = await prisma.supplier.count({
|
|
* where: {
|
|
* // ... the filter for the Suppliers we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends SupplierCountArgs>(
|
|
args?: Prisma.Subset<T, SupplierCountArgs>,
|
|
): Prisma.PrismaPromise<
|
|
T extends runtime.Types.Utils.Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: Prisma.GetScalarType<T['select'], SupplierCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a Supplier.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {SupplierAggregateArgs} 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 SupplierAggregateArgs>(args: Prisma.Subset<T, SupplierAggregateArgs>): Prisma.PrismaPromise<GetSupplierAggregateType<T>>
|
|
|
|
/**
|
|
* Group by Supplier.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {SupplierGroupByArgs} 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 SupplierGroupByArgs,
|
|
HasSelectOrTake extends Prisma.Or<
|
|
Prisma.Extends<'skip', Prisma.Keys<T>>,
|
|
Prisma.Extends<'take', Prisma.Keys<T>>
|
|
>,
|
|
OrderByArg extends Prisma.True extends HasSelectOrTake
|
|
? { orderBy: SupplierGroupByArgs['orderBy'] }
|
|
: { orderBy?: SupplierGroupByArgs['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, SupplierGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetSupplierGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
|
/**
|
|
* Fields of the Supplier model
|
|
*/
|
|
readonly fields: SupplierFieldRefs;
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for Supplier.
|
|
* 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__SupplierClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
|
productInfo<T extends Prisma.Supplier$productInfoArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Supplier$productInfoArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ProductInfoPayload<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 Supplier model
|
|
*/
|
|
export interface SupplierFieldRefs {
|
|
readonly id: Prisma.FieldRef<"Supplier", 'Int'>
|
|
readonly firstName: Prisma.FieldRef<"Supplier", 'String'>
|
|
readonly lastName: Prisma.FieldRef<"Supplier", 'String'>
|
|
readonly email: Prisma.FieldRef<"Supplier", 'String'>
|
|
readonly mobileNumber: Prisma.FieldRef<"Supplier", 'String'>
|
|
readonly address: Prisma.FieldRef<"Supplier", 'String'>
|
|
readonly city: Prisma.FieldRef<"Supplier", 'String'>
|
|
readonly state: Prisma.FieldRef<"Supplier", 'String'>
|
|
readonly country: Prisma.FieldRef<"Supplier", 'String'>
|
|
readonly isActive: Prisma.FieldRef<"Supplier", 'Boolean'>
|
|
readonly createdAt: Prisma.FieldRef<"Supplier", 'DateTime'>
|
|
readonly updatedAt: Prisma.FieldRef<"Supplier", 'DateTime'>
|
|
readonly deletedAt: Prisma.FieldRef<"Supplier", 'DateTime'>
|
|
}
|
|
|
|
|
|
// Custom InputTypes
|
|
/**
|
|
* Supplier findUnique
|
|
*/
|
|
export type SupplierFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Supplier
|
|
*/
|
|
select?: Prisma.SupplierSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Supplier
|
|
*/
|
|
omit?: Prisma.SupplierOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.SupplierInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Supplier to fetch.
|
|
*/
|
|
where: Prisma.SupplierWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Supplier findUniqueOrThrow
|
|
*/
|
|
export type SupplierFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Supplier
|
|
*/
|
|
select?: Prisma.SupplierSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Supplier
|
|
*/
|
|
omit?: Prisma.SupplierOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.SupplierInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Supplier to fetch.
|
|
*/
|
|
where: Prisma.SupplierWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Supplier findFirst
|
|
*/
|
|
export type SupplierFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Supplier
|
|
*/
|
|
select?: Prisma.SupplierSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Supplier
|
|
*/
|
|
omit?: Prisma.SupplierOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.SupplierInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Supplier to fetch.
|
|
*/
|
|
where?: Prisma.SupplierWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Suppliers to fetch.
|
|
*/
|
|
orderBy?: Prisma.SupplierOrderByWithRelationInput | Prisma.SupplierOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Suppliers.
|
|
*/
|
|
cursor?: Prisma.SupplierWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Suppliers 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` Suppliers.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Suppliers.
|
|
*/
|
|
distinct?: Prisma.SupplierScalarFieldEnum | Prisma.SupplierScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* Supplier findFirstOrThrow
|
|
*/
|
|
export type SupplierFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Supplier
|
|
*/
|
|
select?: Prisma.SupplierSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Supplier
|
|
*/
|
|
omit?: Prisma.SupplierOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.SupplierInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Supplier to fetch.
|
|
*/
|
|
where?: Prisma.SupplierWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Suppliers to fetch.
|
|
*/
|
|
orderBy?: Prisma.SupplierOrderByWithRelationInput | Prisma.SupplierOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Suppliers.
|
|
*/
|
|
cursor?: Prisma.SupplierWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Suppliers 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` Suppliers.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Suppliers.
|
|
*/
|
|
distinct?: Prisma.SupplierScalarFieldEnum | Prisma.SupplierScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* Supplier findMany
|
|
*/
|
|
export type SupplierFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Supplier
|
|
*/
|
|
select?: Prisma.SupplierSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Supplier
|
|
*/
|
|
omit?: Prisma.SupplierOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.SupplierInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which Suppliers to fetch.
|
|
*/
|
|
where?: Prisma.SupplierWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Suppliers to fetch.
|
|
*/
|
|
orderBy?: Prisma.SupplierOrderByWithRelationInput | Prisma.SupplierOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing Suppliers.
|
|
*/
|
|
cursor?: Prisma.SupplierWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Suppliers 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` Suppliers.
|
|
*/
|
|
skip?: number
|
|
distinct?: Prisma.SupplierScalarFieldEnum | Prisma.SupplierScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* Supplier create
|
|
*/
|
|
export type SupplierCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Supplier
|
|
*/
|
|
select?: Prisma.SupplierSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Supplier
|
|
*/
|
|
omit?: Prisma.SupplierOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.SupplierInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to create a Supplier.
|
|
*/
|
|
data: Prisma.XOR<Prisma.SupplierCreateInput, Prisma.SupplierUncheckedCreateInput>
|
|
}
|
|
|
|
/**
|
|
* Supplier createMany
|
|
*/
|
|
export type SupplierCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to create many Suppliers.
|
|
*/
|
|
data: Prisma.SupplierCreateManyInput | Prisma.SupplierCreateManyInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
/**
|
|
* Supplier update
|
|
*/
|
|
export type SupplierUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Supplier
|
|
*/
|
|
select?: Prisma.SupplierSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Supplier
|
|
*/
|
|
omit?: Prisma.SupplierOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.SupplierInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to update a Supplier.
|
|
*/
|
|
data: Prisma.XOR<Prisma.SupplierUpdateInput, Prisma.SupplierUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which Supplier to update.
|
|
*/
|
|
where: Prisma.SupplierWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Supplier updateMany
|
|
*/
|
|
export type SupplierUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to update Suppliers.
|
|
*/
|
|
data: Prisma.XOR<Prisma.SupplierUpdateManyMutationInput, Prisma.SupplierUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which Suppliers to update
|
|
*/
|
|
where?: Prisma.SupplierWhereInput
|
|
/**
|
|
* Limit how many Suppliers to update.
|
|
*/
|
|
limit?: number
|
|
}
|
|
|
|
/**
|
|
* Supplier upsert
|
|
*/
|
|
export type SupplierUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Supplier
|
|
*/
|
|
select?: Prisma.SupplierSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Supplier
|
|
*/
|
|
omit?: Prisma.SupplierOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.SupplierInclude<ExtArgs> | null
|
|
/**
|
|
* The filter to search for the Supplier to update in case it exists.
|
|
*/
|
|
where: Prisma.SupplierWhereUniqueInput
|
|
/**
|
|
* In case the Supplier found by the `where` argument doesn't exist, create a new Supplier with this data.
|
|
*/
|
|
create: Prisma.XOR<Prisma.SupplierCreateInput, Prisma.SupplierUncheckedCreateInput>
|
|
/**
|
|
* In case the Supplier was found with the provided `where` argument, update it with this data.
|
|
*/
|
|
update: Prisma.XOR<Prisma.SupplierUpdateInput, Prisma.SupplierUncheckedUpdateInput>
|
|
}
|
|
|
|
/**
|
|
* Supplier delete
|
|
*/
|
|
export type SupplierDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Supplier
|
|
*/
|
|
select?: Prisma.SupplierSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Supplier
|
|
*/
|
|
omit?: Prisma.SupplierOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.SupplierInclude<ExtArgs> | null
|
|
/**
|
|
* Filter which Supplier to delete.
|
|
*/
|
|
where: Prisma.SupplierWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Supplier deleteMany
|
|
*/
|
|
export type SupplierDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which Suppliers to delete
|
|
*/
|
|
where?: Prisma.SupplierWhereInput
|
|
/**
|
|
* Limit how many Suppliers to delete.
|
|
*/
|
|
limit?: number
|
|
}
|
|
|
|
/**
|
|
* Supplier.productInfo
|
|
*/
|
|
export type Supplier$productInfoArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the ProductInfo
|
|
*/
|
|
select?: Prisma.ProductInfoSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the ProductInfo
|
|
*/
|
|
omit?: Prisma.ProductInfoOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.ProductInfoInclude<ExtArgs> | null
|
|
where?: Prisma.ProductInfoWhereInput
|
|
orderBy?: Prisma.ProductInfoOrderByWithRelationInput | Prisma.ProductInfoOrderByWithRelationInput[]
|
|
cursor?: Prisma.ProductInfoWhereUniqueInput
|
|
take?: number
|
|
skip?: number
|
|
distinct?: Prisma.ProductInfoScalarFieldEnum | Prisma.ProductInfoScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* Supplier without action
|
|
*/
|
|
export type SupplierDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the Supplier
|
|
*/
|
|
select?: Prisma.SupplierSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the Supplier
|
|
*/
|
|
omit?: Prisma.SupplierOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.SupplierInclude<ExtArgs> | null
|
|
}
|