Index: src/main/java/com/example/autopartz/config/WebSecurityConfig.java
===================================================================
--- src/main/java/com/example/autopartz/config/WebSecurityConfig.java	(revision 37966cf00fbfc4db7cc68d3399425a8c319f4305)
+++ src/main/java/com/example/autopartz/config/WebSecurityConfig.java	(revision 780ede417156546c6015d3094dc2f58c5f8bc0db)
@@ -30,5 +30,5 @@
                 .antMatchers("/", "/products", "/services", "/filtered", "/login", "/register","/registerWarehouseman","/finishRegister","/test/*","/access_denied","/carCategoryReport","/partManufacturersReport","/mostPurchasedPart").permitAll()
                 .antMatchers("/orders","/repairs","/reviews","/part/*","/currentOrder","/addCarSampleForUser","/repairs/addReview/*").hasRole("CLIENT")
-                .antMatchers("/viewUsers","/approve/*","/addPart").hasRole("ADMIN")
+                .antMatchers("/viewUsers","/approve/*","/addPart","/addCarManufacturer","/addPartManufacturer","/addCategory","/addCar","/addRepairShop","/addWarehouse").hasRole("ADMIN")
                 .antMatchers("/myWarehouseReport","myWarehouse").hasRole("WAREHOUSEMAN")
                 .anyRequest()
Index: src/main/java/com/example/autopartz/controller/AdminController.java
===================================================================
--- src/main/java/com/example/autopartz/controller/AdminController.java	(revision 37966cf00fbfc4db7cc68d3399425a8c319f4305)
+++ src/main/java/com/example/autopartz/controller/AdminController.java	(revision 780ede417156546c6015d3094dc2f58c5f8bc0db)
@@ -5,4 +5,5 @@
 import com.example.autopartz.model.manytomany.PartIsFromCategory;
 import com.example.autopartz.model.manytomany.PartIsInStockInWarehouse;
+import com.example.autopartz.model.manytomany.RsForCm;
 import com.example.autopartz.repository.*;
 import com.example.autopartz.service.PriceService;
@@ -15,5 +16,4 @@
 import java.io.IOException;
 import java.time.LocalDate;
-import java.time.LocalDateTime;
 import java.util.List;
 import java.util.Objects;
@@ -23,4 +23,5 @@
 public class AdminController {
     private final UserService userService;
+    private final CarManufacturerRepository carManufacturerRepository;
     private final PartIsFromCategoryRepository partIsFromCategoryRepository;
     private final PartIsAppropriateForCarRepository partIsAppropriateForCarRepository;
@@ -34,7 +35,10 @@
     private final PartManufacturerRepository partManufacturerRepository;
     private final PriceService priceService;
-
-    public AdminController(UserService userService, PartIsFromCategoryRepository partIsFromCategoryRepository, PartIsAppropriateForCarRepository partIsAppropriateForCarRepository, WarehousemanRepository warehousemanRepository, PartIsInStockInWarehouseRepository partIsInStockInWarehouseRepository, DeliverymanRepository deliverymanRepository, CategoryRepository categoryRepository, PartRepository partRepository, WarehouseRepository warehouseRepository, CarRepository carRepository, PartManufacturerRepository partManufacturerRepository, PriceService priceService) {
+    private final RepairShopRepository repairShopRepository;
+    private final RsForCmRepository rsForCmRepository;
+
+    public AdminController(UserService userService, CarManufacturerRepository carManufacturerRepository, PartIsFromCategoryRepository partIsFromCategoryRepository, PartIsAppropriateForCarRepository partIsAppropriateForCarRepository, WarehousemanRepository warehousemanRepository, PartIsInStockInWarehouseRepository partIsInStockInWarehouseRepository, DeliverymanRepository deliverymanRepository, CategoryRepository categoryRepository, PartRepository partRepository, WarehouseRepository warehouseRepository, CarRepository carRepository, PartManufacturerRepository partManufacturerRepository, PriceService priceService, RepairShopRepository repairShopRepository, RsForCmRepository rsForCmRepository) {
         this.userService = userService;
+        this.carManufacturerRepository = carManufacturerRepository;
         this.partIsFromCategoryRepository = partIsFromCategoryRepository;
         this.partIsAppropriateForCarRepository = partIsAppropriateForCarRepository;
@@ -48,4 +52,6 @@
         this.partManufacturerRepository = partManufacturerRepository;
         this.priceService = priceService;
+        this.repairShopRepository = repairShopRepository;
+        this.rsForCmRepository = rsForCmRepository;
     }
 
@@ -115,3 +121,100 @@
         }
     }
+    @GetMapping("/addCarManufacturer")
+    public String getCarManView(Model model){
+        model.addAttribute("bodyContent","addCarManufacturer");
+        return "master-template";
+    }
+    @PostMapping("/addCarManufacturer")
+    public void saveCarManufacturer(@RequestParam String name,@RequestParam String location,
+                                    Model model, HttpServletResponse response) {
+        carManufacturerRepository.save(new CarManufacturer(name,location));
+        try {
+            response.sendRedirect("/");
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+    @GetMapping("/addPartManufacturer")
+    public String getPartManView(Model model){
+        model.addAttribute("bodyContent","addPartManufacturer");
+        return "master-template";
+    }
+    @PostMapping("/addPartManufacturer")
+    public void savePartManufacturer(@RequestParam String name,@RequestParam String location,
+                                    Model model, HttpServletResponse response) {
+        partManufacturerRepository.save(new PartManufacturer(name,location));
+        try {
+            response.sendRedirect("/");
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+    @GetMapping("/addCategory")
+    public String getCategoryView(Model model){
+        model.addAttribute("bodyContent","addCategory");
+        return "master-template";
+    }
+    @PostMapping("/addCategory")
+    public void saveCategory(@RequestParam String name,
+                                    Model model, HttpServletResponse response) {
+        categoryRepository.save(new Category(name));
+        try {
+            response.sendRedirect("/");
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+    @GetMapping("/addCar")
+    public String getCarView(Model model){
+        model.addAttribute("bodyContent","addCar");
+        model.addAttribute("manufacturers",carManufacturerRepository.findAll());
+        return "master-template";
+    }
+    @PostMapping("/addCar")
+    public void saveCar(@RequestParam Integer since,@RequestParam Integer till,
+                             @RequestParam String name,@RequestParam Integer mId,
+                                HttpServletResponse response) {
+        carRepository.save(new Car(since,till,name,carManufacturerRepository.findById(mId).get()));
+        try {
+            response.sendRedirect("/");
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+    @GetMapping("/addRepairShop")
+    public String getRepairShopView(Model model){
+        model.addAttribute("bodyContent","addRepairShop");
+        model.addAttribute("manufacturers",carManufacturerRepository.findAll());
+        return "master-template";
+    }
+    @PostMapping("/addRepairShop")
+    public void saveRepairShop(@RequestParam String name,@RequestParam String location,
+                        @RequestParam String number,@RequestParam Integer carMId,
+                        HttpServletResponse response) {
+        RepairShop newRs = new RepairShop(name,location,number,
+                List.of(carManufacturerRepository.findById(carMId).get()));
+        repairShopRepository.save(newRs);
+        rsForCmRepository.save(new RsForCm(newRs.getId(), carMId));
+        try {
+            response.sendRedirect("/");
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+    @GetMapping("/addWarehouse")
+    public String getWarehouseView(Model model){
+        model.addAttribute("bodyContent","addWarehouse");
+        return "master-template";
+    }
+    @PostMapping("/addWarehouse")
+    public void saveWarehouse(@RequestParam String name,
+                        HttpServletResponse response) {
+        warehouseRepository.save(new Warehouse(name));
+        try {
+            response.sendRedirect("/");
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
 }
Index: src/main/java/com/example/autopartz/controller/PartController.java
===================================================================
--- src/main/java/com/example/autopartz/controller/PartController.java	(revision 37966cf00fbfc4db7cc68d3399425a8c319f4305)
+++ src/main/java/com/example/autopartz/controller/PartController.java	(revision 780ede417156546c6015d3094dc2f58c5f8bc0db)
@@ -89,5 +89,5 @@
             model.addAttribute("hasError", false);
             CarSample cs = carSampleRepository.findById((Integer) session.getAttribute("carVin")).get();
-            Integer idCM = cs.getCar().getCar_manufacturer().getID_car_manufacturer();
+            Integer idCM = cs.getCar().getCar_manufacturer().getId();
             List<RsForCm> rsForCm = rsForCmRepository.findAllByCmid(idCM);
             List<RepairShop> newRepairShopList = new ArrayList<>();
Index: src/main/java/com/example/autopartz/model/Car.java
===================================================================
--- src/main/java/com/example/autopartz/model/Car.java	(revision 37966cf00fbfc4db7cc68d3399425a8c319f4305)
+++ src/main/java/com/example/autopartz/model/Car.java	(revision 780ede417156546c6015d3094dc2f58c5f8bc0db)
@@ -18,4 +18,5 @@
 public class Car {
     @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
     @Column(name = "ID_car")
     Integer id;
@@ -27,4 +28,11 @@
     @JoinColumn(name = "id_car_manufacturer")
     CarManufacturer car_manufacturer;
+
+    public Car(Integer in_production_since, Integer in_production_till, String cartype, CarManufacturer car_manufacturer) {
+        this.in_production_since = in_production_since;
+        this.in_production_till = in_production_till;
+        this.cartype = cartype;
+        this.car_manufacturer = car_manufacturer;
+    }
 
     @Override
Index: src/main/java/com/example/autopartz/model/CarManufacturer.java
===================================================================
--- src/main/java/com/example/autopartz/model/CarManufacturer.java	(revision 37966cf00fbfc4db7cc68d3399425a8c319f4305)
+++ src/main/java/com/example/autopartz/model/CarManufacturer.java	(revision 780ede417156546c6015d3094dc2f58c5f8bc0db)
@@ -7,7 +7,5 @@
 import org.hibernate.Hibernate;
 
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import javax.persistence.*;
 import java.util.Objects;
 
@@ -20,7 +18,15 @@
 public class CarManufacturer {
     @Id
-    Integer ID_car_manufacturer;
-    String cm_name;
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "id_car_manufacturer")
+    Integer id;
+    @Column(name = "cm_name")
+    String cmname;
     String cm_country;
+
+    public CarManufacturer(String cmname, String cm_country) {
+        this.cmname = cmname;
+        this.cm_country = cm_country;
+    }
 
     @Override
@@ -29,5 +35,5 @@
         if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false;
         CarManufacturer that = (CarManufacturer) o;
-        return ID_car_manufacturer != null && Objects.equals(ID_car_manufacturer, that.ID_car_manufacturer);
+        return id != null && Objects.equals(id, that.id);
     }
 
Index: src/main/java/com/example/autopartz/model/Category.java
===================================================================
--- src/main/java/com/example/autopartz/model/Category.java	(revision 37966cf00fbfc4db7cc68d3399425a8c319f4305)
+++ src/main/java/com/example/autopartz/model/Category.java	(revision 780ede417156546c6015d3094dc2f58c5f8bc0db)
@@ -18,4 +18,5 @@
     @Id
     @Column(name = "id_category")
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
     Integer id;
     @Column(name = "category_name")
@@ -24,4 +25,8 @@
     @JoinColumn(name = "id_parent_category")
     Category ID_parent_category;
+
+    public Category(String category) {
+        this.cname = category;
+    }
 
     @Override
Index: src/main/java/com/example/autopartz/model/PartManufacturer.java
===================================================================
--- src/main/java/com/example/autopartz/model/PartManufacturer.java	(revision 37966cf00fbfc4db7cc68d3399425a8c319f4305)
+++ src/main/java/com/example/autopartz/model/PartManufacturer.java	(revision 780ede417156546c6015d3094dc2f58c5f8bc0db)
@@ -7,8 +7,5 @@
 import org.hibernate.Hibernate;
 
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import javax.persistence.*;
 import java.util.Objects;
 
@@ -21,4 +18,5 @@
 public class PartManufacturer {
     @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
     @Column(name = "id_part_manufacturer")
     Integer id;
@@ -26,4 +24,9 @@
     String name;
     String pm_location;
+
+    public PartManufacturer(String name, String location) {
+        this.name = name;
+        this.pm_location = location;
+    }
 
     @Override
Index: src/main/java/com/example/autopartz/model/RepairShop.java
===================================================================
--- src/main/java/com/example/autopartz/model/RepairShop.java	(revision 37966cf00fbfc4db7cc68d3399425a8c319f4305)
+++ src/main/java/com/example/autopartz/model/RepairShop.java	(revision 780ede417156546c6015d3094dc2f58c5f8bc0db)
@@ -20,4 +20,5 @@
     @Id
     @Column(name = "ID_repair_shop")
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
     Integer id;
     @Column(name = "rs_name")
@@ -34,4 +35,11 @@
     List<CarManufacturer> carManufacturerList;
 
+    public RepairShop(String name, String location, String number, List<CarManufacturer> carManufacturerList) {
+        this.name = name;
+        this.location = location;
+        this.number = number;
+        this.carManufacturerList = carManufacturerList;
+    }
+
     @Override
     public boolean equals(Object o) {
Index: src/main/java/com/example/autopartz/model/Warehouse.java
===================================================================
--- src/main/java/com/example/autopartz/model/Warehouse.java	(revision 37966cf00fbfc4db7cc68d3399425a8c319f4305)
+++ src/main/java/com/example/autopartz/model/Warehouse.java	(revision 780ede417156546c6015d3094dc2f58c5f8bc0db)
@@ -7,7 +7,5 @@
 import org.hibernate.Hibernate;
 
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
+import javax.persistence.*;
 import java.util.Objects;
 
@@ -20,7 +18,12 @@
     @Id
     @Column(name = "id_warehouse")
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
     Integer id;
     @Column(name = "warehouse_location")
     String location;
+
+    public Warehouse(String name) {
+        this.location = name;
+    }
 
     @Override
Index: src/main/java/com/example/autopartz/model/manytomany/RsForCm.java
===================================================================
--- src/main/java/com/example/autopartz/model/manytomany/RsForCm.java	(revision 37966cf00fbfc4db7cc68d3399425a8c319f4305)
+++ src/main/java/com/example/autopartz/model/manytomany/RsForCm.java	(revision 780ede417156546c6015d3094dc2f58c5f8bc0db)
@@ -22,3 +22,8 @@
     @Id
     Integer cmid;
+
+    public RsForCm(Integer rsid, Integer cmid) {
+        this.rsid = rsid;
+        this.cmid = cmid;
+    }
 }
Index: src/main/java/com/example/autopartz/repository/CarManufacturerRepository.java
===================================================================
--- src/main/java/com/example/autopartz/repository/CarManufacturerRepository.java	(revision 780ede417156546c6015d3094dc2f58c5f8bc0db)
+++ src/main/java/com/example/autopartz/repository/CarManufacturerRepository.java	(revision 780ede417156546c6015d3094dc2f58c5f8bc0db)
@@ -0,0 +1,7 @@
+package com.example.autopartz.repository;
+
+import com.example.autopartz.model.CarManufacturer;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+public interface CarManufacturerRepository extends JpaRepository<CarManufacturer,Integer> {
+}
