Index: src/main/java/com/example/moviezone/config/WebSecurityConfig.java
===================================================================
--- src/main/java/com/example/moviezone/config/WebSecurityConfig.java	(revision 7926d68ade1a5449388cf5b8c3f0e15547bf5e6b)
+++ src/main/java/com/example/moviezone/config/WebSecurityConfig.java	(revision 04153a9b0642311d309f3bab27010461073060ea)
@@ -33,5 +33,5 @@
                 .authorizeRequests()
                 .antMatchers("/","/films","/home/projections","/home/events","/home/getProjections/**","/home/films","/home/getFilm/**","/getFilm/**","/home/getEvent/**","/getEvent/**","/login","/events","/projections" ,"/home", "/assets/**", "/register", "/api/**").permitAll()
-                .antMatchers("/home/getSeats/**","/myTickets","/home/addRating/**","/addRating/**","/getProjection/**","/home/makeReservation","/profileUser").hasRole("USER")
+                .antMatchers("/home/getSeats/**","/myTickets","/home/addInterestedEvent/**","/home/deleteInterestedEvent/**","/home/addRating/**","/addRating/**","/getProjection/**","/home/makeReservation","/profileUser").hasRole("USER")
                 .antMatchers("/**").hasRole("ADMIN")
                 .anyRequest()
Index: src/main/java/com/example/moviezone/model/manytomany/CustomerIsInterestedInEvent.java
===================================================================
--- src/main/java/com/example/moviezone/model/manytomany/CustomerIsInterestedInEvent.java	(revision 7926d68ade1a5449388cf5b8c3f0e15547bf5e6b)
+++ src/main/java/com/example/moviezone/model/manytomany/CustomerIsInterestedInEvent.java	(revision 04153a9b0642311d309f3bab27010461073060ea)
@@ -25,7 +25,12 @@
     @Id
     @Column(name = "id_customer")
-    Integer id_customer;
+    Integer idcustomer;
     @Column(name = "id_event")
     @Id
-    Integer id_event;
+    Integer idevent;
+
+    public CustomerIsInterestedInEvent(Integer id_customer, Integer id_event) {
+        this.idcustomer = id_customer;
+        this.idevent = id_event;
+    }
 }
Index: src/main/java/com/example/moviezone/model/manytomany/CustomerIsInterestedInEventId.java
===================================================================
--- src/main/java/com/example/moviezone/model/manytomany/CustomerIsInterestedInEventId.java	(revision 7926d68ade1a5449388cf5b8c3f0e15547bf5e6b)
+++ src/main/java/com/example/moviezone/model/manytomany/CustomerIsInterestedInEventId.java	(revision 04153a9b0642311d309f3bab27010461073060ea)
@@ -7,6 +7,6 @@
 @Data
 public class CustomerIsInterestedInEventId implements Serializable {
-    Integer id_customer;
-    Integer id_event;
+    Integer idcustomer;
+    Integer idevent;
 
 }
Index: src/main/java/com/example/moviezone/repository/CustomerIsInterestedInEventRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/CustomerIsInterestedInEventRepository.java	(revision 7926d68ade1a5449388cf5b8c3f0e15547bf5e6b)
+++ src/main/java/com/example/moviezone/repository/CustomerIsInterestedInEventRepository.java	(revision 04153a9b0642311d309f3bab27010461073060ea)
@@ -8,3 +8,7 @@
 @Repository
 public interface CustomerIsInterestedInEventRepository extends JpaRepository<CustomerIsInterestedInEvent, CustomerIsInterestedInEventId> {
+    CustomerIsInterestedInEvent save(CustomerIsInterestedInEvent customerIsInterestedInEvent);
+    void delete(CustomerIsInterestedInEvent customerIsInterestedInEvent);
+    CustomerIsInterestedInEvent findFirstByIdeventAndAndIdcustomer(int id_event,int id_customer);
+
 }
Index: src/main/java/com/example/moviezone/repository/EventRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/EventRepository.java	(revision 7926d68ade1a5449388cf5b8c3f0e15547bf5e6b)
+++ src/main/java/com/example/moviezone/repository/EventRepository.java	(revision 04153a9b0642311d309f3bab27010461073060ea)
@@ -6,6 +6,7 @@
 import org.springframework.data.jpa.repository.query.Procedure;
 
+import javax.transaction.Transactional;
 import java.util.List;
-
+@Transactional
 public interface EventRepository extends JpaRepository<Event,Integer> {
     @Procedure("project.getEventsFromCinema")
@@ -13,4 +14,5 @@
     @Procedure("project.getEventsFromNow")
     List<Event> getFilmsFromCinemaNow();
-
+    @Procedure("project.getEventsForCustomer")
+    List<Event> getEventsForCustomer(int id);
 }
Index: src/main/java/com/example/moviezone/service/CustomerIsInterestedInEventService.java
===================================================================
--- src/main/java/com/example/moviezone/service/CustomerIsInterestedInEventService.java	(revision 04153a9b0642311d309f3bab27010461073060ea)
+++ src/main/java/com/example/moviezone/service/CustomerIsInterestedInEventService.java	(revision 04153a9b0642311d309f3bab27010461073060ea)
@@ -0,0 +1,13 @@
+package com.example.moviezone.service;
+
+import com.example.moviezone.model.Customer;
+import com.example.moviezone.model.Event;
+import com.example.moviezone.model.manytomany.CustomerIsInterestedInEvent;
+
+import javax.persistence.criteria.CriteriaBuilder;
+
+public interface CustomerIsInterestedInEventService {
+ CustomerIsInterestedInEvent add(Integer id_customer,Integer id_event);
+ void delete(Customer customer, Event event);
+ CustomerIsInterestedInEvent findByCustomerAndEvent(Customer customer, Event event);
+}
Index: src/main/java/com/example/moviezone/service/EventService.java
===================================================================
--- src/main/java/com/example/moviezone/service/EventService.java	(revision 7926d68ade1a5449388cf5b8c3f0e15547bf5e6b)
+++ src/main/java/com/example/moviezone/service/EventService.java	(revision 04153a9b0642311d309f3bab27010461073060ea)
@@ -1,4 +1,5 @@
 package com.example.moviezone.service;
 
+import ch.qos.logback.core.encoder.EchoEncoder;
 import com.example.moviezone.model.Event;
 
@@ -13,3 +14,4 @@
     List<Event> getEventsFromCinema(int id);
     Optional<Event> getEventById(Long id);
+    List<Event> getEventsForCustomer(int id);
 }
Index: src/main/java/com/example/moviezone/service/Impl/CustomerIsInterestedInEventImpl.java
===================================================================
--- src/main/java/com/example/moviezone/service/Impl/CustomerIsInterestedInEventImpl.java	(revision 04153a9b0642311d309f3bab27010461073060ea)
+++ src/main/java/com/example/moviezone/service/Impl/CustomerIsInterestedInEventImpl.java	(revision 04153a9b0642311d309f3bab27010461073060ea)
@@ -0,0 +1,34 @@
+package com.example.moviezone.service.Impl;
+
+import com.example.moviezone.model.Customer;
+import com.example.moviezone.model.Event;
+import com.example.moviezone.model.manytomany.CustomerIsInterestedInEvent;
+import com.example.moviezone.repository.CustomerIsInterestedInEventRepository;
+import com.example.moviezone.service.CustomerIsInterestedInEventService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class CustomerIsInterestedInEventImpl implements CustomerIsInterestedInEventService {
+    private final CustomerIsInterestedInEventRepository customerIsInterestedInEventRepository;
+
+    public CustomerIsInterestedInEventImpl(CustomerIsInterestedInEventRepository customerIsInterestedInEventRepository) {
+        this.customerIsInterestedInEventRepository = customerIsInterestedInEventRepository;
+    }
+
+    @Override
+    public CustomerIsInterestedInEvent add(Integer id_customer, Integer id_event) {
+        CustomerIsInterestedInEvent customerIsInterestedInEvent=new CustomerIsInterestedInEvent(id_customer,id_event);
+        return customerIsInterestedInEventRepository.save(customerIsInterestedInEvent);
+    }
+
+    @Override
+    public void delete(Customer customer, Event event) {
+        CustomerIsInterestedInEvent customerIsInterestedInEvent=findByCustomerAndEvent(customer,event);
+        customerIsInterestedInEventRepository.delete(customerIsInterestedInEvent);
+    }
+
+    @Override
+    public CustomerIsInterestedInEvent findByCustomerAndEvent(Customer customer, Event event) {
+        return customerIsInterestedInEventRepository.findFirstByIdeventAndAndIdcustomer(event.getId_event(),customer.getId_user());
+    }
+}
Index: src/main/java/com/example/moviezone/service/Impl/EventServiceImpl.java
===================================================================
--- src/main/java/com/example/moviezone/service/Impl/EventServiceImpl.java	(revision 7926d68ade1a5449388cf5b8c3f0e15547bf5e6b)
+++ src/main/java/com/example/moviezone/service/Impl/EventServiceImpl.java	(revision 04153a9b0642311d309f3bab27010461073060ea)
@@ -43,3 +43,8 @@
         return eventRepository.findAllById(Collections.singleton(id.intValue())).stream().findFirst();
     }
+
+    @Override
+    public List<Event> getEventsForCustomer(int id) {
+        return eventRepository.getEventsForCustomer(id);
+    }
 }
Index: src/main/java/com/example/moviezone/web/HomeController.java
===================================================================
--- src/main/java/com/example/moviezone/web/HomeController.java	(revision 7926d68ade1a5449388cf5b8c3f0e15547bf5e6b)
+++ src/main/java/com/example/moviezone/web/HomeController.java	(revision 04153a9b0642311d309f3bab27010461073060ea)
@@ -24,5 +24,4 @@
 import java.util.LinkedList;
 import java.util.List;
-import java.util.Objects;
 import java.util.stream.Collectors;
 
@@ -46,6 +45,7 @@
 private final CustomerService customerService;
 private final Projection_RoomService projectionRoomService;
-
-    public HomeController(FilmService filmService, UserService userService, ProjectionService projectionService, EventService eventService, TicketService ticketService, WorkerService workerService, CustomerRatesFilmService customerRatesFilmService, CinemaService cinemaService, CinemaOrganizesEventService cinemaOrganizesEventService, CinemaPlaysFilmService cinemaPlaysFilmService, ProjectionIsPlayedInRoomService projectionIsPlayedInRoomService, CategoryService categoryService, SeatService seatService, CustomerService customerService, Projection_RoomService projectionRoomService)
+private final CustomerIsInterestedInEventService customerIsInterestedInEventService;
+
+    public HomeController(FilmService filmService, UserService userService, ProjectionService projectionService, EventService eventService, TicketService ticketService, WorkerService workerService, CustomerRatesFilmService customerRatesFilmService, CinemaService cinemaService, CinemaOrganizesEventService cinemaOrganizesEventService, CinemaPlaysFilmService cinemaPlaysFilmService, ProjectionIsPlayedInRoomService projectionIsPlayedInRoomService, CategoryService categoryService, SeatService seatService, CustomerService customerService, Projection_RoomService projectionRoomService, CustomerIsInterestedInEventService customerIsInterestedInEventService)
     {
 
@@ -65,4 +65,5 @@
         this.customerService = customerService;
         this.projectionRoomService = projectionRoomService;
+        this.customerIsInterestedInEventService = customerIsInterestedInEventService;
     }
 
@@ -412,11 +413,29 @@
     }
     @GetMapping("/profileUser")
+    @Transactional
     public String getUserProfile(Model model,HttpServletRequest request)
     {
         Customer customer=customerService.findByUsername(request.getRemoteUser());
         System.out.println(customer.getFirst_name());
+        List<Event> events=eventService.getEventsForCustomer(customer.getId_user());
         model.addAttribute("customer",customer);
+        model.addAttribute("events",events);
         model.addAttribute("bodyContent", "profileUser");
         return "master-template";
     }
+    @PostMapping("/addInterestedEvent/{id}")
+    public String addInterestedEvent(@PathVariable Long id,HttpServletRequest request, HttpServletResponse respons)
+    {
+        Customer customer=customerService.findByUsername(request.getRemoteUser());
+        customerIsInterestedInEventService.add(customer.getId_user(),Integer.valueOf(id.intValue()));
+        return "redirect:/profileUser";
+    }
+    @PostMapping("/deleteInterestedEvent/{id}")
+    public String deleteInterestedEvent(@PathVariable Long id,HttpServletRequest request, HttpServletResponse respons)
+    {
+        Customer customer=customerService.findByUsername(request.getRemoteUser());
+        Event event=eventService.getEventById(id).get();
+        customerIsInterestedInEventService.delete(customer,event);
+        return "redirect:/profileUser";
+    }
 }
