Index: src/main/java/com/example/autopartz/controller/UserController.java
===================================================================
--- src/main/java/com/example/autopartz/controller/UserController.java	(revision 2e46f06b2bd1b8221ef8bafa8c18c16521eb6c90)
+++ src/main/java/com/example/autopartz/controller/UserController.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
@@ -1,11 +1,8 @@
 package com.example.autopartz.controller;
 
-import com.example.autopartz.model.RepairShopReviewsSummary;
-import com.example.autopartz.model.User;
-import com.example.autopartz.repository.RepairShopReviewSummaryRepository;
+import com.example.autopartz.model.*;
+import com.example.autopartz.repository.*;
 import com.example.autopartz.service.UserService;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
@@ -15,13 +12,21 @@
 public class UserController {
     private final UserService userService;
-    private final RepairShopReviewSummaryRepository rspsr;
+    private final RepairShopReviewSummaryRepository repairShopReviewSummaryRepository;
+    private final PartsForCarTypeAndCategoryRepository partsForCarTypeAndCategoryRepository;
 
-    public UserController(UserService userService, RepairShopReviewSummaryRepository rspsr) {
+    private final OrdersForUserRepository ordersForUserRepository;
+    private final RepairsForUserRepository repairsForUserRepository;
+    private final ReviewsForUserRepository reviewsForUserRepository;
+    public UserController(UserService userService, RepairShopReviewSummaryRepository repairShopReviewSummaryRepository, PartsForCarTypeAndCategoryRepository partsForCarTypeAndCategoryRepository, OrdersForUserRepository ordersForUserRepository, RepairsForUserRepository repairsForUserRepository, ReviewsForUserRepository reviewsForUserRepository) {
         this.userService = userService;
-        this.rspsr = rspsr;
+        this.repairShopReviewSummaryRepository = repairShopReviewSummaryRepository;
+        this.partsForCarTypeAndCategoryRepository = partsForCarTypeAndCategoryRepository;
+        this.ordersForUserRepository = ordersForUserRepository;
+        this.repairsForUserRepository = repairsForUserRepository;
+        this.reviewsForUserRepository = reviewsForUserRepository;
     }
     @GetMapping("reportTest")
     public List<RepairShopReviewsSummary> getRepairShopReport(){
-        return rspsr.findAllByRsid(2L);
+        return repairShopReviewSummaryRepository.findAll();
     }
     @GetMapping("usersTest")
@@ -29,3 +34,19 @@
         return userService.findAllUsers();
     }
+    @GetMapping("parts")
+    public List<PartsForCarTypeAndCategory> getPartsForCarTypeAndCategory(@RequestParam String cartype, @RequestParam String category){
+        return partsForCarTypeAndCategoryRepository.findAllByCartypeAndCategory(cartype,category);
+    }
+    @GetMapping("orders/{id}")
+    public List<OrdersForUser> getOrdersForUser(@PathVariable Long id){
+        return ordersForUserRepository.findAllByUserid(id);
+    }
+    @GetMapping("repairs/{id}")
+    public List<RepairsForUser> getRepairsForUser(@PathVariable Long id){
+        return repairsForUserRepository.findAllByUserid(id);
+    }
+    @GetMapping("reviews/{id}")
+    public List<ReviewsForUser> getReviewsForUser(@PathVariable Long id){
+        return reviewsForUserRepository.findAllByUserid(id);
+    }
 }
Index: src/main/java/com/example/autopartz/model/OrdersForUser.java
===================================================================
--- src/main/java/com/example/autopartz/model/OrdersForUser.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
+++ src/main/java/com/example/autopartz/model/OrdersForUser.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
@@ -0,0 +1,40 @@
+package com.example.autopartz.model;
+
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.IdClass;
+import jakarta.persistence.Table;
+import lombok.*;
+import org.hibernate.Hibernate;
+import org.hibernate.annotations.Immutable;
+import org.hibernate.annotations.Subselect;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.Objects;
+
+// извештај за сите сервиси и за сите број на reviews и avg рејтинг
+@Entity
+@Getter
+@Setter
+@ToString
+@RequiredArgsConstructor
+@Immutable
+@Table(name = "`orders_for_user`")
+@IdClass(OrdersForUserId.class)
+public class OrdersForUser implements Serializable {
+    @Serial
+    private static final long serialVersionUID = 1L;
+    @Id
+    Long userid;
+    @Id
+    LocalDateTime orderdate;
+    @Id
+    String partname;
+    Integer amount;
+    Integer quantity;
+    String status;
+}
+
Index: src/main/java/com/example/autopartz/model/OrdersForUserId.java
===================================================================
--- src/main/java/com/example/autopartz/model/OrdersForUserId.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
+++ src/main/java/com/example/autopartz/model/OrdersForUserId.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
@@ -0,0 +1,13 @@
+package com.example.autopartz.model;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+@Data
+public class OrdersForUserId implements Serializable {
+    Long userid;
+    LocalDateTime orderdate;
+    String partname;
+}
Index: src/main/java/com/example/autopartz/model/Part.java
===================================================================
--- src/main/java/com/example/autopartz/model/Part.java	(revision 2e46f06b2bd1b8221ef8bafa8c18c16521eb6c90)
+++ src/main/java/com/example/autopartz/model/Part.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
@@ -1,11 +1,10 @@
 package com.example.autopartz.model;
 
-import jakarta.persistence.Entity;
-import jakarta.persistence.Id;
-import jakarta.persistence.JoinColumn;
-import jakarta.persistence.ManyToOne;
+import jakarta.persistence.*;
 import lombok.*;
 import org.hibernate.Hibernate;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Objects;
 
@@ -23,4 +22,10 @@
     @JoinColumn(name = "id_part_manufacturer")
     PartManufacturer partManufacturer;
+    @ManyToMany
+    @JoinTable(name = "part_is_from_category", joinColumns =
+    @JoinColumn(name = "id_part"),
+    inverseJoinColumns = @JoinColumn(name = "id_category"))
+    @ToString.Exclude
+    List<Category> categoryList;
 
     @Override
Index: src/main/java/com/example/autopartz/model/PartsForCarTypeAndCategory.java
===================================================================
--- src/main/java/com/example/autopartz/model/PartsForCarTypeAndCategory.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
+++ src/main/java/com/example/autopartz/model/PartsForCarTypeAndCategory.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
@@ -0,0 +1,27 @@
+package com.example.autopartz.model;
+
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.Table;
+import lombok.*;
+import org.hibernate.annotations.Immutable;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+@Entity
+@Getter
+@Setter
+@ToString
+@RequiredArgsConstructor
+@Immutable
+@Table(name = "`parts_for_car_type_and_category`")
+public class PartsForCarTypeAndCategory implements Serializable {
+    @Serial
+    private static final long serialVersionUID = 1L;
+    @Id
+    Long partid;
+    String partname;
+    String cartype;
+    String category;
+}
Index: src/main/java/com/example/autopartz/model/RepairShopReviewsSummary.java
===================================================================
--- src/main/java/com/example/autopartz/model/RepairShopReviewsSummary.java	(revision 2e46f06b2bd1b8221ef8bafa8c18c16521eb6c90)
+++ src/main/java/com/example/autopartz/model/RepairShopReviewsSummary.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
@@ -20,6 +20,5 @@
 @RequiredArgsConstructor
 @Immutable
-@Table(name = "repair_shop_reviews_summary")
-@Subselect("select * from repair_shop_reviews_summary")
+@Table(name = "`repair_shop_reviews_summary`")
 public class RepairShopReviewsSummary implements Serializable {
     @Serial
Index: src/main/java/com/example/autopartz/model/RepairsForUser.java
===================================================================
--- src/main/java/com/example/autopartz/model/RepairsForUser.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
+++ src/main/java/com/example/autopartz/model/RepairsForUser.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
@@ -0,0 +1,40 @@
+package com.example.autopartz.model;
+
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.IdClass;
+import jakarta.persistence.Table;
+import lombok.*;
+import org.hibernate.Hibernate;
+import org.hibernate.annotations.Immutable;
+import org.hibernate.annotations.Subselect;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.Objects;
+
+// извештај за сите сервиси и за сите број на reviews и avg рејтинг
+@Entity
+@Getter
+@Setter
+@ToString
+@RequiredArgsConstructor
+@Immutable
+@Table(name = "`repairs_for_user`")
+@IdClass(OrdersForUserId.class)
+public class RepairsForUser implements Serializable {
+    @Serial
+    private static final long serialVersionUID = 1L;
+    @Id
+    Long userid;
+    @Id
+    LocalDateTime orderdate;
+    @Id
+    String partname;
+    Integer vin;
+    String rsname;
+}
+
+
Index: src/main/java/com/example/autopartz/model/ReviewsForUser.java
===================================================================
--- src/main/java/com/example/autopartz/model/ReviewsForUser.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
+++ src/main/java/com/example/autopartz/model/ReviewsForUser.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
@@ -0,0 +1,38 @@
+package com.example.autopartz.model;
+
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.IdClass;
+import jakarta.persistence.Table;
+import lombok.*;
+import org.hibernate.Hibernate;
+import org.hibernate.annotations.Immutable;
+import org.hibernate.annotations.Subselect;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.Objects;
+
+// извештај за сите сервиси и за сите број на reviews и avg рејтинг
+@Entity
+@Getter
+@Setter
+@ToString
+@RequiredArgsConstructor
+@Immutable
+@Table(name = "`reviews_for_user`")
+public class ReviewsForUser implements Serializable {
+    @Serial
+    private static final long serialVersionUID = 1L;
+    @Id
+    Long repairid;
+    Long userid;
+    Integer rating;
+    String rcomment;
+    String rsname;
+    String rslocation;
+}
+
+
Index: src/main/java/com/example/autopartz/repository/OrdersForUserRepository.java
===================================================================
--- src/main/java/com/example/autopartz/repository/OrdersForUserRepository.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
+++ src/main/java/com/example/autopartz/repository/OrdersForUserRepository.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
@@ -0,0 +1,15 @@
+package com.example.autopartz.repository;
+
+import com.example.autopartz.model.OrdersForUser;
+import com.example.autopartz.model.OrdersForUserId;
+import jakarta.transaction.Transactional;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+@Transactional
+public interface OrdersForUserRepository extends JpaRepository<OrdersForUser, OrdersForUserId> {
+    List<OrdersForUser> findAllByUserid(Long userid);
+}
Index: src/main/java/com/example/autopartz/repository/PartsForCarTypeAndCategoryRepository.java
===================================================================
--- src/main/java/com/example/autopartz/repository/PartsForCarTypeAndCategoryRepository.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
+++ src/main/java/com/example/autopartz/repository/PartsForCarTypeAndCategoryRepository.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
@@ -0,0 +1,14 @@
+package com.example.autopartz.repository;
+
+import com.example.autopartz.model.PartsForCarTypeAndCategory;
+import jakarta.transaction.Transactional;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+@Transactional
+public interface PartsForCarTypeAndCategoryRepository extends JpaRepository<PartsForCarTypeAndCategory,Long> {
+    List<PartsForCarTypeAndCategory> findAllByCartypeAndCategory(String cartype, String category);
+}
Index: src/main/java/com/example/autopartz/repository/RepairsForUserRepository.java
===================================================================
--- src/main/java/com/example/autopartz/repository/RepairsForUserRepository.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
+++ src/main/java/com/example/autopartz/repository/RepairsForUserRepository.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
@@ -0,0 +1,11 @@
+package com.example.autopartz.repository;
+
+import com.example.autopartz.model.OrdersForUserId;
+import com.example.autopartz.model.RepairsForUser;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.List;
+
+public interface RepairsForUserRepository extends JpaRepository<RepairsForUser, OrdersForUserId> {
+    List<RepairsForUser> findAllByUserid(Long userid);
+}
Index: src/main/java/com/example/autopartz/repository/ReviewsForUserRepository.java
===================================================================
--- src/main/java/com/example/autopartz/repository/ReviewsForUserRepository.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
+++ src/main/java/com/example/autopartz/repository/ReviewsForUserRepository.java	(revision 23a2bc560f5a0e6ae66edfd9968377cc5715ce3c)
@@ -0,0 +1,10 @@
+package com.example.autopartz.repository;
+
+import com.example.autopartz.model.ReviewsForUser;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.List;
+
+public interface ReviewsForUserRepository extends JpaRepository<ReviewsForUser,Long> {
+    List<ReviewsForUser> findAllByUserid(Long id);
+}
