feat: implement supplier management module with create, update, find, and delete functionalities

- 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
This commit is contained in:
2025-12-05 00:01:44 +03:30
parent 621e15dd02
commit 7cb9d7d037
20 changed files with 1762 additions and 1703 deletions
@@ -0,0 +1,43 @@
/*
Warnings:
- You are about to drop the column `vendorId` on the `Product_info` table. All the data in the column will be lost.
- You are about to drop the `Vendors` table. If the table is not empty, all the data it contains will be lost.
- Added the required column `supplierId` to the `Product_info` table without a default value. This is not possible if the table is not empty.
*/
-- DropForeignKey
ALTER TABLE `Product_info` DROP FOREIGN KEY `Product_info_vendorId_fkey`;
-- DropIndex
DROP INDEX `Product_info_vendorId_fkey` ON `Product_info`;
-- AlterTable
ALTER TABLE `Product_info` DROP COLUMN `vendorId`,
ADD COLUMN `supplierId` INTEGER NOT NULL;
-- DropTable
DROP TABLE `Vendors`;
-- CreateTable
CREATE TABLE `Suppliers` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`firstName` VARCHAR(255) NOT NULL,
`lastName` VARCHAR(255) NOT NULL,
`email` VARCHAR(255) NULL,
`mobileNumber` CHAR(11) NOT NULL,
`address` TEXT NULL,
`city` VARCHAR(100) NULL,
`state` VARCHAR(100) NULL,
`country` VARCHAR(100) NULL,
`isActive` BOOLEAN NOT NULL DEFAULT true,
`createdAt` TIMESTAMP(0) NULL,
`updatedAt` TIMESTAMP(0) NULL,
`deletedAt` TIMESTAMP(0) NULL,
UNIQUE INDEX `Suppliers_mobileNumber_key`(`mobileNumber`),
PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- AddForeignKey
ALTER TABLE `Product_info` ADD CONSTRAINT `Product_info_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
+5 -5
View File
@@ -86,8 +86,8 @@ model ProductInfo {
category ProductCategory? @relation("ProductInfo_Category", fields: [categoryId], references: [id], onUpdate: NoAction) category ProductCategory? @relation("ProductInfo_Category", fields: [categoryId], references: [id], onUpdate: NoAction)
categoryId Int? categoryId Int?
vendor Vendor @relation("ProductInfo_Vendor", fields: [vendorId], references: [id], onUpdate: NoAction) supplier Supplier @relation("ProductInfo_Supplier", fields: [supplierId], references: [id], onUpdate: NoAction)
vendorId Int supplierId Int
@@map("Product_info") @@map("Product_info")
} }
@@ -120,7 +120,7 @@ model ProductCategory {
@@map("Product_categories") @@map("Product_categories")
} }
model Vendor { model Supplier {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
firstName String @db.VarChar(255) firstName String @db.VarChar(255)
lastName String @db.VarChar(255) lastName String @db.VarChar(255)
@@ -135,9 +135,9 @@ model Vendor {
updatedAt DateTime? @db.Timestamp(0) updatedAt DateTime? @db.Timestamp(0)
deletedAt DateTime? @db.Timestamp(0) deletedAt DateTime? @db.Timestamp(0)
productInfo ProductInfo[] @relation("ProductInfo_Vendor") productInfo ProductInfo[] @relation("ProductInfo_Supplier")
@@map("Vendors") @@map("Suppliers")
} }
model Customer { model Customer {
+2 -2
View File
@@ -10,8 +10,8 @@ import { ProductInfoModule } from './product-info/product-info.module'
import { ProductsModule } from './products/products.module' import { ProductsModule } from './products/products.module'
import { RolesModule } from './roles/roles.module' import { RolesModule } from './roles/roles.module'
import { StoresModule } from './stores/stores.module' import { StoresModule } from './stores/stores.module'
import { SuppliersModule } from './suppliers/suppliers.module'
import { UsersModule } from './users/users.module' import { UsersModule } from './users/users.module'
import { VendorsModule } from './vendors/vendors.module'
@Module({ @Module({
imports: [ imports: [
@@ -22,7 +22,7 @@ import { VendorsModule } from './vendors/vendors.module'
ProductInfoModule, ProductInfoModule,
ProductBrandsModule, ProductBrandsModule,
ProductCategoriesModule, ProductCategoriesModule,
VendorsModule, SuppliersModule,
CustomersModule, CustomersModule,
InventoriesModule, InventoriesModule,
StoresModule, StoresModule,
+2 -2
View File
@@ -48,10 +48,10 @@ export type ProductBrand = Prisma.ProductBrandModel
*/ */
export type ProductCategory = Prisma.ProductCategoryModel export type ProductCategory = Prisma.ProductCategoryModel
/** /**
* Model Vendor * Model Supplier
* *
*/ */
export type Vendor = Prisma.VendorModel export type Supplier = Prisma.SupplierModel
/** /**
* Model Customer * Model Customer
* *
+2 -2
View File
@@ -68,10 +68,10 @@ export type ProductBrand = Prisma.ProductBrandModel
*/ */
export type ProductCategory = Prisma.ProductCategoryModel export type ProductCategory = Prisma.ProductCategoryModel
/** /**
* Model Vendor * Model Supplier
* *
*/ */
export type Vendor = Prisma.VendorModel export type Supplier = Prisma.SupplierModel
/** /**
* Model Customer * Model Customer
* *
File diff suppressed because one or more lines are too long
@@ -390,7 +390,7 @@ export const ModelName = {
ProductInfo: 'ProductInfo', ProductInfo: 'ProductInfo',
ProductBrand: 'ProductBrand', ProductBrand: 'ProductBrand',
ProductCategory: 'ProductCategory', ProductCategory: 'ProductCategory',
Vendor: 'Vendor', Supplier: 'Supplier',
Customer: 'Customer', Customer: 'Customer',
Inventory: 'Inventory', Inventory: 'Inventory',
Store: 'Store' Store: 'Store'
@@ -409,7 +409,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
omit: GlobalOmitOptions omit: GlobalOmitOptions
} }
meta: { meta: {
modelProps: "user" | "role" | "product" | "productInfo" | "productBrand" | "productCategory" | "vendor" | "customer" | "inventory" | "store" modelProps: "user" | "role" | "product" | "productInfo" | "productBrand" | "productCategory" | "supplier" | "customer" | "inventory" | "store"
txIsolationLevel: TransactionIsolationLevel txIsolationLevel: TransactionIsolationLevel
} }
model: { model: {
@@ -809,69 +809,69 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
} }
} }
} }
Vendor: { Supplier: {
payload: Prisma.$VendorPayload<ExtArgs> payload: Prisma.$SupplierPayload<ExtArgs>
fields: Prisma.VendorFieldRefs fields: Prisma.SupplierFieldRefs
operations: { operations: {
findUnique: { findUnique: {
args: Prisma.VendorFindUniqueArgs<ExtArgs> args: Prisma.SupplierFindUniqueArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload> | null result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload> | null
} }
findUniqueOrThrow: { findUniqueOrThrow: {
args: Prisma.VendorFindUniqueOrThrowArgs<ExtArgs> args: Prisma.SupplierFindUniqueOrThrowArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload> result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload>
} }
findFirst: { findFirst: {
args: Prisma.VendorFindFirstArgs<ExtArgs> args: Prisma.SupplierFindFirstArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload> | null result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload> | null
} }
findFirstOrThrow: { findFirstOrThrow: {
args: Prisma.VendorFindFirstOrThrowArgs<ExtArgs> args: Prisma.SupplierFindFirstOrThrowArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload> result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload>
} }
findMany: { findMany: {
args: Prisma.VendorFindManyArgs<ExtArgs> args: Prisma.SupplierFindManyArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload>[] result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload>[]
} }
create: { create: {
args: Prisma.VendorCreateArgs<ExtArgs> args: Prisma.SupplierCreateArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload> result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload>
} }
createMany: { createMany: {
args: Prisma.VendorCreateManyArgs<ExtArgs> args: Prisma.SupplierCreateManyArgs<ExtArgs>
result: BatchPayload result: BatchPayload
} }
delete: { delete: {
args: Prisma.VendorDeleteArgs<ExtArgs> args: Prisma.SupplierDeleteArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload> result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload>
} }
update: { update: {
args: Prisma.VendorUpdateArgs<ExtArgs> args: Prisma.SupplierUpdateArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload> result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload>
} }
deleteMany: { deleteMany: {
args: Prisma.VendorDeleteManyArgs<ExtArgs> args: Prisma.SupplierDeleteManyArgs<ExtArgs>
result: BatchPayload result: BatchPayload
} }
updateMany: { updateMany: {
args: Prisma.VendorUpdateManyArgs<ExtArgs> args: Prisma.SupplierUpdateManyArgs<ExtArgs>
result: BatchPayload result: BatchPayload
} }
upsert: { upsert: {
args: Prisma.VendorUpsertArgs<ExtArgs> args: Prisma.SupplierUpsertArgs<ExtArgs>
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload> result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload>
} }
aggregate: { aggregate: {
args: Prisma.VendorAggregateArgs<ExtArgs> args: Prisma.SupplierAggregateArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.AggregateVendor> result: runtime.Types.Utils.Optional<Prisma.AggregateSupplier>
} }
groupBy: { groupBy: {
args: Prisma.VendorGroupByArgs<ExtArgs> args: Prisma.SupplierGroupByArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.VendorGroupByOutputType>[] result: runtime.Types.Utils.Optional<Prisma.SupplierGroupByOutputType>[]
} }
count: { count: {
args: Prisma.VendorCountArgs<ExtArgs> args: Prisma.SupplierCountArgs<ExtArgs>
result: runtime.Types.Utils.Optional<Prisma.VendorCountAggregateOutputType> | number result: runtime.Types.Utils.Optional<Prisma.SupplierCountAggregateOutputType> | number
} }
} }
} }
@@ -1171,7 +1171,7 @@ export const ProductInfoScalarFieldEnum = {
deletedAt: 'deletedAt', deletedAt: 'deletedAt',
brandId: 'brandId', brandId: 'brandId',
categoryId: 'categoryId', categoryId: 'categoryId',
vendorId: 'vendorId' supplierId: 'supplierId'
} as const } as const
export type ProductInfoScalarFieldEnum = (typeof ProductInfoScalarFieldEnum)[keyof typeof ProductInfoScalarFieldEnum] export type ProductInfoScalarFieldEnum = (typeof ProductInfoScalarFieldEnum)[keyof typeof ProductInfoScalarFieldEnum]
@@ -1203,7 +1203,7 @@ export const ProductCategoryScalarFieldEnum = {
export type ProductCategoryScalarFieldEnum = (typeof ProductCategoryScalarFieldEnum)[keyof typeof ProductCategoryScalarFieldEnum] export type ProductCategoryScalarFieldEnum = (typeof ProductCategoryScalarFieldEnum)[keyof typeof ProductCategoryScalarFieldEnum]
export const VendorScalarFieldEnum = { export const SupplierScalarFieldEnum = {
id: 'id', id: 'id',
firstName: 'firstName', firstName: 'firstName',
lastName: 'lastName', lastName: 'lastName',
@@ -1219,7 +1219,7 @@ export const VendorScalarFieldEnum = {
deletedAt: 'deletedAt' deletedAt: 'deletedAt'
} as const } as const
export type VendorScalarFieldEnum = (typeof VendorScalarFieldEnum)[keyof typeof VendorScalarFieldEnum] export type SupplierScalarFieldEnum = (typeof SupplierScalarFieldEnum)[keyof typeof SupplierScalarFieldEnum]
export const CustomerScalarFieldEnum = { export const CustomerScalarFieldEnum = {
@@ -1363,7 +1363,7 @@ export const ProductCategoryOrderByRelevanceFieldEnum = {
export type ProductCategoryOrderByRelevanceFieldEnum = (typeof ProductCategoryOrderByRelevanceFieldEnum)[keyof typeof ProductCategoryOrderByRelevanceFieldEnum] export type ProductCategoryOrderByRelevanceFieldEnum = (typeof ProductCategoryOrderByRelevanceFieldEnum)[keyof typeof ProductCategoryOrderByRelevanceFieldEnum]
export const VendorOrderByRelevanceFieldEnum = { export const SupplierOrderByRelevanceFieldEnum = {
firstName: 'firstName', firstName: 'firstName',
lastName: 'lastName', lastName: 'lastName',
email: 'email', email: 'email',
@@ -1374,7 +1374,7 @@ export const VendorOrderByRelevanceFieldEnum = {
country: 'country' country: 'country'
} as const } as const
export type VendorOrderByRelevanceFieldEnum = (typeof VendorOrderByRelevanceFieldEnum)[keyof typeof VendorOrderByRelevanceFieldEnum] export type SupplierOrderByRelevanceFieldEnum = (typeof SupplierOrderByRelevanceFieldEnum)[keyof typeof SupplierOrderByRelevanceFieldEnum]
export const CustomerOrderByRelevanceFieldEnum = { export const CustomerOrderByRelevanceFieldEnum = {
@@ -1576,7 +1576,7 @@ export type GlobalOmitConfig = {
productInfo?: Prisma.ProductInfoOmit productInfo?: Prisma.ProductInfoOmit
productBrand?: Prisma.ProductBrandOmit productBrand?: Prisma.ProductBrandOmit
productCategory?: Prisma.ProductCategoryOmit productCategory?: Prisma.ProductCategoryOmit
vendor?: Prisma.VendorOmit supplier?: Prisma.SupplierOmit
customer?: Prisma.CustomerOmit customer?: Prisma.CustomerOmit
inventory?: Prisma.InventoryOmit inventory?: Prisma.InventoryOmit
store?: Prisma.StoreOmit store?: Prisma.StoreOmit
@@ -57,7 +57,7 @@ export const ModelName = {
ProductInfo: 'ProductInfo', ProductInfo: 'ProductInfo',
ProductBrand: 'ProductBrand', ProductBrand: 'ProductBrand',
ProductCategory: 'ProductCategory', ProductCategory: 'ProductCategory',
Vendor: 'Vendor', Supplier: 'Supplier',
Customer: 'Customer', Customer: 'Customer',
Inventory: 'Inventory', Inventory: 'Inventory',
Store: 'Store' Store: 'Store'
@@ -138,7 +138,7 @@ export const ProductInfoScalarFieldEnum = {
deletedAt: 'deletedAt', deletedAt: 'deletedAt',
brandId: 'brandId', brandId: 'brandId',
categoryId: 'categoryId', categoryId: 'categoryId',
vendorId: 'vendorId' supplierId: 'supplierId'
} as const } as const
export type ProductInfoScalarFieldEnum = (typeof ProductInfoScalarFieldEnum)[keyof typeof ProductInfoScalarFieldEnum] export type ProductInfoScalarFieldEnum = (typeof ProductInfoScalarFieldEnum)[keyof typeof ProductInfoScalarFieldEnum]
@@ -170,7 +170,7 @@ export const ProductCategoryScalarFieldEnum = {
export type ProductCategoryScalarFieldEnum = (typeof ProductCategoryScalarFieldEnum)[keyof typeof ProductCategoryScalarFieldEnum] export type ProductCategoryScalarFieldEnum = (typeof ProductCategoryScalarFieldEnum)[keyof typeof ProductCategoryScalarFieldEnum]
export const VendorScalarFieldEnum = { export const SupplierScalarFieldEnum = {
id: 'id', id: 'id',
firstName: 'firstName', firstName: 'firstName',
lastName: 'lastName', lastName: 'lastName',
@@ -186,7 +186,7 @@ export const VendorScalarFieldEnum = {
deletedAt: 'deletedAt' deletedAt: 'deletedAt'
} as const } as const
export type VendorScalarFieldEnum = (typeof VendorScalarFieldEnum)[keyof typeof VendorScalarFieldEnum] export type SupplierScalarFieldEnum = (typeof SupplierScalarFieldEnum)[keyof typeof SupplierScalarFieldEnum]
export const CustomerScalarFieldEnum = { export const CustomerScalarFieldEnum = {
@@ -330,7 +330,7 @@ export const ProductCategoryOrderByRelevanceFieldEnum = {
export type ProductCategoryOrderByRelevanceFieldEnum = (typeof ProductCategoryOrderByRelevanceFieldEnum)[keyof typeof ProductCategoryOrderByRelevanceFieldEnum] export type ProductCategoryOrderByRelevanceFieldEnum = (typeof ProductCategoryOrderByRelevanceFieldEnum)[keyof typeof ProductCategoryOrderByRelevanceFieldEnum]
export const VendorOrderByRelevanceFieldEnum = { export const SupplierOrderByRelevanceFieldEnum = {
firstName: 'firstName', firstName: 'firstName',
lastName: 'lastName', lastName: 'lastName',
email: 'email', email: 'email',
@@ -341,7 +341,7 @@ export const VendorOrderByRelevanceFieldEnum = {
country: 'country' country: 'country'
} as const } as const
export type VendorOrderByRelevanceFieldEnum = (typeof VendorOrderByRelevanceFieldEnum)[keyof typeof VendorOrderByRelevanceFieldEnum] export type SupplierOrderByRelevanceFieldEnum = (typeof SupplierOrderByRelevanceFieldEnum)[keyof typeof SupplierOrderByRelevanceFieldEnum]
export const CustomerOrderByRelevanceFieldEnum = { export const CustomerOrderByRelevanceFieldEnum = {
+1 -1
View File
@@ -14,7 +14,7 @@ export type * from './models/Product.js'
export type * from './models/ProductInfo.js' export type * from './models/ProductInfo.js'
export type * from './models/ProductBrand.js' export type * from './models/ProductBrand.js'
export type * from './models/ProductCategory.js' export type * from './models/ProductCategory.js'
export type * from './models/Vendor.js' export type * from './models/Supplier.js'
export type * from './models/Customer.js' export type * from './models/Customer.js'
export type * from './models/Inventory.js' export type * from './models/Inventory.js'
export type * from './models/Store.js' export type * from './models/Store.js'
+95 -95
View File
@@ -30,14 +30,14 @@ export type ProductInfoAvgAggregateOutputType = {
id: number | null id: number | null
brandId: number | null brandId: number | null
categoryId: number | null categoryId: number | null
vendorId: number | null supplierId: number | null
} }
export type ProductInfoSumAggregateOutputType = { export type ProductInfoSumAggregateOutputType = {
id: number | null id: number | null
brandId: number | null brandId: number | null
categoryId: number | null categoryId: number | null
vendorId: number | null supplierId: number | null
} }
export type ProductInfoMinAggregateOutputType = { export type ProductInfoMinAggregateOutputType = {
@@ -50,7 +50,7 @@ export type ProductInfoMinAggregateOutputType = {
deletedAt: Date | null deletedAt: Date | null
brandId: number | null brandId: number | null
categoryId: number | null categoryId: number | null
vendorId: number | null supplierId: number | null
} }
export type ProductInfoMaxAggregateOutputType = { export type ProductInfoMaxAggregateOutputType = {
@@ -63,7 +63,7 @@ export type ProductInfoMaxAggregateOutputType = {
deletedAt: Date | null deletedAt: Date | null
brandId: number | null brandId: number | null
categoryId: number | null categoryId: number | null
vendorId: number | null supplierId: number | null
} }
export type ProductInfoCountAggregateOutputType = { export type ProductInfoCountAggregateOutputType = {
@@ -77,7 +77,7 @@ export type ProductInfoCountAggregateOutputType = {
deletedAt: number deletedAt: number
brandId: number brandId: number
categoryId: number categoryId: number
vendorId: number supplierId: number
_all: number _all: number
} }
@@ -86,14 +86,14 @@ export type ProductInfoAvgAggregateInputType = {
id?: true id?: true
brandId?: true brandId?: true
categoryId?: true categoryId?: true
vendorId?: true supplierId?: true
} }
export type ProductInfoSumAggregateInputType = { export type ProductInfoSumAggregateInputType = {
id?: true id?: true
brandId?: true brandId?: true
categoryId?: true categoryId?: true
vendorId?: true supplierId?: true
} }
export type ProductInfoMinAggregateInputType = { export type ProductInfoMinAggregateInputType = {
@@ -106,7 +106,7 @@ export type ProductInfoMinAggregateInputType = {
deletedAt?: true deletedAt?: true
brandId?: true brandId?: true
categoryId?: true categoryId?: true
vendorId?: true supplierId?: true
} }
export type ProductInfoMaxAggregateInputType = { export type ProductInfoMaxAggregateInputType = {
@@ -119,7 +119,7 @@ export type ProductInfoMaxAggregateInputType = {
deletedAt?: true deletedAt?: true
brandId?: true brandId?: true
categoryId?: true categoryId?: true
vendorId?: true supplierId?: true
} }
export type ProductInfoCountAggregateInputType = { export type ProductInfoCountAggregateInputType = {
@@ -133,7 +133,7 @@ export type ProductInfoCountAggregateInputType = {
deletedAt?: true deletedAt?: true
brandId?: true brandId?: true
categoryId?: true categoryId?: true
vendorId?: true supplierId?: true
_all?: true _all?: true
} }
@@ -234,7 +234,7 @@ export type ProductInfoGroupByOutputType = {
deletedAt: Date | null deletedAt: Date | null
brandId: number | null brandId: number | null
categoryId: number | null categoryId: number | null
vendorId: number supplierId: number
_count: ProductInfoCountAggregateOutputType | null _count: ProductInfoCountAggregateOutputType | null
_avg: ProductInfoAvgAggregateOutputType | null _avg: ProductInfoAvgAggregateOutputType | null
_sum: ProductInfoSumAggregateOutputType | null _sum: ProductInfoSumAggregateOutputType | null
@@ -271,11 +271,11 @@ export type ProductInfoWhereInput = {
deletedAt?: Prisma.DateTimeNullableFilter<"ProductInfo"> | Date | string | null deletedAt?: Prisma.DateTimeNullableFilter<"ProductInfo"> | Date | string | null
brandId?: Prisma.IntNullableFilter<"ProductInfo"> | number | null brandId?: Prisma.IntNullableFilter<"ProductInfo"> | number | null
categoryId?: Prisma.IntNullableFilter<"ProductInfo"> | number | null categoryId?: Prisma.IntNullableFilter<"ProductInfo"> | number | null
vendorId?: Prisma.IntFilter<"ProductInfo"> | number supplierId?: Prisma.IntFilter<"ProductInfo"> | number
products?: Prisma.ProductListRelationFilter products?: Prisma.ProductListRelationFilter
brand?: Prisma.XOR<Prisma.ProductBrandNullableScalarRelationFilter, Prisma.ProductBrandWhereInput> | null brand?: Prisma.XOR<Prisma.ProductBrandNullableScalarRelationFilter, Prisma.ProductBrandWhereInput> | null
category?: Prisma.XOR<Prisma.ProductCategoryNullableScalarRelationFilter, Prisma.ProductCategoryWhereInput> | null category?: Prisma.XOR<Prisma.ProductCategoryNullableScalarRelationFilter, Prisma.ProductCategoryWhereInput> | null
vendor?: Prisma.XOR<Prisma.VendorScalarRelationFilter, Prisma.VendorWhereInput> supplier?: Prisma.XOR<Prisma.SupplierScalarRelationFilter, Prisma.SupplierWhereInput>
} }
export type ProductInfoOrderByWithRelationInput = { export type ProductInfoOrderByWithRelationInput = {
@@ -289,11 +289,11 @@ export type ProductInfoOrderByWithRelationInput = {
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
brandId?: Prisma.SortOrderInput | Prisma.SortOrder brandId?: Prisma.SortOrderInput | Prisma.SortOrder
categoryId?: Prisma.SortOrderInput | Prisma.SortOrder categoryId?: Prisma.SortOrderInput | Prisma.SortOrder
vendorId?: Prisma.SortOrder supplierId?: Prisma.SortOrder
products?: Prisma.ProductOrderByRelationAggregateInput products?: Prisma.ProductOrderByRelationAggregateInput
brand?: Prisma.ProductBrandOrderByWithRelationInput brand?: Prisma.ProductBrandOrderByWithRelationInput
category?: Prisma.ProductCategoryOrderByWithRelationInput category?: Prisma.ProductCategoryOrderByWithRelationInput
vendor?: Prisma.VendorOrderByWithRelationInput supplier?: Prisma.SupplierOrderByWithRelationInput
_relevance?: Prisma.ProductInfoOrderByRelevanceInput _relevance?: Prisma.ProductInfoOrderByRelevanceInput
} }
@@ -311,11 +311,11 @@ export type ProductInfoWhereUniqueInput = Prisma.AtLeast<{
deletedAt?: Prisma.DateTimeNullableFilter<"ProductInfo"> | Date | string | null deletedAt?: Prisma.DateTimeNullableFilter<"ProductInfo"> | Date | string | null
brandId?: Prisma.IntNullableFilter<"ProductInfo"> | number | null brandId?: Prisma.IntNullableFilter<"ProductInfo"> | number | null
categoryId?: Prisma.IntNullableFilter<"ProductInfo"> | number | null categoryId?: Prisma.IntNullableFilter<"ProductInfo"> | number | null
vendorId?: Prisma.IntFilter<"ProductInfo"> | number supplierId?: Prisma.IntFilter<"ProductInfo"> | number
products?: Prisma.ProductListRelationFilter products?: Prisma.ProductListRelationFilter
brand?: Prisma.XOR<Prisma.ProductBrandNullableScalarRelationFilter, Prisma.ProductBrandWhereInput> | null brand?: Prisma.XOR<Prisma.ProductBrandNullableScalarRelationFilter, Prisma.ProductBrandWhereInput> | null
category?: Prisma.XOR<Prisma.ProductCategoryNullableScalarRelationFilter, Prisma.ProductCategoryWhereInput> | null category?: Prisma.XOR<Prisma.ProductCategoryNullableScalarRelationFilter, Prisma.ProductCategoryWhereInput> | null
vendor?: Prisma.XOR<Prisma.VendorScalarRelationFilter, Prisma.VendorWhereInput> supplier?: Prisma.XOR<Prisma.SupplierScalarRelationFilter, Prisma.SupplierWhereInput>
}, "id"> }, "id">
export type ProductInfoOrderByWithAggregationInput = { export type ProductInfoOrderByWithAggregationInput = {
@@ -329,7 +329,7 @@ export type ProductInfoOrderByWithAggregationInput = {
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
brandId?: Prisma.SortOrderInput | Prisma.SortOrder brandId?: Prisma.SortOrderInput | Prisma.SortOrder
categoryId?: Prisma.SortOrderInput | Prisma.SortOrder categoryId?: Prisma.SortOrderInput | Prisma.SortOrder
vendorId?: Prisma.SortOrder supplierId?: Prisma.SortOrder
_count?: Prisma.ProductInfoCountOrderByAggregateInput _count?: Prisma.ProductInfoCountOrderByAggregateInput
_avg?: Prisma.ProductInfoAvgOrderByAggregateInput _avg?: Prisma.ProductInfoAvgOrderByAggregateInput
_max?: Prisma.ProductInfoMaxOrderByAggregateInput _max?: Prisma.ProductInfoMaxOrderByAggregateInput
@@ -351,7 +351,7 @@ export type ProductInfoScalarWhereWithAggregatesInput = {
deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"ProductInfo"> | Date | string | null deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"ProductInfo"> | Date | string | null
brandId?: Prisma.IntNullableWithAggregatesFilter<"ProductInfo"> | number | null brandId?: Prisma.IntNullableWithAggregatesFilter<"ProductInfo"> | number | null
categoryId?: Prisma.IntNullableWithAggregatesFilter<"ProductInfo"> | number | null categoryId?: Prisma.IntNullableWithAggregatesFilter<"ProductInfo"> | number | null
vendorId?: Prisma.IntWithAggregatesFilter<"ProductInfo"> | number supplierId?: Prisma.IntWithAggregatesFilter<"ProductInfo"> | number
} }
export type ProductInfoCreateInput = { export type ProductInfoCreateInput = {
@@ -365,7 +365,7 @@ export type ProductInfoCreateInput = {
products?: Prisma.ProductCreateNestedManyWithoutProductInfoInput products?: Prisma.ProductCreateNestedManyWithoutProductInfoInput
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductInfoInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductInfoInput
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductInfoInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductInfoInput
vendor: Prisma.VendorCreateNestedOneWithoutProductInfoInput supplier: Prisma.SupplierCreateNestedOneWithoutProductInfoInput
} }
export type ProductInfoUncheckedCreateInput = { export type ProductInfoUncheckedCreateInput = {
@@ -379,7 +379,7 @@ export type ProductInfoUncheckedCreateInput = {
deletedAt?: Date | string | null deletedAt?: Date | string | null
brandId?: number | null brandId?: number | null
categoryId?: number | null categoryId?: number | null
vendorId: number supplierId: number
products?: Prisma.ProductUncheckedCreateNestedManyWithoutProductInfoInput products?: Prisma.ProductUncheckedCreateNestedManyWithoutProductInfoInput
} }
@@ -394,7 +394,7 @@ export type ProductInfoUpdateInput = {
products?: Prisma.ProductUpdateManyWithoutProductInfoNestedInput products?: Prisma.ProductUpdateManyWithoutProductInfoNestedInput
brand?: Prisma.ProductBrandUpdateOneWithoutProductInfoNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductInfoNestedInput
category?: Prisma.ProductCategoryUpdateOneWithoutProductInfoNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductInfoNestedInput
vendor?: Prisma.VendorUpdateOneRequiredWithoutProductInfoNestedInput supplier?: Prisma.SupplierUpdateOneRequiredWithoutProductInfoNestedInput
} }
export type ProductInfoUncheckedUpdateInput = { export type ProductInfoUncheckedUpdateInput = {
@@ -408,7 +408,7 @@ export type ProductInfoUncheckedUpdateInput = {
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
vendorId?: Prisma.IntFieldUpdateOperationsInput | number supplierId?: Prisma.IntFieldUpdateOperationsInput | number
products?: Prisma.ProductUncheckedUpdateManyWithoutProductInfoNestedInput products?: Prisma.ProductUncheckedUpdateManyWithoutProductInfoNestedInput
} }
@@ -423,7 +423,7 @@ export type ProductInfoCreateManyInput = {
deletedAt?: Date | string | null deletedAt?: Date | string | null
brandId?: number | null brandId?: number | null
categoryId?: number | null categoryId?: number | null
vendorId: number supplierId: number
} }
export type ProductInfoUpdateManyMutationInput = { export type ProductInfoUpdateManyMutationInput = {
@@ -447,7 +447,7 @@ export type ProductInfoUncheckedUpdateManyInput = {
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
vendorId?: Prisma.IntFieldUpdateOperationsInput | number supplierId?: Prisma.IntFieldUpdateOperationsInput | number
} }
export type ProductInfoScalarRelationFilter = { export type ProductInfoScalarRelationFilter = {
@@ -472,14 +472,14 @@ export type ProductInfoCountOrderByAggregateInput = {
deletedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrder
brandId?: Prisma.SortOrder brandId?: Prisma.SortOrder
categoryId?: Prisma.SortOrder categoryId?: Prisma.SortOrder
vendorId?: Prisma.SortOrder supplierId?: Prisma.SortOrder
} }
export type ProductInfoAvgOrderByAggregateInput = { export type ProductInfoAvgOrderByAggregateInput = {
id?: Prisma.SortOrder id?: Prisma.SortOrder
brandId?: Prisma.SortOrder brandId?: Prisma.SortOrder
categoryId?: Prisma.SortOrder categoryId?: Prisma.SortOrder
vendorId?: Prisma.SortOrder supplierId?: Prisma.SortOrder
} }
export type ProductInfoMaxOrderByAggregateInput = { export type ProductInfoMaxOrderByAggregateInput = {
@@ -492,7 +492,7 @@ export type ProductInfoMaxOrderByAggregateInput = {
deletedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrder
brandId?: Prisma.SortOrder brandId?: Prisma.SortOrder
categoryId?: Prisma.SortOrder categoryId?: Prisma.SortOrder
vendorId?: Prisma.SortOrder supplierId?: Prisma.SortOrder
} }
export type ProductInfoMinOrderByAggregateInput = { export type ProductInfoMinOrderByAggregateInput = {
@@ -505,14 +505,14 @@ export type ProductInfoMinOrderByAggregateInput = {
deletedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrder
brandId?: Prisma.SortOrder brandId?: Prisma.SortOrder
categoryId?: Prisma.SortOrder categoryId?: Prisma.SortOrder
vendorId?: Prisma.SortOrder supplierId?: Prisma.SortOrder
} }
export type ProductInfoSumOrderByAggregateInput = { export type ProductInfoSumOrderByAggregateInput = {
id?: Prisma.SortOrder id?: Prisma.SortOrder
brandId?: Prisma.SortOrder brandId?: Prisma.SortOrder
categoryId?: Prisma.SortOrder categoryId?: Prisma.SortOrder
vendorId?: Prisma.SortOrder supplierId?: Prisma.SortOrder
} }
export type ProductInfoListRelationFilter = { export type ProductInfoListRelationFilter = {
@@ -631,45 +631,45 @@ export type ProductInfoUncheckedUpdateManyWithoutCategoryNestedInput = {
deleteMany?: Prisma.ProductInfoScalarWhereInput | Prisma.ProductInfoScalarWhereInput[] deleteMany?: Prisma.ProductInfoScalarWhereInput | Prisma.ProductInfoScalarWhereInput[]
} }
export type ProductInfoCreateNestedManyWithoutVendorInput = { export type ProductInfoCreateNestedManyWithoutSupplierInput = {
create?: Prisma.XOR<Prisma.ProductInfoCreateWithoutVendorInput, Prisma.ProductInfoUncheckedCreateWithoutVendorInput> | Prisma.ProductInfoCreateWithoutVendorInput[] | Prisma.ProductInfoUncheckedCreateWithoutVendorInput[] create?: Prisma.XOR<Prisma.ProductInfoCreateWithoutSupplierInput, Prisma.ProductInfoUncheckedCreateWithoutSupplierInput> | Prisma.ProductInfoCreateWithoutSupplierInput[] | Prisma.ProductInfoUncheckedCreateWithoutSupplierInput[]
connectOrCreate?: Prisma.ProductInfoCreateOrConnectWithoutVendorInput | Prisma.ProductInfoCreateOrConnectWithoutVendorInput[] connectOrCreate?: Prisma.ProductInfoCreateOrConnectWithoutSupplierInput | Prisma.ProductInfoCreateOrConnectWithoutSupplierInput[]
createMany?: Prisma.ProductInfoCreateManyVendorInputEnvelope createMany?: Prisma.ProductInfoCreateManySupplierInputEnvelope
connect?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[] connect?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[]
} }
export type ProductInfoUncheckedCreateNestedManyWithoutVendorInput = { export type ProductInfoUncheckedCreateNestedManyWithoutSupplierInput = {
create?: Prisma.XOR<Prisma.ProductInfoCreateWithoutVendorInput, Prisma.ProductInfoUncheckedCreateWithoutVendorInput> | Prisma.ProductInfoCreateWithoutVendorInput[] | Prisma.ProductInfoUncheckedCreateWithoutVendorInput[] create?: Prisma.XOR<Prisma.ProductInfoCreateWithoutSupplierInput, Prisma.ProductInfoUncheckedCreateWithoutSupplierInput> | Prisma.ProductInfoCreateWithoutSupplierInput[] | Prisma.ProductInfoUncheckedCreateWithoutSupplierInput[]
connectOrCreate?: Prisma.ProductInfoCreateOrConnectWithoutVendorInput | Prisma.ProductInfoCreateOrConnectWithoutVendorInput[] connectOrCreate?: Prisma.ProductInfoCreateOrConnectWithoutSupplierInput | Prisma.ProductInfoCreateOrConnectWithoutSupplierInput[]
createMany?: Prisma.ProductInfoCreateManyVendorInputEnvelope createMany?: Prisma.ProductInfoCreateManySupplierInputEnvelope
connect?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[] connect?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[]
} }
export type ProductInfoUpdateManyWithoutVendorNestedInput = { export type ProductInfoUpdateManyWithoutSupplierNestedInput = {
create?: Prisma.XOR<Prisma.ProductInfoCreateWithoutVendorInput, Prisma.ProductInfoUncheckedCreateWithoutVendorInput> | Prisma.ProductInfoCreateWithoutVendorInput[] | Prisma.ProductInfoUncheckedCreateWithoutVendorInput[] create?: Prisma.XOR<Prisma.ProductInfoCreateWithoutSupplierInput, Prisma.ProductInfoUncheckedCreateWithoutSupplierInput> | Prisma.ProductInfoCreateWithoutSupplierInput[] | Prisma.ProductInfoUncheckedCreateWithoutSupplierInput[]
connectOrCreate?: Prisma.ProductInfoCreateOrConnectWithoutVendorInput | Prisma.ProductInfoCreateOrConnectWithoutVendorInput[] connectOrCreate?: Prisma.ProductInfoCreateOrConnectWithoutSupplierInput | Prisma.ProductInfoCreateOrConnectWithoutSupplierInput[]
upsert?: Prisma.ProductInfoUpsertWithWhereUniqueWithoutVendorInput | Prisma.ProductInfoUpsertWithWhereUniqueWithoutVendorInput[] upsert?: Prisma.ProductInfoUpsertWithWhereUniqueWithoutSupplierInput | Prisma.ProductInfoUpsertWithWhereUniqueWithoutSupplierInput[]
createMany?: Prisma.ProductInfoCreateManyVendorInputEnvelope createMany?: Prisma.ProductInfoCreateManySupplierInputEnvelope
set?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[] set?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[]
disconnect?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[] disconnect?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[]
delete?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[] delete?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[]
connect?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[] connect?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[]
update?: Prisma.ProductInfoUpdateWithWhereUniqueWithoutVendorInput | Prisma.ProductInfoUpdateWithWhereUniqueWithoutVendorInput[] update?: Prisma.ProductInfoUpdateWithWhereUniqueWithoutSupplierInput | Prisma.ProductInfoUpdateWithWhereUniqueWithoutSupplierInput[]
updateMany?: Prisma.ProductInfoUpdateManyWithWhereWithoutVendorInput | Prisma.ProductInfoUpdateManyWithWhereWithoutVendorInput[] updateMany?: Prisma.ProductInfoUpdateManyWithWhereWithoutSupplierInput | Prisma.ProductInfoUpdateManyWithWhereWithoutSupplierInput[]
deleteMany?: Prisma.ProductInfoScalarWhereInput | Prisma.ProductInfoScalarWhereInput[] deleteMany?: Prisma.ProductInfoScalarWhereInput | Prisma.ProductInfoScalarWhereInput[]
} }
export type ProductInfoUncheckedUpdateManyWithoutVendorNestedInput = { export type ProductInfoUncheckedUpdateManyWithoutSupplierNestedInput = {
create?: Prisma.XOR<Prisma.ProductInfoCreateWithoutVendorInput, Prisma.ProductInfoUncheckedCreateWithoutVendorInput> | Prisma.ProductInfoCreateWithoutVendorInput[] | Prisma.ProductInfoUncheckedCreateWithoutVendorInput[] create?: Prisma.XOR<Prisma.ProductInfoCreateWithoutSupplierInput, Prisma.ProductInfoUncheckedCreateWithoutSupplierInput> | Prisma.ProductInfoCreateWithoutSupplierInput[] | Prisma.ProductInfoUncheckedCreateWithoutSupplierInput[]
connectOrCreate?: Prisma.ProductInfoCreateOrConnectWithoutVendorInput | Prisma.ProductInfoCreateOrConnectWithoutVendorInput[] connectOrCreate?: Prisma.ProductInfoCreateOrConnectWithoutSupplierInput | Prisma.ProductInfoCreateOrConnectWithoutSupplierInput[]
upsert?: Prisma.ProductInfoUpsertWithWhereUniqueWithoutVendorInput | Prisma.ProductInfoUpsertWithWhereUniqueWithoutVendorInput[] upsert?: Prisma.ProductInfoUpsertWithWhereUniqueWithoutSupplierInput | Prisma.ProductInfoUpsertWithWhereUniqueWithoutSupplierInput[]
createMany?: Prisma.ProductInfoCreateManyVendorInputEnvelope createMany?: Prisma.ProductInfoCreateManySupplierInputEnvelope
set?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[] set?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[]
disconnect?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[] disconnect?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[]
delete?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[] delete?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[]
connect?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[] connect?: Prisma.ProductInfoWhereUniqueInput | Prisma.ProductInfoWhereUniqueInput[]
update?: Prisma.ProductInfoUpdateWithWhereUniqueWithoutVendorInput | Prisma.ProductInfoUpdateWithWhereUniqueWithoutVendorInput[] update?: Prisma.ProductInfoUpdateWithWhereUniqueWithoutSupplierInput | Prisma.ProductInfoUpdateWithWhereUniqueWithoutSupplierInput[]
updateMany?: Prisma.ProductInfoUpdateManyWithWhereWithoutVendorInput | Prisma.ProductInfoUpdateManyWithWhereWithoutVendorInput[] updateMany?: Prisma.ProductInfoUpdateManyWithWhereWithoutSupplierInput | Prisma.ProductInfoUpdateManyWithWhereWithoutSupplierInput[]
deleteMany?: Prisma.ProductInfoScalarWhereInput | Prisma.ProductInfoScalarWhereInput[] deleteMany?: Prisma.ProductInfoScalarWhereInput | Prisma.ProductInfoScalarWhereInput[]
} }
@@ -683,7 +683,7 @@ export type ProductInfoCreateWithoutProductsInput = {
deletedAt?: Date | string | null deletedAt?: Date | string | null
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductInfoInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductInfoInput
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductInfoInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductInfoInput
vendor: Prisma.VendorCreateNestedOneWithoutProductInfoInput supplier: Prisma.SupplierCreateNestedOneWithoutProductInfoInput
} }
export type ProductInfoUncheckedCreateWithoutProductsInput = { export type ProductInfoUncheckedCreateWithoutProductsInput = {
@@ -697,7 +697,7 @@ export type ProductInfoUncheckedCreateWithoutProductsInput = {
deletedAt?: Date | string | null deletedAt?: Date | string | null
brandId?: number | null brandId?: number | null
categoryId?: number | null categoryId?: number | null
vendorId: number supplierId: number
} }
export type ProductInfoCreateOrConnectWithoutProductsInput = { export type ProductInfoCreateOrConnectWithoutProductsInput = {
@@ -726,7 +726,7 @@ export type ProductInfoUpdateWithoutProductsInput = {
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
brand?: Prisma.ProductBrandUpdateOneWithoutProductInfoNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductInfoNestedInput
category?: Prisma.ProductCategoryUpdateOneWithoutProductInfoNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductInfoNestedInput
vendor?: Prisma.VendorUpdateOneRequiredWithoutProductInfoNestedInput supplier?: Prisma.SupplierUpdateOneRequiredWithoutProductInfoNestedInput
} }
export type ProductInfoUncheckedUpdateWithoutProductsInput = { export type ProductInfoUncheckedUpdateWithoutProductsInput = {
@@ -740,7 +740,7 @@ export type ProductInfoUncheckedUpdateWithoutProductsInput = {
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
vendorId?: Prisma.IntFieldUpdateOperationsInput | number supplierId?: Prisma.IntFieldUpdateOperationsInput | number
} }
export type ProductInfoCreateWithoutBrandInput = { export type ProductInfoCreateWithoutBrandInput = {
@@ -753,7 +753,7 @@ export type ProductInfoCreateWithoutBrandInput = {
deletedAt?: Date | string | null deletedAt?: Date | string | null
products?: Prisma.ProductCreateNestedManyWithoutProductInfoInput products?: Prisma.ProductCreateNestedManyWithoutProductInfoInput
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductInfoInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductInfoInput
vendor: Prisma.VendorCreateNestedOneWithoutProductInfoInput supplier: Prisma.SupplierCreateNestedOneWithoutProductInfoInput
} }
export type ProductInfoUncheckedCreateWithoutBrandInput = { export type ProductInfoUncheckedCreateWithoutBrandInput = {
@@ -766,7 +766,7 @@ export type ProductInfoUncheckedCreateWithoutBrandInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
categoryId?: number | null categoryId?: number | null
vendorId: number supplierId: number
products?: Prisma.ProductUncheckedCreateNestedManyWithoutProductInfoInput products?: Prisma.ProductUncheckedCreateNestedManyWithoutProductInfoInput
} }
@@ -810,7 +810,7 @@ export type ProductInfoScalarWhereInput = {
deletedAt?: Prisma.DateTimeNullableFilter<"ProductInfo"> | Date | string | null deletedAt?: Prisma.DateTimeNullableFilter<"ProductInfo"> | Date | string | null
brandId?: Prisma.IntNullableFilter<"ProductInfo"> | number | null brandId?: Prisma.IntNullableFilter<"ProductInfo"> | number | null
categoryId?: Prisma.IntNullableFilter<"ProductInfo"> | number | null categoryId?: Prisma.IntNullableFilter<"ProductInfo"> | number | null
vendorId?: Prisma.IntFilter<"ProductInfo"> | number supplierId?: Prisma.IntFilter<"ProductInfo"> | number
} }
export type ProductInfoCreateWithoutCategoryInput = { export type ProductInfoCreateWithoutCategoryInput = {
@@ -823,7 +823,7 @@ export type ProductInfoCreateWithoutCategoryInput = {
deletedAt?: Date | string | null deletedAt?: Date | string | null
products?: Prisma.ProductCreateNestedManyWithoutProductInfoInput products?: Prisma.ProductCreateNestedManyWithoutProductInfoInput
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductInfoInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductInfoInput
vendor: Prisma.VendorCreateNestedOneWithoutProductInfoInput supplier: Prisma.SupplierCreateNestedOneWithoutProductInfoInput
} }
export type ProductInfoUncheckedCreateWithoutCategoryInput = { export type ProductInfoUncheckedCreateWithoutCategoryInput = {
@@ -836,7 +836,7 @@ export type ProductInfoUncheckedCreateWithoutCategoryInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
brandId?: number | null brandId?: number | null
vendorId: number supplierId: number
products?: Prisma.ProductUncheckedCreateNestedManyWithoutProductInfoInput products?: Prisma.ProductUncheckedCreateNestedManyWithoutProductInfoInput
} }
@@ -866,7 +866,7 @@ export type ProductInfoUpdateManyWithWhereWithoutCategoryInput = {
data: Prisma.XOR<Prisma.ProductInfoUpdateManyMutationInput, Prisma.ProductInfoUncheckedUpdateManyWithoutCategoryInput> data: Prisma.XOR<Prisma.ProductInfoUpdateManyMutationInput, Prisma.ProductInfoUncheckedUpdateManyWithoutCategoryInput>
} }
export type ProductInfoCreateWithoutVendorInput = { export type ProductInfoCreateWithoutSupplierInput = {
name: string name: string
description?: string | null description?: string | null
productType?: string | null productType?: string | null
@@ -879,7 +879,7 @@ export type ProductInfoCreateWithoutVendorInput = {
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductInfoInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductInfoInput
} }
export type ProductInfoUncheckedCreateWithoutVendorInput = { export type ProductInfoUncheckedCreateWithoutSupplierInput = {
id?: number id?: number
name: string name: string
description?: string | null description?: string | null
@@ -893,30 +893,30 @@ export type ProductInfoUncheckedCreateWithoutVendorInput = {
products?: Prisma.ProductUncheckedCreateNestedManyWithoutProductInfoInput products?: Prisma.ProductUncheckedCreateNestedManyWithoutProductInfoInput
} }
export type ProductInfoCreateOrConnectWithoutVendorInput = { export type ProductInfoCreateOrConnectWithoutSupplierInput = {
where: Prisma.ProductInfoWhereUniqueInput where: Prisma.ProductInfoWhereUniqueInput
create: Prisma.XOR<Prisma.ProductInfoCreateWithoutVendorInput, Prisma.ProductInfoUncheckedCreateWithoutVendorInput> create: Prisma.XOR<Prisma.ProductInfoCreateWithoutSupplierInput, Prisma.ProductInfoUncheckedCreateWithoutSupplierInput>
} }
export type ProductInfoCreateManyVendorInputEnvelope = { export type ProductInfoCreateManySupplierInputEnvelope = {
data: Prisma.ProductInfoCreateManyVendorInput | Prisma.ProductInfoCreateManyVendorInput[] data: Prisma.ProductInfoCreateManySupplierInput | Prisma.ProductInfoCreateManySupplierInput[]
skipDuplicates?: boolean skipDuplicates?: boolean
} }
export type ProductInfoUpsertWithWhereUniqueWithoutVendorInput = { export type ProductInfoUpsertWithWhereUniqueWithoutSupplierInput = {
where: Prisma.ProductInfoWhereUniqueInput where: Prisma.ProductInfoWhereUniqueInput
update: Prisma.XOR<Prisma.ProductInfoUpdateWithoutVendorInput, Prisma.ProductInfoUncheckedUpdateWithoutVendorInput> update: Prisma.XOR<Prisma.ProductInfoUpdateWithoutSupplierInput, Prisma.ProductInfoUncheckedUpdateWithoutSupplierInput>
create: Prisma.XOR<Prisma.ProductInfoCreateWithoutVendorInput, Prisma.ProductInfoUncheckedCreateWithoutVendorInput> create: Prisma.XOR<Prisma.ProductInfoCreateWithoutSupplierInput, Prisma.ProductInfoUncheckedCreateWithoutSupplierInput>
} }
export type ProductInfoUpdateWithWhereUniqueWithoutVendorInput = { export type ProductInfoUpdateWithWhereUniqueWithoutSupplierInput = {
where: Prisma.ProductInfoWhereUniqueInput where: Prisma.ProductInfoWhereUniqueInput
data: Prisma.XOR<Prisma.ProductInfoUpdateWithoutVendorInput, Prisma.ProductInfoUncheckedUpdateWithoutVendorInput> data: Prisma.XOR<Prisma.ProductInfoUpdateWithoutSupplierInput, Prisma.ProductInfoUncheckedUpdateWithoutSupplierInput>
} }
export type ProductInfoUpdateManyWithWhereWithoutVendorInput = { export type ProductInfoUpdateManyWithWhereWithoutSupplierInput = {
where: Prisma.ProductInfoScalarWhereInput where: Prisma.ProductInfoScalarWhereInput
data: Prisma.XOR<Prisma.ProductInfoUpdateManyMutationInput, Prisma.ProductInfoUncheckedUpdateManyWithoutVendorInput> data: Prisma.XOR<Prisma.ProductInfoUpdateManyMutationInput, Prisma.ProductInfoUncheckedUpdateManyWithoutSupplierInput>
} }
export type ProductInfoCreateManyBrandInput = { export type ProductInfoCreateManyBrandInput = {
@@ -929,7 +929,7 @@ export type ProductInfoCreateManyBrandInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
categoryId?: number | null categoryId?: number | null
vendorId: number supplierId: number
} }
export type ProductInfoUpdateWithoutBrandInput = { export type ProductInfoUpdateWithoutBrandInput = {
@@ -942,7 +942,7 @@ export type ProductInfoUpdateWithoutBrandInput = {
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
products?: Prisma.ProductUpdateManyWithoutProductInfoNestedInput products?: Prisma.ProductUpdateManyWithoutProductInfoNestedInput
category?: Prisma.ProductCategoryUpdateOneWithoutProductInfoNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductInfoNestedInput
vendor?: Prisma.VendorUpdateOneRequiredWithoutProductInfoNestedInput supplier?: Prisma.SupplierUpdateOneRequiredWithoutProductInfoNestedInput
} }
export type ProductInfoUncheckedUpdateWithoutBrandInput = { export type ProductInfoUncheckedUpdateWithoutBrandInput = {
@@ -955,7 +955,7 @@ export type ProductInfoUncheckedUpdateWithoutBrandInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
vendorId?: Prisma.IntFieldUpdateOperationsInput | number supplierId?: Prisma.IntFieldUpdateOperationsInput | number
products?: Prisma.ProductUncheckedUpdateManyWithoutProductInfoNestedInput products?: Prisma.ProductUncheckedUpdateManyWithoutProductInfoNestedInput
} }
@@ -969,7 +969,7 @@ export type ProductInfoUncheckedUpdateManyWithoutBrandInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
vendorId?: Prisma.IntFieldUpdateOperationsInput | number supplierId?: Prisma.IntFieldUpdateOperationsInput | number
} }
export type ProductInfoCreateManyCategoryInput = { export type ProductInfoCreateManyCategoryInput = {
@@ -982,7 +982,7 @@ export type ProductInfoCreateManyCategoryInput = {
updatedAt?: Date | string updatedAt?: Date | string
deletedAt?: Date | string | null deletedAt?: Date | string | null
brandId?: number | null brandId?: number | null
vendorId: number supplierId: number
} }
export type ProductInfoUpdateWithoutCategoryInput = { export type ProductInfoUpdateWithoutCategoryInput = {
@@ -995,7 +995,7 @@ export type ProductInfoUpdateWithoutCategoryInput = {
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
products?: Prisma.ProductUpdateManyWithoutProductInfoNestedInput products?: Prisma.ProductUpdateManyWithoutProductInfoNestedInput
brand?: Prisma.ProductBrandUpdateOneWithoutProductInfoNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductInfoNestedInput
vendor?: Prisma.VendorUpdateOneRequiredWithoutProductInfoNestedInput supplier?: Prisma.SupplierUpdateOneRequiredWithoutProductInfoNestedInput
} }
export type ProductInfoUncheckedUpdateWithoutCategoryInput = { export type ProductInfoUncheckedUpdateWithoutCategoryInput = {
@@ -1008,7 +1008,7 @@ export type ProductInfoUncheckedUpdateWithoutCategoryInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
vendorId?: Prisma.IntFieldUpdateOperationsInput | number supplierId?: Prisma.IntFieldUpdateOperationsInput | number
products?: Prisma.ProductUncheckedUpdateManyWithoutProductInfoNestedInput products?: Prisma.ProductUncheckedUpdateManyWithoutProductInfoNestedInput
} }
@@ -1022,10 +1022,10 @@ export type ProductInfoUncheckedUpdateManyWithoutCategoryInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
vendorId?: Prisma.IntFieldUpdateOperationsInput | number supplierId?: Prisma.IntFieldUpdateOperationsInput | number
} }
export type ProductInfoCreateManyVendorInput = { export type ProductInfoCreateManySupplierInput = {
id?: number id?: number
name: string name: string
description?: string | null description?: string | null
@@ -1038,7 +1038,7 @@ export type ProductInfoCreateManyVendorInput = {
categoryId?: number | null categoryId?: number | null
} }
export type ProductInfoUpdateWithoutVendorInput = { export type ProductInfoUpdateWithoutSupplierInput = {
name?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
productType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null productType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
@@ -1051,7 +1051,7 @@ export type ProductInfoUpdateWithoutVendorInput = {
category?: Prisma.ProductCategoryUpdateOneWithoutProductInfoNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductInfoNestedInput
} }
export type ProductInfoUncheckedUpdateWithoutVendorInput = { export type ProductInfoUncheckedUpdateWithoutSupplierInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
@@ -1065,7 +1065,7 @@ export type ProductInfoUncheckedUpdateWithoutVendorInput = {
products?: Prisma.ProductUncheckedUpdateManyWithoutProductInfoNestedInput products?: Prisma.ProductUncheckedUpdateManyWithoutProductInfoNestedInput
} }
export type ProductInfoUncheckedUpdateManyWithoutVendorInput = { export type ProductInfoUncheckedUpdateManyWithoutSupplierInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string name?: Prisma.StringFieldUpdateOperationsInput | string
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
@@ -1120,11 +1120,11 @@ export type ProductInfoSelect<ExtArgs extends runtime.Types.Extensions.InternalA
deletedAt?: boolean deletedAt?: boolean
brandId?: boolean brandId?: boolean
categoryId?: boolean categoryId?: boolean
vendorId?: boolean supplierId?: boolean
products?: boolean | Prisma.ProductInfo$productsArgs<ExtArgs> products?: boolean | Prisma.ProductInfo$productsArgs<ExtArgs>
brand?: boolean | Prisma.ProductInfo$brandArgs<ExtArgs> brand?: boolean | Prisma.ProductInfo$brandArgs<ExtArgs>
category?: boolean | Prisma.ProductInfo$categoryArgs<ExtArgs> category?: boolean | Prisma.ProductInfo$categoryArgs<ExtArgs>
vendor?: boolean | Prisma.VendorDefaultArgs<ExtArgs> supplier?: boolean | Prisma.SupplierDefaultArgs<ExtArgs>
_count?: boolean | Prisma.ProductInfoCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.ProductInfoCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["productInfo"]> }, ExtArgs["result"]["productInfo"]>
@@ -1141,15 +1141,15 @@ export type ProductInfoSelectScalar = {
deletedAt?: boolean deletedAt?: boolean
brandId?: boolean brandId?: boolean
categoryId?: boolean categoryId?: boolean
vendorId?: boolean supplierId?: boolean
} }
export type ProductInfoOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "productType" | "metaData" | "createdAt" | "updatedAt" | "deletedAt" | "brandId" | "categoryId" | "vendorId", ExtArgs["result"]["productInfo"]> export type ProductInfoOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "productType" | "metaData" | "createdAt" | "updatedAt" | "deletedAt" | "brandId" | "categoryId" | "supplierId", ExtArgs["result"]["productInfo"]>
export type ProductInfoInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type ProductInfoInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
products?: boolean | Prisma.ProductInfo$productsArgs<ExtArgs> products?: boolean | Prisma.ProductInfo$productsArgs<ExtArgs>
brand?: boolean | Prisma.ProductInfo$brandArgs<ExtArgs> brand?: boolean | Prisma.ProductInfo$brandArgs<ExtArgs>
category?: boolean | Prisma.ProductInfo$categoryArgs<ExtArgs> category?: boolean | Prisma.ProductInfo$categoryArgs<ExtArgs>
vendor?: boolean | Prisma.VendorDefaultArgs<ExtArgs> supplier?: boolean | Prisma.SupplierDefaultArgs<ExtArgs>
_count?: boolean | Prisma.ProductInfoCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.ProductInfoCountOutputTypeDefaultArgs<ExtArgs>
} }
@@ -1159,7 +1159,7 @@ export type $ProductInfoPayload<ExtArgs extends runtime.Types.Extensions.Interna
products: Prisma.$ProductPayload<ExtArgs>[] products: Prisma.$ProductPayload<ExtArgs>[]
brand: Prisma.$ProductBrandPayload<ExtArgs> | null brand: Prisma.$ProductBrandPayload<ExtArgs> | null
category: Prisma.$ProductCategoryPayload<ExtArgs> | null category: Prisma.$ProductCategoryPayload<ExtArgs> | null
vendor: Prisma.$VendorPayload<ExtArgs> supplier: Prisma.$SupplierPayload<ExtArgs>
} }
scalars: runtime.Types.Extensions.GetPayloadResult<{ scalars: runtime.Types.Extensions.GetPayloadResult<{
id: number id: number
@@ -1172,7 +1172,7 @@ export type $ProductInfoPayload<ExtArgs extends runtime.Types.Extensions.Interna
deletedAt: Date | null deletedAt: Date | null
brandId: number | null brandId: number | null
categoryId: number | null categoryId: number | null
vendorId: number supplierId: number
}, ExtArgs["result"]["productInfo"]> }, ExtArgs["result"]["productInfo"]>
composites: {} composites: {}
} }
@@ -1516,7 +1516,7 @@ export interface Prisma__ProductInfoClient<T, Null = never, ExtArgs extends runt
products<T extends Prisma.ProductInfo$productsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ProductInfo$productsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> products<T extends Prisma.ProductInfo$productsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ProductInfo$productsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
brand<T extends Prisma.ProductInfo$brandArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ProductInfo$brandArgs<ExtArgs>>): Prisma.Prisma__ProductBrandClient<runtime.Types.Result.GetResult<Prisma.$ProductBrandPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> brand<T extends Prisma.ProductInfo$brandArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ProductInfo$brandArgs<ExtArgs>>): Prisma.Prisma__ProductBrandClient<runtime.Types.Result.GetResult<Prisma.$ProductBrandPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
category<T extends Prisma.ProductInfo$categoryArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ProductInfo$categoryArgs<ExtArgs>>): Prisma.Prisma__ProductCategoryClient<runtime.Types.Result.GetResult<Prisma.$ProductCategoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> category<T extends Prisma.ProductInfo$categoryArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ProductInfo$categoryArgs<ExtArgs>>): Prisma.Prisma__ProductCategoryClient<runtime.Types.Result.GetResult<Prisma.$ProductCategoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
vendor<T extends Prisma.VendorDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.VendorDefaultArgs<ExtArgs>>): Prisma.Prisma__VendorClient<runtime.Types.Result.GetResult<Prisma.$VendorPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> supplier<T extends Prisma.SupplierDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SupplierDefaultArgs<ExtArgs>>): Prisma.Prisma__SupplierClient<runtime.Types.Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
/** /**
* Attaches callbacks for the resolution and/or rejection of the Promise. * Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved. * @param onfulfilled The callback to execute when the Promise is resolved.
@@ -1556,7 +1556,7 @@ export interface ProductInfoFieldRefs {
readonly deletedAt: Prisma.FieldRef<"ProductInfo", 'DateTime'> readonly deletedAt: Prisma.FieldRef<"ProductInfo", 'DateTime'>
readonly brandId: Prisma.FieldRef<"ProductInfo", 'Int'> readonly brandId: Prisma.FieldRef<"ProductInfo", 'Int'>
readonly categoryId: Prisma.FieldRef<"ProductInfo", 'Int'> readonly categoryId: Prisma.FieldRef<"ProductInfo", 'Int'>
readonly vendorId: Prisma.FieldRef<"ProductInfo", 'Int'> readonly supplierId: Prisma.FieldRef<"ProductInfo", 'Int'>
} }
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+16
View File
@@ -24,6 +24,22 @@ async function bootstrap() {
defaultVersion: '1', defaultVersion: '1',
}) })
// Enable CORS. You can set `CORS_ORIGINS` to a comma-separated list of allowed origins.
// Defaults include common localhost origins used by front-end dev servers.
const defaultOrigins = ['http://localhost:3001']
const envOrigins = process.env.CORS_ORIGINS
? process.env.CORS_ORIGINS.split(',')
.map(s => s.trim())
.filter(Boolean)
: []
const allowedOrigins = envOrigins.length ? envOrigins : defaultOrigins
app.enableCors({
origin: allowedOrigins,
credentials: true,
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS',
allowedHeaders: 'Content-Type, Accept, Authorization, X-Requested-With, X-CSRF-Token',
})
// Register global logging and response mapping interceptors // Register global logging and response mapping interceptors
app.useGlobalInterceptors(new LoggingInterceptor(), new ResponseMappingInterceptor()) app.useGlobalInterceptors(new LoggingInterceptor(), new ResponseMappingInterceptor())
@@ -1,4 +1,4 @@
export class CreateVendorDto { export class CreateSupplierDto {
firstName: string firstName: string
lastName: string lastName: string
email?: string email?: string
@@ -1,4 +1,4 @@
export class UpdateVendorDto { export class UpdateSupplierDto {
firstName?: string firstName?: string
lastName?: string lastName?: string
email?: string email?: string
+34
View File
@@ -0,0 +1,34 @@
import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common'
import { CreateSupplierDto } from './dto/create-supplier.dto'
import { UpdateSupplierDto } from './dto/update-supplier.dto'
import { SuppliersService } from './suppliers.service'
@Controller('suppliers')
export class SuppliersController {
constructor(private readonly suppliersService: SuppliersService) {}
@Post()
create(@Body() dto: CreateSupplierDto) {
return this.suppliersService.create(dto)
}
@Get()
findAll() {
return this.suppliersService.findAll()
}
@Get(':id')
findOne(@Param('id') id: string) {
return this.suppliersService.findOne(Number(id))
}
@Patch(':id')
update(@Param('id') id: string, @Body() dto: UpdateSupplierDto) {
return this.suppliersService.update(Number(id), dto)
}
@Delete(':id')
remove(@Param('id') id: string) {
return this.suppliersService.remove(Number(id))
}
}
+11
View File
@@ -0,0 +1,11 @@
import { Module } from '@nestjs/common'
import { PrismaModule } from '../prisma/prisma.module'
import { SuppliersController } from './suppliers.controller'
import { SuppliersService } from './suppliers.service'
@Module({
imports: [PrismaModule],
controllers: [SuppliersController],
providers: [SuppliersService],
})
export class SuppliersModule {}
@@ -2,26 +2,26 @@ import { Injectable } from '@nestjs/common'
import { PrismaService } from '../prisma/prisma.service' import { PrismaService } from '../prisma/prisma.service'
@Injectable() @Injectable()
export class VendorsService { export class SuppliersService {
constructor(private prisma: PrismaService) {} constructor(private prisma: PrismaService) {}
create(data: any) { create(data: any) {
return this.prisma.vendor.create({ data }) return this.prisma.supplier.create({ data })
} }
findAll() { findAll() {
return this.prisma.vendor.findMany() return this.prisma.supplier.findMany()
} }
findOne(id: number) { findOne(id: number) {
return this.prisma.vendor.findUnique({ where: { id } }) return this.prisma.supplier.findUnique({ where: { id } })
} }
update(id: number, data: any) { update(id: number, data: any) {
return this.prisma.vendor.update({ where: { id }, data }) return this.prisma.supplier.update({ where: { id }, data })
} }
remove(id: number) { remove(id: number) {
return this.prisma.vendor.delete({ where: { id } }) return this.prisma.supplier.delete({ where: { id } })
} }
} }
-34
View File
@@ -1,34 +0,0 @@
import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common'
import { CreateVendorDto } from './dto/create-vendor.dto'
import { UpdateVendorDto } from './dto/update-vendor.dto'
import { VendorsService } from './vendors.service'
@Controller('vendors')
export class VendorsController {
constructor(private readonly vendorsService: VendorsService) {}
@Post()
create(@Body() dto: CreateVendorDto) {
return this.vendorsService.create(dto)
}
@Get()
findAll() {
return this.vendorsService.findAll()
}
@Get(':id')
findOne(@Param('id') id: string) {
return this.vendorsService.findOne(Number(id))
}
@Patch(':id')
update(@Param('id') id: string, @Body() dto: UpdateVendorDto) {
return this.vendorsService.update(Number(id), dto)
}
@Delete(':id')
remove(@Param('id') id: string) {
return this.vendorsService.remove(Number(id))
}
}
-11
View File
@@ -1,11 +0,0 @@
import { Module } from '@nestjs/common'
import { PrismaModule } from '../prisma/prisma.module'
import { VendorsController } from './vendors.controller'
import { VendorsService } from './vendors.service'
@Module({
imports: [PrismaModule],
controllers: [VendorsController],
providers: [VendorsService],
})
export class VendorsModule {}