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:
File diff suppressed because one or more lines are too long
@@ -390,7 +390,7 @@ export const ModelName = {
|
||||
ProductInfo: 'ProductInfo',
|
||||
ProductBrand: 'ProductBrand',
|
||||
ProductCategory: 'ProductCategory',
|
||||
Vendor: 'Vendor',
|
||||
Supplier: 'Supplier',
|
||||
Customer: 'Customer',
|
||||
Inventory: 'Inventory',
|
||||
Store: 'Store'
|
||||
@@ -409,7 +409,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
omit: GlobalOmitOptions
|
||||
}
|
||||
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
|
||||
}
|
||||
model: {
|
||||
@@ -809,69 +809,69 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendor: {
|
||||
payload: Prisma.$VendorPayload<ExtArgs>
|
||||
fields: Prisma.VendorFieldRefs
|
||||
Supplier: {
|
||||
payload: Prisma.$SupplierPayload<ExtArgs>
|
||||
fields: Prisma.SupplierFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.VendorFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload> | null
|
||||
args: Prisma.SupplierFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.VendorFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload>
|
||||
args: Prisma.SupplierFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.VendorFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload> | null
|
||||
args: Prisma.SupplierFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.VendorFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload>
|
||||
args: Prisma.SupplierFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.VendorFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload>[]
|
||||
args: Prisma.SupplierFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.VendorCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload>
|
||||
args: Prisma.SupplierCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.VendorCreateManyArgs<ExtArgs>
|
||||
args: Prisma.SupplierCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.VendorDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload>
|
||||
args: Prisma.SupplierDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.VendorUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload>
|
||||
args: Prisma.SupplierUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.VendorDeleteManyArgs<ExtArgs>
|
||||
args: Prisma.SupplierDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.VendorUpdateManyArgs<ExtArgs>
|
||||
args: Prisma.SupplierUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.VendorUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$VendorPayload>
|
||||
args: Prisma.SupplierUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$SupplierPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.VendorAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateVendor>
|
||||
args: Prisma.SupplierAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateSupplier>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.VendorGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.VendorGroupByOutputType>[]
|
||||
args: Prisma.SupplierGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.SupplierGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.VendorCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.VendorCountAggregateOutputType> | number
|
||||
args: Prisma.SupplierCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.SupplierCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1171,7 +1171,7 @@ export const ProductInfoScalarFieldEnum = {
|
||||
deletedAt: 'deletedAt',
|
||||
brandId: 'brandId',
|
||||
categoryId: 'categoryId',
|
||||
vendorId: 'vendorId'
|
||||
supplierId: 'supplierId'
|
||||
} as const
|
||||
|
||||
export type ProductInfoScalarFieldEnum = (typeof ProductInfoScalarFieldEnum)[keyof typeof ProductInfoScalarFieldEnum]
|
||||
@@ -1203,7 +1203,7 @@ export const ProductCategoryScalarFieldEnum = {
|
||||
export type ProductCategoryScalarFieldEnum = (typeof ProductCategoryScalarFieldEnum)[keyof typeof ProductCategoryScalarFieldEnum]
|
||||
|
||||
|
||||
export const VendorScalarFieldEnum = {
|
||||
export const SupplierScalarFieldEnum = {
|
||||
id: 'id',
|
||||
firstName: 'firstName',
|
||||
lastName: 'lastName',
|
||||
@@ -1219,7 +1219,7 @@ export const VendorScalarFieldEnum = {
|
||||
deletedAt: 'deletedAt'
|
||||
} as const
|
||||
|
||||
export type VendorScalarFieldEnum = (typeof VendorScalarFieldEnum)[keyof typeof VendorScalarFieldEnum]
|
||||
export type SupplierScalarFieldEnum = (typeof SupplierScalarFieldEnum)[keyof typeof SupplierScalarFieldEnum]
|
||||
|
||||
|
||||
export const CustomerScalarFieldEnum = {
|
||||
@@ -1363,7 +1363,7 @@ export const ProductCategoryOrderByRelevanceFieldEnum = {
|
||||
export type ProductCategoryOrderByRelevanceFieldEnum = (typeof ProductCategoryOrderByRelevanceFieldEnum)[keyof typeof ProductCategoryOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const VendorOrderByRelevanceFieldEnum = {
|
||||
export const SupplierOrderByRelevanceFieldEnum = {
|
||||
firstName: 'firstName',
|
||||
lastName: 'lastName',
|
||||
email: 'email',
|
||||
@@ -1374,7 +1374,7 @@ export const VendorOrderByRelevanceFieldEnum = {
|
||||
country: 'country'
|
||||
} as const
|
||||
|
||||
export type VendorOrderByRelevanceFieldEnum = (typeof VendorOrderByRelevanceFieldEnum)[keyof typeof VendorOrderByRelevanceFieldEnum]
|
||||
export type SupplierOrderByRelevanceFieldEnum = (typeof SupplierOrderByRelevanceFieldEnum)[keyof typeof SupplierOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const CustomerOrderByRelevanceFieldEnum = {
|
||||
@@ -1576,7 +1576,7 @@ export type GlobalOmitConfig = {
|
||||
productInfo?: Prisma.ProductInfoOmit
|
||||
productBrand?: Prisma.ProductBrandOmit
|
||||
productCategory?: Prisma.ProductCategoryOmit
|
||||
vendor?: Prisma.VendorOmit
|
||||
supplier?: Prisma.SupplierOmit
|
||||
customer?: Prisma.CustomerOmit
|
||||
inventory?: Prisma.InventoryOmit
|
||||
store?: Prisma.StoreOmit
|
||||
|
||||
@@ -57,7 +57,7 @@ export const ModelName = {
|
||||
ProductInfo: 'ProductInfo',
|
||||
ProductBrand: 'ProductBrand',
|
||||
ProductCategory: 'ProductCategory',
|
||||
Vendor: 'Vendor',
|
||||
Supplier: 'Supplier',
|
||||
Customer: 'Customer',
|
||||
Inventory: 'Inventory',
|
||||
Store: 'Store'
|
||||
@@ -138,7 +138,7 @@ export const ProductInfoScalarFieldEnum = {
|
||||
deletedAt: 'deletedAt',
|
||||
brandId: 'brandId',
|
||||
categoryId: 'categoryId',
|
||||
vendorId: 'vendorId'
|
||||
supplierId: 'supplierId'
|
||||
} as const
|
||||
|
||||
export type ProductInfoScalarFieldEnum = (typeof ProductInfoScalarFieldEnum)[keyof typeof ProductInfoScalarFieldEnum]
|
||||
@@ -170,7 +170,7 @@ export const ProductCategoryScalarFieldEnum = {
|
||||
export type ProductCategoryScalarFieldEnum = (typeof ProductCategoryScalarFieldEnum)[keyof typeof ProductCategoryScalarFieldEnum]
|
||||
|
||||
|
||||
export const VendorScalarFieldEnum = {
|
||||
export const SupplierScalarFieldEnum = {
|
||||
id: 'id',
|
||||
firstName: 'firstName',
|
||||
lastName: 'lastName',
|
||||
@@ -186,7 +186,7 @@ export const VendorScalarFieldEnum = {
|
||||
deletedAt: 'deletedAt'
|
||||
} as const
|
||||
|
||||
export type VendorScalarFieldEnum = (typeof VendorScalarFieldEnum)[keyof typeof VendorScalarFieldEnum]
|
||||
export type SupplierScalarFieldEnum = (typeof SupplierScalarFieldEnum)[keyof typeof SupplierScalarFieldEnum]
|
||||
|
||||
|
||||
export const CustomerScalarFieldEnum = {
|
||||
@@ -330,7 +330,7 @@ export const ProductCategoryOrderByRelevanceFieldEnum = {
|
||||
export type ProductCategoryOrderByRelevanceFieldEnum = (typeof ProductCategoryOrderByRelevanceFieldEnum)[keyof typeof ProductCategoryOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const VendorOrderByRelevanceFieldEnum = {
|
||||
export const SupplierOrderByRelevanceFieldEnum = {
|
||||
firstName: 'firstName',
|
||||
lastName: 'lastName',
|
||||
email: 'email',
|
||||
@@ -341,7 +341,7 @@ export const VendorOrderByRelevanceFieldEnum = {
|
||||
country: 'country'
|
||||
} as const
|
||||
|
||||
export type VendorOrderByRelevanceFieldEnum = (typeof VendorOrderByRelevanceFieldEnum)[keyof typeof VendorOrderByRelevanceFieldEnum]
|
||||
export type SupplierOrderByRelevanceFieldEnum = (typeof SupplierOrderByRelevanceFieldEnum)[keyof typeof SupplierOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const CustomerOrderByRelevanceFieldEnum = {
|
||||
|
||||
Reference in New Issue
Block a user