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:
@@ -86,8 +86,8 @@ model ProductInfo {
|
||||
category ProductCategory? @relation("ProductInfo_Category", fields: [categoryId], references: [id], onUpdate: NoAction)
|
||||
categoryId Int?
|
||||
|
||||
vendor Vendor @relation("ProductInfo_Vendor", fields: [vendorId], references: [id], onUpdate: NoAction)
|
||||
vendorId Int
|
||||
supplier Supplier @relation("ProductInfo_Supplier", fields: [supplierId], references: [id], onUpdate: NoAction)
|
||||
supplierId Int
|
||||
|
||||
@@map("Product_info")
|
||||
}
|
||||
@@ -120,7 +120,7 @@ model ProductCategory {
|
||||
@@map("Product_categories")
|
||||
}
|
||||
|
||||
model Vendor {
|
||||
model Supplier {
|
||||
id Int @id @default(autoincrement())
|
||||
firstName String @db.VarChar(255)
|
||||
lastName String @db.VarChar(255)
|
||||
@@ -135,9 +135,9 @@ model Vendor {
|
||||
updatedAt 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 {
|
||||
|
||||
Reference in New Issue
Block a user