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
+5 -5
View File
@@ -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 {