Erweiterung der Produktpflege

This commit is contained in:
2026-08-27 15:31:50 +02:00
parent b2ce536723
commit cdf7a538c1
240 changed files with 8264 additions and 6420 deletions
+6 -3
View File
@@ -31,14 +31,14 @@ func InitHttpServer(config *viper.Viper, dbHandler *sql.DB) HttpServer {
productGroupRepository := repositories.NewProductGroupRepository(dbHandler, valueRepository)
productRepository := repositories.NewProductRepository(dbHandler, productGroupRepository, valueRepository)
importRepository := repositories.NewImportRepository(dbHandler, productGroupRepository, productRepository, valueRepository)
bomRepository := repositories.NewBOMRepository(dbHandler, productRepository)
bomRepository := repositories.NewBomRepository(dbHandler, productRepository)
// service initialisation:
valueService := services.NewValueService(valueRepository)
productGroupService := services.NewProductGroupService(productGroupRepository)
productService := services.NewProductService(productRepository)
importService := services.NewImportService(importRepository)
bomService := services.NewBOMService(bomRepository)
bomService := services.NewBomService(bomRepository)
// controller initialisation:
valueController := controller.NewValueController(valueService)
@@ -69,6 +69,8 @@ func InitHttpServer(config *viper.Viper, dbHandler *sql.DB) HttpServer {
router.GET("/getValuesFromPropertyTypeId/:propertyTypeId", valueController.GetValuesFromPropertyTypeId) // get all Values from PropertyType by ID
router.GET("/getValuesFromPropertyId/:propertyId", valueController.GetValuesFromPropertyId) // get all Values from Property by ID
router.DELETE("/deleteValueFromPropertyId/:valueId/:propertyId", valueController.DeleteValueFromPropertyId) // delete Value from Property by ID
router.POST("/createValueForPropertyId/:propertyId", valueController.CreateValueForPropertyId) // create Value for Property by ID
router.PUT("/updateValue", valueController.UpdateValue) // update Value
router.GET("/getValue/:id", valueController.GetValue)
router.POST("/SetTerminalValueForProperty/:propertyId/:value", valueController.SetTerminalValueForProperty) // set Terminal Value for Property
@@ -101,8 +103,9 @@ func InitHttpServer(config *viper.Viper, dbHandler *sql.DB) HttpServer {
router.PUT("/updateBillOfMaterial", bomController.UpdateBillOfMaterial)
router.DELETE("/deleteBillOfMaterial/:id", bomController.DeleteBillOfMaterial)
router.GET("/getBillOfMaterial/:id", bomController.GetBillOfMaterial)
router.GET("/getBOMProductsByBOMId/:bomId", bomController.GetBOMProductsByBOMId) // get all BOMContents by BOM ID
router.GET("/getBOMContentByProductId/:productId", bomController.GetBOMByProductID) // get all BOMContents by Product ID
router.GET("/getBOMVariantNodesByBOMId/:bomId", bomController.GetBOMVariantNodesByBOMId) // get all VariantNodes by BOM ID
router.GET("/getBOMContentByBOMId/:bomId", bomController.GetBOMContentByBOMId) // get all BOMContents by BOM ID
router.POST("/createVariantNode/:bomId", bomController.CreateVariantNode)
router.PUT("/updateVariantNode", bomController.UpdateVariantNode)
router.DELETE("/deleteVariantNode/:id", bomController.DeleteVariantNode)