Index: src/main/java/com/tourMate/TourMateApplication.java
===================================================================
--- src/main/java/com/tourMate/TourMateApplication.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/TourMateApplication.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -3,17 +3,8 @@
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.annotation.Bean;
-import org.springframework.mail.javamail.JavaMailSender;
-import org.springframework.mail.javamail.JavaMailSenderImpl;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
-
-import java.util.Properties;
 
 @SpringBootApplication
 @EnableTransactionManagement
-@EnableScheduling
 public class TourMateApplication {
 
@@ -22,26 +13,3 @@
 	}
 
-	@Bean
-	public PasswordEncoder passwordEncoder() {
-		return new BCryptPasswordEncoder();
-	}
-
-	@Bean
-	public JavaMailSender getJavaMailSender() {
-		JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
-		mailSender.setHost("smtp.gmail.com");
-		mailSender.setPort(587);
-
-		mailSender.setUsername("trip2mk@gmail.com");
-		mailSender.setPassword("xarb ggqg mvmr zciw");
-
-		Properties props = mailSender.getJavaMailProperties();
-		props.put("mail.transport.protocol", "smtp");
-		props.put("mail.smtp.auth", "true");
-		props.put("mail.smtp.starttls.enable", "true");
-		props.put("mail.debug", "true");
-
-		return mailSender;
-	}
-
 }
Index: src/main/java/com/tourMate/config/SecurityConfig.java
===================================================================
--- src/main/java/com/tourMate/config/SecurityConfig.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/config/SecurityConfig.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -1,17 +1,17 @@
 package com.tourMate.config;
 
-import com.tourMate.config.oauth2.CustomOAuth2FailureHandler;
-import com.tourMate.config.oauth2.CustomOAuth2SuccessHandler;
-import com.tourMate.config.oauth2.CustomOAuth2UserDetailService;
-import org.springframework.beans.factory.annotation.Autowired;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import jakarta.servlet.http.HttpServletResponse;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
 import org.springframework.security.config.annotation.web.builders.HttpSecurity;
 import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
 import org.springframework.security.config.http.SessionCreationPolicy;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.security.web.SecurityFilterChain;
-import org.springframework.security.web.authentication.logout.HttpStatusReturningLogoutSuccessHandler;
+import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
 import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
 import org.springframework.web.cors.CorsConfiguration;
@@ -21,19 +21,9 @@
 import java.util.Arrays;
 
+import static org.springframework.security.config.Customizer.withDefaults;
+
 @Configuration
 @EnableWebSecurity
 public class SecurityConfig {
-
-    private final UserSecurity userSecurity;
-    @Autowired
-    private CustomOAuth2UserDetailService customOAuth2UserDetailService;
-    @Autowired
-    private CustomOAuth2FailureHandler oAuth2FailureHandler;
-    @Autowired
-    private CustomOAuth2SuccessHandler oAuth2SuccessHandler;
-
-    public SecurityConfig(UserSecurity userSecurity) {
-        this.userSecurity = userSecurity;
-    }
 
     @Bean
@@ -62,4 +52,8 @@
         return bean;
     }
+    @Bean
+    public PasswordEncoder passwordEncoder() {
+        return new BCryptPasswordEncoder();
+    }
 
     @Bean
@@ -70,32 +64,26 @@
                             try {
                                 authz
-                                        .requestMatchers(new AntPathRequestMatcher("/{userId}/hasBusiness")).access(userSecurity)
-                                        .requestMatchers(new AntPathRequestMatcher("/business/*/unapproved")).permitAll()
+                                        .requestMatchers(new AntPathRequestMatcher("/1/hasBusiness")).permitAll()
+                                        .requestMatchers(new AntPathRequestMatcher("/business/1/unapproved")).permitAll()
                                         .requestMatchers(new AntPathRequestMatcher("/register")).permitAll()
                                         .requestMatchers(new AntPathRequestMatcher("/hotel/search")).permitAll()
                                         .requestMatchers(new AntPathRequestMatcher("/transport/search")).permitAll()
-                                        .requestMatchers(new AntPathRequestMatcher("/restaurant/search")).permitAll()
-                                        .requestMatchers(new AntPathRequestMatcher("/upload")).permitAll()
-                                        .requestMatchers(new AntPathRequestMatcher("/business/approve/*")).hasAnyAuthority("SUPERADMIN")
-                                        .requestMatchers(new AntPathRequestMatcher("/users/unlock/*")).hasAnyAuthority("SUPERADMIN")
-                                        .requestMatchers(new AntPathRequestMatcher("/users/approve/*")).hasAnyAuthority("SUPERADMIN")
-                                        .requestMatchers(new AntPathRequestMatcher("/business/unapproved")).hasAnyAuthority("SUPERADMIN")
-                                        .requestMatchers(new AntPathRequestMatcher("/business/add/*")).authenticated()
-                                        .requestMatchers(new AntPathRequestMatcher("/*/user/{userId}")).access(userSecurity)
-//                                        .anyRequest().permitAll()
+                                        .requestMatchers(new AntPathRequestMatcher("/business/*")).hasAnyAuthority("SUPERADMIN")
                                         .anyRequest().authenticated()
                                         .and()
-                                        .oauth2Login()
-                                        .loginPage("/login")
-                                        .permitAll()
-                                        .userInfoEndpoint(x -> x.userService(customOAuth2UserDetailService))
-//                                        .userService(customOAuth2UserDetailService)
-                                        .successHandler(oAuth2SuccessHandler)
-                                        .failureHandler(oAuth2FailureHandler)
-                                        .and()
-                                        .formLogin()
-                                        .loginPage("/login")
-                                        .successHandler(oAuth2SuccessHandler)
-                                        .permitAll()
+                                        .formLogin().loginPage("http://localhost:3000/login")
+                                        .loginProcessingUrl("/api/login").usernameParameter("username").passwordParameter("password")
+                                        .successHandler((request, response, authentication) -> {
+                                            response.setStatus(HttpServletResponse.SC_OK);
+                                            response.setContentType("application/json");
+                                            response.getWriter().print("{\"message\": \"Login successful\",");
+                                            response.getWriter().print("\"auth\":" + new ObjectMapper().writeValueAsString(authentication) + "}");
+                                            response.getWriter().flush();
+                                        })
+                                        .failureHandler((request, response, exception) -> {
+                                            response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
+                                            response.getWriter().print("Pukla veza\n" + exception.getMessage());
+                                            response.getWriter().flush();
+                                        })
                                         .permitAll()
                                         .and()
@@ -103,5 +91,5 @@
                                         .sessionCreationPolicy(SessionCreationPolicy.ALWAYS)
                                         .and()
-                                        .logout().logoutSuccessHandler((new HttpStatusReturningLogoutSuccessHandler(HttpStatus.OK)))
+                                        .logout()
                                         .permitAll();
 
Index: src/main/java/com/tourMate/config/UserSecurity.java
===================================================================
--- src/main/java/com/tourMate/config/UserSecurity.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,42 +1,0 @@
-package com.tourMate.config;
-
-import com.tourMate.config.oauth2.CustomOAuth2UserDetailService;
-import com.tourMate.config.oauth2.OAuth2UserDetailsCustom;
-import com.tourMate.entities.Hotels;
-import com.tourMate.entities.User;
-import com.tourMate.services.HotelManager;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.authorization.AuthorizationDecision;
-import org.springframework.security.authorization.AuthorizationManager;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.web.access.intercept.RequestAuthorizationContext;
-import org.springframework.stereotype.Component;
-
-import java.util.function.Supplier;
-
-@Component
-public class UserSecurity implements AuthorizationManager<RequestAuthorizationContext> {
-
-    @Override
-    public AuthorizationDecision check(Supplier authenticationSupplier, RequestAuthorizationContext ctx) {
-        Long userId = Long.parseLong(ctx.getVariables().get("userId"));
-        Authentication authentication = (Authentication) authenticationSupplier.get();
-        return new AuthorizationDecision(hasUserId(authentication, userId));
-    }
-
-    public boolean hasUserId(Authentication authentication, Long userId) {
-        System.out.println(userId);
-        Long id;
-        if(authentication.getPrincipal() instanceof OAuth2UserDetailsCustom oAuth2UserDetailsCustom)
-        {
-            id = oAuth2UserDetailsCustom.getId();
-        }
-        else
-        {
-            User user = (User) authentication.getPrincipal();
-            id = user.getUserID();
-        }
-        return userId == id;
-    }
-
-}
Index: src/main/java/com/tourMate/config/oauth2/CustomOAuth2FailureHandler.java
===================================================================
--- src/main/java/com/tourMate/config/oauth2/CustomOAuth2FailureHandler.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,18 +1,0 @@
-package com.tourMate.config.oauth2;
-
-import jakarta.servlet.ServletException;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-import org.springframework.security.core.AuthenticationException;
-import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
-import org.springframework.stereotype.Component;
-
-import java.io.IOException;
-
-@Component
-public class CustomOAuth2FailureHandler extends SimpleUrlAuthenticationFailureHandler {
-    @Override
-    public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException {
-        getRedirectStrategy().sendRedirect(request, response, "/login");
-    }
-}
Index: src/main/java/com/tourMate/config/oauth2/CustomOAuth2SuccessHandler.java
===================================================================
--- src/main/java/com/tourMate/config/oauth2/CustomOAuth2SuccessHandler.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,19 +1,0 @@
-package com.tourMate.config.oauth2;
-
-import jakarta.servlet.ServletException;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler;
-import org.springframework.stereotype.Component;
-
-import java.io.IOException;
-
-@Component
-public class CustomOAuth2SuccessHandler extends SimpleUrlAuthenticationSuccessHandler {
-    @Override
-    public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {
-//        OAuth2UserDetailsCustom oAuth2UserDetailsCustom = (OAuth2UserDetailsCustom) authentication.getPrincipal();
-        getRedirectStrategy().sendRedirect(request, response, "http://localhost:3000/login-callback");
-    }
-}
Index: src/main/java/com/tourMate/config/oauth2/CustomOAuth2UserDetailService.java
===================================================================
--- src/main/java/com/tourMate/config/oauth2/CustomOAuth2UserDetailService.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,93 +1,0 @@
-package com.tourMate.config.oauth2;
-
-import com.tourMate.dao.UsersDao;
-import com.tourMate.entities.Role;
-import com.tourMate.entities.User;
-import org.springframework.security.core.AuthenticationException;
-import org.springframework.security.core.authority.SimpleGrantedAuthority;
-import org.springframework.security.oauth2.client.userinfo.DefaultOAuth2UserService;
-import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest;
-import org.springframework.security.oauth2.core.OAuth2AuthenticationException;
-import org.springframework.security.oauth2.core.user.OAuth2User;
-import org.springframework.stereotype.Service;
-import org.springframework.util.ObjectUtils;
-
-import java.util.Collections;
-import java.util.Objects;
-
-@Service
-public class CustomOAuth2UserDetailService extends DefaultOAuth2UserService {
-
-    private final UsersDao usersDao;
-
-    public CustomOAuth2UserDetailService(UsersDao usersDao) {
-        this.usersDao = usersDao;
-    }
-
-    @Override
-    public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2AuthenticationException {
-        OAuth2User oAuth2User = super.loadUser(userRequest);
-
-        try
-        {
-            return checkOAuth2User(userRequest, oAuth2User);
-        }
-        catch (AuthenticationException e)
-        {
-            throw e;
-        }
-        catch (Exception ex)
-        {
-            throw ex;
-            //throw new InternalAuthenticationServiceException(ex.getMessage(), ex.getCause());
-        }
-    }
-
-    private OAuth2User checkOAuth2User(OAuth2UserRequest oAuth2UserRequest, OAuth2User oAuth2User)
-    {
-        OAuth2UserDetails oAuth2UserDetails = OAuth2UserDetailsFactory
-                .createOAuth2UserDetails(oAuth2UserRequest.getClientRegistration().getRegistrationId(), oAuth2User.getAttributes());
-
-        if(ObjectUtils.isEmpty(oAuth2UserRequest))
-        {
-            throw new RuntimeException("Cannot identifty OAuth2 user!");
-        }
-
-        User user = usersDao.findByUsernameAndProvider(
-                oAuth2UserDetails.getEmail(),
-                oAuth2UserRequest.getClientRegistration().getRegistrationId());
-        User userDetails = null;
-        if(user != null)
-        {
-            userDetails = user;
-            userDetails = updateOAuth2UserDetail(userDetails, oAuth2UserDetails);
-        }
-        else
-        {
-            userDetails = registerOAuth2UserDetail(oAuth2UserRequest, oAuth2UserDetails);
-        }
-        return new OAuth2UserDetailsCustom(
-                userDetails.getUserID(),
-                userDetails.getUsername(),
-                userDetails.getPassword(),
-                Collections.singletonList(new SimpleGrantedAuthority(userDetails.getRole().getRoleName()))
-        );
-    }
-
-    public User registerOAuth2UserDetail(OAuth2UserRequest oAuth2UserRequest, OAuth2UserDetails oAuth2UserDetails)
-    {
-        Role r = usersDao.findById(1L);
-        User user = new User();
-        user.setName(Objects.requireNonNullElse(oAuth2UserDetails.getName(), ""));
-        user.setEmail(oAuth2UserDetails.getEmail());
-        user.setProvider(oAuth2UserRequest.getClientRegistration().getRegistrationId());
-        user.setRole(r);
-        return usersDao.updateUser(user);
-    }
-
-    public User updateOAuth2UserDetail(User user, OAuth2UserDetails oAuth2UserDetails)
-    {
-        user.setEmail(oAuth2UserDetails.getEmail());
-        return usersDao.mergeUser(user);
-    }
-}
Index: src/main/java/com/tourMate/config/oauth2/OAuth2FacebookUser.java
===================================================================
--- src/main/java/com/tourMate/config/oauth2/OAuth2FacebookUser.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,19 +1,0 @@
-package com.tourMate.config.oauth2;
-
-import java.util.Map;
-
-public class OAuth2FacebookUser extends OAuth2UserDetails{
-    public OAuth2FacebookUser(Map<String, Object> attributes) {
-        super(attributes);
-    }
-
-    @Override
-    public String getName() {
-        return (String) attributes.get("name");
-    }
-
-    @Override
-    public String getEmail() {
-        return (String) attributes.get("email");
-    }
-}
Index: src/main/java/com/tourMate/config/oauth2/OAuth2GitHubUser.java
===================================================================
--- src/main/java/com/tourMate/config/oauth2/OAuth2GitHubUser.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,19 +1,0 @@
-package com.tourMate.config.oauth2;
-
-import java.util.Map;
-
-public class OAuth2GitHubUser extends OAuth2UserDetails{
-    public OAuth2GitHubUser(Map<String, Object> attributes) {
-        super(attributes);
-    }
-
-    @Override
-    public String getName() {
-        return (String) attributes.get("name");
-    }
-
-    @Override
-    public String getEmail() {
-        return (String) attributes.get("login");
-    }
-}
Index: src/main/java/com/tourMate/config/oauth2/OAuth2GoogleUser.java
===================================================================
--- src/main/java/com/tourMate/config/oauth2/OAuth2GoogleUser.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,19 +1,0 @@
-package com.tourMate.config.oauth2;
-
-import java.util.Map;
-
-public class OAuth2GoogleUser extends OAuth2UserDetails{
-    public OAuth2GoogleUser(Map<String, Object> attributes) {
-        super(attributes);
-    }
-
-    @Override
-    public String getName() {
-        return (String) attributes.get("name");
-    }
-
-    @Override
-    public String getEmail() {
-        return (String) attributes.get("email");
-    }
-}
Index: src/main/java/com/tourMate/config/oauth2/OAuth2UserDetails.java
===================================================================
--- src/main/java/com/tourMate/config/oauth2/OAuth2UserDetails.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,14 +1,0 @@
-package com.tourMate.config.oauth2;
-
-import java.util.Map;
-
-public abstract class OAuth2UserDetails {
-    protected Map<String, Object> attributes;
-
-    public OAuth2UserDetails(Map<String, Object> attributes) {
-        this.attributes = attributes;
-    }
-
-    public abstract String getName();
-    public abstract String getEmail();
-}
Index: src/main/java/com/tourMate/config/oauth2/OAuth2UserDetailsCustom.java
===================================================================
--- src/main/java/com/tourMate/config/oauth2/OAuth2UserDetailsCustom.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,83 +1,0 @@
-package com.tourMate.config.oauth2;
-
-import jakarta.persistence.Column;
-import org.springframework.security.core.GrantedAuthority;
-import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.security.oauth2.core.user.OAuth2User;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-public class OAuth2UserDetailsCustom implements OAuth2User, UserDetails {
-
-    Long id;
-    String username;
-    String password;
-    List<GrantedAuthority> authorities;
-    Map<String, Object> attributes;
-    Boolean locked = true;
-    Boolean enabled = true;
-    Boolean expired = false;
-
-
-    public OAuth2UserDetailsCustom(Long id, String username, String password, List<GrantedAuthority> authorities) {
-        this.id = id;
-        this.username = username;
-        this.password = password;
-        this.authorities = authorities;
-    }
-
-    @Override
-    public String getPassword() {
-        return password;
-    }
-
-    @Override
-    public String getUsername() {
-        return username;
-    }
-
-    @Override
-    public boolean isAccountNonExpired() {
-        return expired;
-    }
-
-    @Override
-    public boolean isAccountNonLocked() {
-        return locked;
-    }
-
-    @Override
-    public boolean isCredentialsNonExpired() {
-        return true;
-    }
-
-    @Override
-    public boolean isEnabled() {
-        return enabled;
-    }
-
-    @Override
-    public Map<String, Object> getAttributes() {
-        return attributes;
-    }
-
-    @Override
-    public Collection<? extends GrantedAuthority> getAuthorities() {
-        return authorities;
-    }
-
-    @Override
-    public String getName() {
-        return String.valueOf(id);
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-}
Index: src/main/java/com/tourMate/config/oauth2/OAuth2UserDetailsFactory.java
===================================================================
--- src/main/java/com/tourMate/config/oauth2/OAuth2UserDetailsFactory.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,27 +1,0 @@
-package com.tourMate.config.oauth2;
-
-import com.tourMate.entities.Providers;
-
-import java.util.Map;
-
-public class OAuth2UserDetailsFactory {
-    public static OAuth2UserDetails createOAuth2UserDetails (String registrationId, Map<String, Object> attributes)
-    {
-        if(registrationId.equals(Providers.google.name()))
-        {
-            return new OAuth2GoogleUser(attributes);
-        }
-        else if(registrationId.equals(Providers.facebook.name()))
-        {
-            return new OAuth2FacebookUser(attributes);
-        }
-        else if(registrationId.equals(Providers.github.name()))
-        {
-            return new OAuth2GitHubUser(attributes);
-        }
-        else
-        {
-            throw  new RuntimeException("Login with this provider is not supported!");
-        }
-    }
-}
Index: src/main/java/com/tourMate/controllers/HotelController.java
===================================================================
--- src/main/java/com/tourMate/controllers/HotelController.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/controllers/HotelController.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -2,8 +2,7 @@
 
 import com.tourMate.dto.HotelDto;
-import com.tourMate.dto.HotelReservationDto;
-import com.tourMate.dto.HotelReservationUserDto;
 import com.tourMate.entities.*;
 import com.tourMate.services.HotelManager;
+import com.tourMate.services.UsersManager;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.format.annotation.DateTimeFormat;
@@ -35,4 +34,5 @@
             return ResponseEntity.ok(hoteli);
         } catch (Exception e) {
+            // Handle the exception, log it, and return an error response
             return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
         }
@@ -40,6 +40,8 @@
 
     @GetMapping(path = "/hotel/user/{id}")
-    public ResponseEntity<List<Hotels>> getHotelsForUser(@PathVariable(name = "id") long userId) {
-        try {
+    public ResponseEntity<List<Hotels>> getHotelsForUser (@PathVariable(name = "id") long userId)
+    {
+        try {
+
             List<Hotels> hoteli = hotelManager.getHotelsForUser(userId);
             return ResponseEntity.ok(hoteli);
@@ -49,7 +51,9 @@
     }
 
-    @GetMapping(path = "/hotel/{id}/list")
-    public ResponseEntity<Hotels> getHotelById(@PathVariable(name = "id") long hotelId) {
-        try {
+    @GetMapping(path = "/hotel/list/{id}")
+    public ResponseEntity<Hotels> getHotelById (@PathVariable(name = "id") long hotelId)
+    {
+        try {
+
             return ResponseEntity.ok(hotelManager.findHotelByID(hotelId));
         } catch (Exception e) {
@@ -60,5 +64,6 @@
 
     @PostMapping(path = "/hotel/edit")
-    public void edit(@RequestBody Hotels hotel) {
+    public void edit(@RequestBody Hotels hotel)
+    {
         hotelManager.editHotel(hotel.getHotelId(), hotel.getHotelName(), hotel.getHotelDescripiton(), hotel.getHotelLocation(), hotel.getHotelEDBS(), hotel.getParking(), hotel.getPetFriendly(), hotel.getInternetAvailable());
     }
@@ -66,12 +71,28 @@
     @GetMapping(path = "/hotel/delete")
     public ResponseEntity remove(@RequestParam(name = "hotelId") long hotelId) {
-        try {
+        try
+        {
             hotelManager.deleteHotel(hotelId);
             return new ResponseEntity(HttpStatus.OK);
-        } catch (Exception exception) {
-            return new ResponseEntity(HttpStatus.NOT_FOUND);
-        }
-    }
-
+        }
+        catch (Exception exception)
+        {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+    }
+
+    // HOTEL IMAGE CRUD
+    @GetMapping(path = "/hotel/images")
+    public List<HotelsImages> getHotelImages(@RequestBody Hotels hotel)
+    {
+        return hotelManager.getHotelImages(hotel);
+    }
+
+    @GetMapping(path = "/hotel/images/add")
+    public void addHotelImages(@RequestParam(name = "hotelId") long hotelId, @RequestParam(name = "url") String url)
+    {
+        Hotels h = hotelManager.findHotelByID(hotelId);
+        hotelManager.addHotelImage(h, url);
+    }
 
     @GetMapping(path = "/hotel/images/delete")
@@ -80,5 +101,6 @@
             hotelManager.deleteHotelImage(hotelId);
             return new ResponseEntity(HttpStatus.OK);
-        } catch (Exception exception) {
+        }
+        catch (Exception exception) {
             return new ResponseEntity(HttpStatus.NOT_FOUND);
         }
@@ -86,5 +108,6 @@
 
     @GetMapping(path = "/hotel/{id}/room")
-    public List<HotelRoom> getHotelRooms(@PathVariable(value = "id") long hotelId) {
+    public List<HotelRoom> getHotelRooms(@PathVariable(value = "id") long hotelId)
+    {
         System.out.println("ovde so id: " + hotelId);
         return hotelManager.getRoomsOfHotel(hotelId);
@@ -94,7 +117,7 @@
     //HOTEL ROOM CRUD
     @PostMapping(path = "/hotel/rooms/add")
-    public void addRoom(@RequestBody HotelRoom room,
-                        @RequestParam(name = "hotelId") long hotelId) {
-        hotelManager.createRoom(hotelId, room.getHotelRoomDescription(), room.getHotelRoomName(), room.getKitchenAvailable(), room.getAirConditioning(), room.getBalcony(), room.getPrice(), room.getNumOfBeds());
+    public void addRoom(@RequestBody HotelRoom room, @RequestParam(name = "hotelId") long hotelId) {
+        Hotels h = hotelManager.findHotelByID(hotelId);
+        hotelManager.createRoom(h, room.getHotelRoomDescription(), room.getHotelRoomName(), room.getKitchenAvailable(), room.getAirConditioning(), room.getBalcony(), room.getPrice());
     }
 
@@ -106,8 +129,11 @@
     @GetMapping(path = "/hotel/rooms/delete")
     public ResponseEntity removeRoom(@RequestParam(name = "hotelRoomId") long hotelRoomId) {
-        try {
+        try
+        {
             hotelManager.deleteRoom(hotelRoomId);
             return new ResponseEntity(HttpStatus.OK);
-        } catch (Exception exception) {
+        }
+        catch (Exception exception)
+        {
             return new ResponseEntity(HttpStatus.NOT_FOUND);
         }
@@ -123,31 +149,39 @@
     @GetMapping(path = "/hotel/rooms/reservation/delete")
     public ResponseEntity removeReservation(@RequestParam(name = "hotelRoomReservationId") long hotelRoomReservationId) {
-        try {
+        try
+        {
             hotelManager.deleteReservation(hotelRoomReservationId);
             return new ResponseEntity(HttpStatus.OK);
-        } catch (Exception exception) {
-            return new ResponseEntity(HttpStatus.NOT_FOUND);
-        }
-    }
-
-    //HOTEL AVAILABILITY CRUD
+        }
+        catch (Exception exception)
+        {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+    }
+
+        //HOTEL AVAILABILITY CRUD
     @PostMapping(path = "/hotel/rooms/available/{id}/add")
-    public void addRoomAvailible(@RequestBody HotelRoomAvailable hotelRoomAvailable,
-                                 @PathVariable long id) {
-
-        hotelManager.createRoomAvailible(id, hotelRoomAvailable.getDateFrom(), hotelRoomAvailable.getDateTo(), hotelRoomAvailable.getNumberOfBeds());
+    public void addRoomAvailible(@RequestBody HotelRoomAvailable hotelRoomAvailable, @PathVariable long id)
+    {
+        HotelRoom hotelRoom = hotelManager.findRoomById(id);
+        hotelManager.createRoomAvailible(hotelRoom, hotelRoomAvailable.getDateFrom(), hotelRoomAvailable.getDateTo(), hotelRoomAvailable.getNumberOfBeds());
     }
 
     @PostMapping(path = "/hotel/rooms/available/edit")
-    public void editRoomAvailible(@RequestBody HotelRoomAvailable hotelRoomAvailable) {
+    public void editRoomAvailible(@RequestBody HotelRoomAvailable hotelRoomAvailable)
+    {
         hotelManager.editRoomAvailible(hotelRoomAvailable.getHotelRoomAvailableId(), hotelRoomAvailable.getHotelRoom(), hotelRoomAvailable.getDateFrom(), hotelRoomAvailable.getDateTo(), hotelRoomAvailable.getNumberOfBeds());
     }
 
     @GetMapping(path = "/hotel/rooms/available/remove")
-    public ResponseEntity removeRoomAvailible(@RequestParam(name = "hotelRoomAvailibleId") long hotelRoomAvailibleId) {
-        try {
+    public ResponseEntity removeRoomAvailible(@RequestParam(name = "hotelRoomAvailibleId") long hotelRoomAvailibleId)
+    {
+        try
+        {
             hotelManager.deleteRoomAvailible(hotelRoomAvailibleId);
             return new ResponseEntity(HttpStatus.OK);
-        } catch (Exception ex) {
+        }
+        catch (Exception ex)
+        {
             return new ResponseEntity(HttpStatus.NOT_FOUND);
         }
@@ -155,24 +189,26 @@
 
     @GetMapping(path = "hotel/rooms/{id}/available")
-    public List<HotelRoomAvailable> getRoomAvailability(@PathVariable Long id) {
-        return hotelManager.getRoomsAvailableById(id);
+    public List<HotelRoomAvailable> getRoomAvailability(@PathVariable Long id)
+    {
+        return hotelManager.getRoomsAvailibility();
     }
 
     @GetMapping(path = "/hotel/search")
-    public List<HotelDto> searchAvailibleRooms(@RequestParam(name = "hotelLocation") String hotelLocation,
-                                               @RequestParam(name = "dateFrom") @DateTimeFormat(pattern = "yyyy-MM-dd") Date dateFrom,
-                                               @RequestParam(name = "dateTo") @DateTimeFormat(pattern = "yyyy-MM-dd") Date dateTo,
-                                               @RequestParam(name = "numBeds") int numBeds,
-                                               @RequestParam(name = "flexible") Boolean flexible) {
-        return hotelManager.getRoomsAvailibilityByDateAndLocation(hotelLocation, dateFrom, dateTo, numBeds, flexible);
+    public List<HotelDto> searchAvailibleRooms(@RequestParam(name = "hotelLocation") String hotelLocation, @RequestParam(name = "dateFrom") @DateTimeFormat(pattern = "yyyy-MM-dd") Date dateFrom,
+                                               @RequestParam(name = "dateTo") @DateTimeFormat(pattern = "yyyy-MM-dd") Date dateTo, @RequestParam(name = "numBeds") int numBeds)
+    {
+        System.out.println(hotelLocation);
+        System.out.println(dateFrom + " " + dateTo);
+        return hotelManager.getRoomsAvailibilityByDateAndLocation(hotelLocation, dateFrom, dateTo, numBeds);
     }
 
     @PostMapping(path = "/hotel/reserve")
-    public void reserveHotelRoom(@RequestParam(name = "hotelRoomId") Long hotelRoomId,
+    public void reserveHotelRoom(@RequestParam(name = "hotelRoomId")Long hotelRoomId,
                                  @RequestParam(name = "userId") Long userId,
                                  @RequestParam(name = "hotelRoomAvailableId") Long hotelRoomAvailableId,
                                  @RequestParam(name = "numberOfBeds") Integer numberOfBeds,
                                  @RequestParam(name = "from") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) Date from,
-                                 @RequestParam(name = "to") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) Date to) {
+                                 @RequestParam(name = "to") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) Date to){
+
 
 
@@ -180,33 +216,3 @@
     }
 
-    @GetMapping(path = "/hotel/{id}/reservations/active")
-    public List<HotelReservationDto> getActiveReservationsForHotel(@PathVariable Long id) {
-        return hotelManager.findVaidReseravtionsByHotel(id);
-    }
-
-    @GetMapping(path = "/hotel/reservations/user/{id}")
-    public List<HotelReservationUserDto> getActiveReservationsForUser(@PathVariable Long id) {
-        return hotelManager.findValidHotelReservationsByUser(id);
-    }
-
-    @GetMapping(path = "/hotel/reservations/user/{id}/past")
-    public List<HotelReservationUserDto> getPastReservationsForUser(@PathVariable Long id) {
-        return hotelManager.findPastHotelReservationsByUser(id);
-    }
-
-    @GetMapping(path = "/hotel/{id}/images")
-    public List<HotelsImages> getImagesForHotel(@PathVariable Long id) {
-        return hotelManager.getHotelImages(id);
-    }
-
-    @GetMapping(path = "/room/{id}/images")
-    public List<HotelRoomImages> getImagesForHotelRoom(@PathVariable Long id) {
-        return hotelManager.getRoomImages(id);
-    }
-
-    @PostMapping("/hotel/{id}/cancel")
-    public void cancelHotelReservation(@PathVariable Long id) {
-        hotelManager.deleteReservation(id);
-    }
-
 }
Index: src/main/java/com/tourMate/controllers/ImageController.java
===================================================================
--- src/main/java/com/tourMate/controllers/ImageController.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,54 +1,0 @@
-package com.tourMate.controllers;
-
-import com.tourMate.services.HotelManager;
-import com.tourMate.services.ImageManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.io.InputStreamResource;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@CrossOrigin("*")
-@RestController
-public class ImageController {
-
-    @Autowired
-    HotelManager hotelManager;
-    @Autowired
-    ImageManager imageManager;
-
-    @PostMapping(value = "/upload/{type}/{id}", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
-    public ResponseEntity<?> uploadImageHotel(@RequestParam List<MultipartFile> files,
-                                              @PathVariable Long id,
-                                              @PathVariable String type) {
-
-        imageManager.uploadImages(files, id, type);
-        return ResponseEntity.ok().build();
-    }
-
-    @GetMapping("/download")
-    public ResponseEntity<?> downloadFile1(@RequestParam String fileName) throws IOException {
-
-        File file = new File(fileName);
-        InputStreamResource resource = new InputStreamResource(new FileInputStream(file));
-
-        return ResponseEntity.ok()
-                .header(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + file.getName())
-                .contentType(MediaType.APPLICATION_OCTET_STREAM)
-                .contentLength(file.length())
-                .body(resource);
-    }
-}
Index: src/main/java/com/tourMate/controllers/ImagesController.java
===================================================================
--- src/main/java/com/tourMate/controllers/ImagesController.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/controllers/ImagesController.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -0,0 +1,54 @@
+package com.tourMate.controllers;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.core.io.InputStreamResource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+@CrossOrigin("*")
+@RestController
+@RequestMapping("/images")
+class ImageController {
+
+    private static final Logger logger = LoggerFactory.getLogger(ImageController.class);
+
+    @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+    public ResponseEntity uploadFile(@RequestParam MultipartFile file, @RequestParam String type) {
+
+        try
+        {
+            Path desktopPath = Paths.get(System.getProperty("user.home"), "Desktop\\images_tm");
+            Path filePath = desktopPath.resolve(file.getOriginalFilename());
+            System.out.println(filePath);
+            file.transferTo(filePath.toFile());
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+
+        logger.info(String.format("File name '%s' uploaded successfully.", file.getOriginalFilename()));
+        return ResponseEntity.ok().build();
+    }
+
+    @GetMapping("/download")
+    public ResponseEntity downloadFile1(@RequestParam String fileName) throws IOException {
+
+        File file = new File(fileName);
+        InputStreamResource resource = new InputStreamResource(new FileInputStream(file));
+
+        return ResponseEntity.ok()
+                .header(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + file.getName())
+                .contentType(MediaType.APPLICATION_OCTET_STREAM)
+                .contentLength(file.length())
+                .body(resource);
+    }
+}
Index: src/main/java/com/tourMate/controllers/RestaurantController.java
===================================================================
--- src/main/java/com/tourMate/controllers/RestaurantController.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/controllers/RestaurantController.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -1,10 +1,6 @@
 package com.tourMate.controllers;
 
-import com.tourMate.dto.HotelReservationDto;
 import com.tourMate.dto.RestaurantDto;
-import com.tourMate.dto.RestaurantReservationDto;
-import com.tourMate.dto.RestaurantReservationUserDto;
 import com.tourMate.entities.*;
-import com.tourMate.services.MenuManager;
 import com.tourMate.services.RestaurantManager;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -24,6 +20,4 @@
     @Autowired
     RestaurantManager restaurantManager;
-    @Autowired
-    MenuManager menuManager;
 
     @PostMapping(path = "/restaurant/add")
@@ -35,20 +29,7 @@
 
     @PostMapping(path = "/restaurant/{id}/menu/add")
-    public void addMenu(@PathVariable(name = "id") long restaurantId, @RequestBody Menu menu) {
+    public void addMenu(@PathVariable(name = "id") long restaurantId, @RequestBody Menu menu)
+    {
         restaurantManager.addMenuToRestaurant(restaurantId, menu);
-    }
-
-    @PostMapping(path = "/menu/{id}/edit")
-    public void editMenu(@PathVariable Long id,
-                         @RequestParam String name,
-                         @RequestParam String ingredients,
-                         @RequestParam double price)
-    {
-        menuManager.editMenu(id, name, ingredients, price);
-    }
-
-    @PostMapping("/restaurant/{id}/cancel")
-    public void removeRestaurant(@PathVariable Long id){
-        restaurantManager.deleteReservation(id);
     }
 
@@ -61,5 +42,5 @@
     public List<Restaurant> showRestaurantsForUser(@PathVariable(name = "id") long userId) {
 
-        return restaurantManager.getRestaurantsByUser(userId);
+        return restaurantManager.getRestaurants();
     }
 
@@ -71,5 +52,6 @@
 
     @GetMapping(path = "/restaurant/{id}")
-    public Restaurant getRestaurantById(@PathVariable(name = "id") long restaurantId) {
+    public Restaurant getRestaurantById(@PathVariable(name = "id") long restaurantId)
+    {
         return restaurantManager.findRestaurantByID(restaurantId);
     }
@@ -102,5 +84,6 @@
             restaurantManager.removeRestaurantImage(restaurantId);
             return new ResponseEntity(HttpStatus.OK);
-        } catch (Exception exception) {
+        }
+        catch (Exception exception) {
             return new ResponseEntity(HttpStatus.NOT_FOUND);
         }
@@ -135,15 +118,7 @@
 
     // RESTAURANT RESERVATION CRUD
-
-    @PostMapping(path = "/restaurant/reserve")
-    public void reserveRestaurantTable(@RequestParam(name = "restaurantTableId") Long restaurantTableId,
-                                       @RequestParam(name = "userId") Long userId,
-                                       @RequestParam(name = "restaurantAvailibleId") Long restaurantAvailibleId,
-                                       @RequestParam(name = "hourFrom") String hourFrom,
-                                       @RequestParam(name = "hourTo") String hourTo,
-                                       @RequestParam(name = "date") @DateTimeFormat(pattern = "yyyy-MM-dd") Date date) {
-
-
-        restaurantManager.createReservation(userId, restaurantTableId, restaurantAvailibleId, hourFrom, hourTo, date);
+    @PostMapping(path = "/restaurant/table/reservation/add")
+    public void addTableReservation(@RequestBody RestaurantReservations restaurantReservations) {
+        //restaurantManager.createReservation(restaurantReservations);
     }
 
@@ -152,45 +127,15 @@
                                   @PathVariable Long id) {
         System.out.println(restaurantsAvailible.getHourFrom() + " " + restaurantsAvailible.getHourTo());
-        restaurantManager.createTableAvailable(id, restaurantsAvailible.getHourFrom(), restaurantsAvailible.getHourTo(), restaurantsAvailible.getNumTables());
+        restaurantManager.createTableAvailable(id, restaurantsAvailible.getHourFrom(), restaurantsAvailible.getHourTo());
     }
 
     @GetMapping(path = "/restaurant/search")
     public List<RestaurantDto> searchAvailableRestaurant(@RequestParam(name = "restaurantLocation") String restaurantLocation,
-                                                         @RequestParam(name = "date") @DateTimeFormat(pattern = "yyyy-MM-dd") Date date,
-                                                         @RequestParam(name = "hourFrom") String hourFrom,
-                                                         @RequestParam(name = "hourTo") String hourTo,
-                                                         @RequestParam(name = "numPeople") int noSeats) {
-
-        return restaurantManager.getTablesByDateAndLocation(restaurantLocation, date, hourFrom, hourTo, noSeats);
-    }
-
-    @GetMapping(path = "/restaurant/reservations/user/{id}")
-    public List<RestaurantReservationUserDto> getActiveReservationsForUser(@PathVariable Long id)
-    {
-        return restaurantManager.findValidRestaurantReservationsByUser(id);
-    }
-
-    @GetMapping(path = "/restaurant/reservations/user/{id}/past")
-    public List<RestaurantReservationUserDto> getPastReservationsForUser(@PathVariable Long id)
-    {
-        return restaurantManager.findPastRestaurantReservationsByUser(id);
-    }
-
-    @GetMapping(path = "/restaurant/{id}/images")
-    public List<RestaurantImages> getImagesForRestaurant(@PathVariable Long id)
-    {
-        return restaurantManager.getRestaurantImages(id);
-    }
-
-    @GetMapping(path = "/menu/{id}/images")
-    public List<MenuImages> getImagesForMenu(@PathVariable Long id)
-    {
-        return restaurantManager.getMenuImages(id);
-    }
-
-    @GetMapping(path = "/restaurant/{id}/reservations/active")
-    public List<RestaurantReservationDto> getActiveReservationsForHotel(@PathVariable Long id)
-    {
-        return restaurantManager.findReservationByRestaurant(id);
+                                                         @RequestParam(name = "cousineType") String cousineType,
+                                                         @RequestParam(name = "hourFrom") @DateTimeFormat(pattern = "yyyy-mm-ddThh:mm") Date hourFrom,
+                                                         @RequestParam(name = "hourTo") @DateTimeFormat (pattern = "yyyy-mm-ddThh:mm") Date hourTo,
+                                                         @RequestParam(name = "noSeats") int noSeats){
+            //return restaurantManager.getTablesByDateAndLocation(restaurantLocation, cousineType, hourFrom, hourTo, noSeats);
+        return null;
     }
 }
Index: src/main/java/com/tourMate/controllers/ReviewController.java
===================================================================
--- src/main/java/com/tourMate/controllers/ReviewController.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/controllers/ReviewController.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -15,12 +15,7 @@
 
     @PostMapping(path = "/review/add")
-    public void add(@RequestParam(name = "title") String title,
-                    @RequestParam(name = "numStars") Integer numStars,
-                    @RequestParam(name = "description") String description,
-                    @RequestParam(name = "hotelId", required = false) Long hotelId,
-                    @RequestParam(name = "restaurantId", required = false) Long restaurantId,
-                    @RequestParam(name = "transportId", required = false) Long transportId,
-                    @RequestParam(name = "reservationId") Long reservationId) {
-        reviewManager.createReview(title, numStars, description, hotelId, restaurantId, transportId, reservationId);
+    public void add(@RequestBody Reviews review) {
+//        String title, int numStar, String description, Hotels hotel, Restaurants restaurant, Transport transport
+        reviewManager.createReview(review.getTitle(), review.getNumStar(), review.getDescription(), review.getHotel(), review.getRestaurant(), review.getTransport());
     }
 
@@ -28,4 +23,5 @@
     public void edit(@RequestBody Reviews review)
     {
+//        editReview(long id, String title, String description, int numStar, Hotels hotel, Restaurants restaurant, Transport transport)
         reviewManager.editReview(review.getReviewId(), review.getTitle(), review.getDescription(), review.getNumStar(), review.getHotel(), review.getRestaurant(), review.getTransport());
     }
Index: src/main/java/com/tourMate/controllers/TransportController.java
===================================================================
--- src/main/java/com/tourMate/controllers/TransportController.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/controllers/TransportController.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -1,5 +1,7 @@
 package com.tourMate.controllers;
 
-import com.tourMate.dto.*;
+import com.tourMate.dto.RouteListingDto;
+import com.tourMate.dto.TransportDto;
+import com.tourMate.dto.TransportListingDto;
 import com.tourMate.entities.*;
 import com.tourMate.services.TransportManager;
@@ -10,4 +12,5 @@
 import org.springframework.web.bind.annotation.*;
 
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -20,8 +23,7 @@
 
     // TRANSPORT CRUD //
-    @PostMapping(path = "/transport/add/{userId}")
-    public void add(@RequestBody Transport transport,
-                    @PathVariable Long userId) {
-        transportManager.createTransport(transport.getTransportName(), transport.getCarBrand(), transport.getCarType(), transport.getCarManufacturedYear(), transport.getNoPassengers(), transport.getNoBags(), transport.getEMBG(), userId, transport.getCarPlate());
+    @PostMapping(path = "/transport/add")
+    public void add(@RequestBody Transport transport) {
+        transportManager.createTransport(transport.getTransportName(), transport.getCarBrand(), transport.getCarType(), transport.getCarManufacturedYear(), transport.getNoPassengers(), transport.getNoBags(), transport.getEMBG(), new User(), transport.getCarPlate());
 
     }
@@ -46,4 +48,5 @@
     public TransportDto getTransport(@PathVariable(name = "id") long transportId)
     {
+        System.out.println("TUKA SUUUUUM");
         return transportManager.findTransportById(transportId);
     }
@@ -61,4 +64,9 @@
     // TANSPORT RESERVATION CRUDE //
 
+    @PostMapping(path = "/transport/reservation/sadd")
+    public void add(@RequestBody TransportReservation transportReservation) {
+        transportManager.createTransportReservation(transportReservation.getTransport(), transportReservation.getDepartureLocation(), transportReservation.getArrivalLocation(), transportReservation.getDate(), transportReservation.getNoSeats(), transportReservation.getUser(), transportReservation.getDepartureHour());
+    }
+
     @GetMapping(path = "/transport/reservations")
     public List<TransportReservation> showTransportReservations() {
@@ -68,5 +76,5 @@
     @PostMapping(path = "/transport/reservations/edit")
     public void edit(@RequestBody TransportReservation transportReservation) {
-//        transportManager.editTransportReservation(transportReservation.getTransportRoute().getParentRoute().getTransport(), getTransport(), transportReservation.getReservationID(), transportReservation.getDepartureLocation(), transportReservation.getArrivalLocation(), transportReservation.getDate(), transportReservation.getNoSeats(), transportReservation.getUser(), transportReservation.getDepartureHour());
+        transportManager.editTransportReservation(transportReservation.getTransport(), transportReservation.getReservationID(), transportReservation.getDepartureLocation(), transportReservation.getArrivalLocation(), transportReservation.getDate(), transportReservation.getNoSeats(), transportReservation.getUser(), transportReservation.getDepartureHour());
     }
 
@@ -84,6 +92,13 @@
     @PostMapping(path = "/transport/available/add")
     public void add(@RequestBody TransportAvailible transportAvailable, @RequestParam(name = "transportId") long transportId) {
-
-        transportManager.createTransportAvailable(transportAvailable, transportAvailable.getTransport(), transportAvailable.getFrom(), transportAvailable.getTo(), transportAvailable.getDate(), transportAvailable.getFreeSpace(), transportAvailable.getTime(), transportId, transportAvailable.getRoutes());
+        System.out.println("OREEEEEL");
+        System.out.println("DVA ORLA");
+        Transport t = transportManager.getTransportById(transportId);
+        List<TransportRoute> routes = transportAvailable.getRoutes().stream().toList();
+        routes.get(0).setDeparture(transportAvailable.getDate());
+        transportAvailable.setTime(routes.get(routes.size() - 1).getArrival());
+        routes.forEach(x -> x.setParentRoute(transportAvailable));
+        transportAvailable.setTransport(t);
+        transportManager.createTransportAvailable(transportAvailable.getTransport(), transportAvailable.getFrom(), transportAvailable.getTo(), transportAvailable.getDate(), transportAvailable.getFreeSpace(), transportAvailable.getTime(), routes);
     }
 
@@ -120,34 +135,7 @@
 
     @GetMapping(path = "/transport/search")
-    public List<TransportListingDto> searchAvailableTransport(@RequestParam(name = "from") String from,
-                                                              @RequestParam(name = "to") String to,
-                                                              @RequestParam(name = "date") @DateTimeFormat(pattern = "yyyy-MM-dd") Date date,
-                                                              @RequestParam(name = "numPassengers") int numPassengers){
-        return transportManager.getTransportsAvailableByFilters(from, to, date, numPassengers);
-    }
-
-    @PostMapping(path = "/transport/reserve")
-    public void reserveTransport(@RequestParam(name = "transportRouteId") Long transportRouteId,
-                                 @RequestParam(name = "userId") Long userId,
-                                 @RequestParam(name = "numSeats") int numSeats)
-    {
-        transportManager.createTransportReservation(transportRouteId, userId, numSeats);
-    }
-
-    @GetMapping(path = "/transport/reservations/user/{id}")
-    public List<TransportReservationUserDto> getActiveReservationsForUser(@PathVariable Long id)
-    {
-        return transportManager.findValidTransportReservationsByUser(id);
-    }
-
-    @GetMapping(path = "/transport/reservations/user/{id}/past")
-    public List<TransportReservationUserDto> getPastReservationsForUser(@PathVariable Long id)
-    {
-        return transportManager.findPastTransportReservationsByUser(id);
-    }
-
-    @GetMapping(path = "/transport/{id}/reservations/active")
-    public List<TransportReservation> showTransportReservationsByTransport(@PathVariable Long id) {
-        return transportManager.findTransportReservationByTransportId(id);
+    public List<TransportListingDto> searchAvailableTransport(@RequestParam(name = "from") String from, @RequestParam(name = "to") String to,
+                                                              @RequestParam(name = "date") @DateTimeFormat(pattern = "yyyy-MM-dd") Date date){
+        return transportManager.getTransportsAvailableByFilters(from, to, date);
     }
 }
Index: src/main/java/com/tourMate/controllers/UsersController.java
===================================================================
--- src/main/java/com/tourMate/controllers/UsersController.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/controllers/UsersController.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -1,8 +1,6 @@
 package com.tourMate.controllers;
 
-import com.tourMate.dto.PrincipalInfo;
 import com.tourMate.entities.Business;
 import com.tourMate.entities.User;
-import com.tourMate.config.oauth2.OAuth2UserDetailsCustom;
 import com.tourMate.services.BusinessManager;
 import com.tourMate.services.UsersManager;
@@ -11,7 +9,7 @@
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.core.Authentication;
-import org.springframework.security.core.parameters.P;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.ArrayList;
 import java.util.List;
 
@@ -43,32 +41,7 @@
     }
 
-    @GetMapping(path = "/business/unapproved")
-    public List<Business> getAllUnapprovedBusinesses()
-    {
-        return businessManager.getUnapprovedBusinesses();
-    }
-
-    @GetMapping(path = "/users/unapproved")
-    public List<User> getAllUnapprovedUsers()
-    {
-        return usersManager.getUnapprovedUsers();
-    }
-
-    @GetMapping(path = "/users/approve/{userId}")
-    public ResponseEntity<?> approveUserProfile(@PathVariable Long userId)
-    {
-        usersManager.approveUserProfile(userId);
-        return new ResponseEntity<>(HttpStatus.OK);
-    }
-
-    @GetMapping(path = "/business/approve/{businessId}")
-    public ResponseEntity<?> approveBusiness(@PathVariable Long businessId)
-    {
-        businessManager.approveBusiness(businessId);
-        return new ResponseEntity<>(HttpStatus.OK);
-    }
-
     @PostMapping(path = "/register")
     public List<User> add(@RequestBody User user) {
+        System.out.println(user.getName() + user.getSurname());
         usersManager.createUser(user.getName(), user.getSurname(), user.getEmail(), user.getBirthDate(), user.getAddress(), user.getContact());
         return usersManager.getCreatedUsers();
@@ -88,57 +61,27 @@
     @GetMapping(value = "/principal")
     @ResponseBody
-    public PrincipalInfo currentUser(Authentication authentication) {
-        Long id;
-        if(authentication.getPrincipal() instanceof OAuth2UserDetailsCustom)
-        {
-            OAuth2UserDetailsCustom oAuth2UserDetailsCustom = (OAuth2UserDetailsCustom) authentication.getPrincipal();
-            id = oAuth2UserDetailsCustom.getId();
-        }
-        else
-        {
-            User user = (User) authentication.getPrincipal();
-            id = user.getUserID();
-        }
-        return usersManager.getPrincipalInfo(id);
+    public User currentUser(Authentication authentication) {
+        return (User) authentication.getPrincipal();
     }
     @PostMapping(path = "/user/edit")
-    public void edit(@RequestBody User user)
+    public List<User> edit(@RequestBody User user)
     {
+        System.out.println(user.getName() + " " + user.getSurname() + "id e " + user.getUserID());
+        // long userID, String name, String surname, String email, Date birthDate, String address, String contact
         usersManager.editUser(user.getUserID(), user.getName(), user.getSurname(), user.getEmail(), user.getBirthDate(), user.getAddress(), user.getContact());
+        return usersManager.getCreatedUsers();
     }
 
     @GetMapping(path = "/user/delete")
-    public ResponseEntity<?> remove(@RequestParam(name = "userId") long userId) {
+    public ResponseEntity remove(@RequestParam(name = "userId") long userId) {
         try
         {
             usersManager.deleteUser(userId);
-            return new ResponseEntity<>(HttpStatus.OK);
+            return new ResponseEntity(HttpStatus.OK);
         }
         catch (Exception exception)
         {
-            return new ResponseEntity<>(HttpStatus.NOT_FOUND);
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
         }
-    }
-
-    @GetMapping("/users/unlock/{id}")
-    public ResponseEntity<?> unlock(@PathVariable Long id)
-    {
-        usersManager.unlock(id);
-        return new ResponseEntity<>(HttpStatus.OK);
-    }
-
-    @PostMapping("/users/{id}/connect")
-    public ResponseEntity<?> connectAccount(@PathVariable Long id,
-                                            @RequestParam String username,
-                                            @RequestParam String password)
-    {
-        usersManager.connectAccount(id, username, password);
-        return new ResponseEntity<>(HttpStatus.OK);
-    }
-
-    @GetMapping("/users/{id}/connected")
-    public List<User> getConnectedAccounts(@PathVariable Long id)
-    {
-        return usersManager.findConnectedAccountsByUser(id);
     }
 }
Index: src/main/java/com/tourMate/controllers/UtilsController.java
===================================================================
--- src/main/java/com/tourMate/controllers/UtilsController.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,20 +1,0 @@
-package com.tourMate.controllers;
-
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.servlet.mvc.support.RedirectAttributes;
-import org.springframework.web.servlet.view.RedirectView;
-import org.springframework.web.util.UriComponentsBuilder;
-
-import java.net.http.HttpResponse;
-
-@Controller
-public class UtilsController {
-    @GetMapping("/login")
-    public String getLoginPage()
-    {
-        return "login";
-    }
-}
Index: src/main/java/com/tourMate/dao/BusinessDao.java
===================================================================
--- src/main/java/com/tourMate/dao/BusinessDao.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dao/BusinessDao.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -9,23 +9,14 @@
 public interface BusinessDao {
 
-    List<Business> getCreatedBusinesses();
-
-    Business findBusinessById(long businessId);
+    @Transactional
+    void createBusiness(Business business, long userId);
+    public List<Business> getUnapprovedBusinessesOfUser(long userId);
+    public void deleteBusiness(long businessId);
+    public List<Business> getCreatedBusinesses();
+    public Business findBusinessById (long businessId);
 
     @Transactional
-    void createBusiness(Business business);
+    void editBusiness(long businessId, String name, String phone, String address, String edbs, User user, boolean approved);
+    public boolean hasBusiness(long userId);
 
-    List<Business> getUnapprovedBusinessesOfUser(User u);
-
-    @Transactional
-    void deleteBusiness(Business business);
-
-    boolean hasBusiness(User u);
-
-    List<Business> getUnapprovedBusinesses();
-
-    void approveBusiness(Business business);
-
-    @Transactional
-    void editBusiness(Business business);
 }
Index: src/main/java/com/tourMate/dao/HotelDao.java
===================================================================
--- src/main/java/com/tourMate/dao/HotelDao.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dao/HotelDao.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -9,138 +9,41 @@
 
 public interface HotelDao {
-    @Transactional
-    void createHotel(Hotels hotel);
+    public void createHotel(Hotels hotel, long userId);
+    public void editHotel(long hotelId, String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable);
+    public void deleteHotel(long hotelId);
+    public Hotels findHotelByID (long hotelId);
+    public List<Hotels> getHotels();
+    public List<Hotels> getHotelsForUser(long userId);
+    public List<Hotels> getHotelsByLocation(String hotelLocation);
 
-    List<Hotels> getHotels();
+    public void addHotelImage(Hotels hotel, String url);
+    public void deleteHotelImage(long hotelImageId);
+    public HotelsImages findHotelImageById(long hotelImageId);
+    public List<HotelsImages> getHotelImages(Hotels hotels);
+    public List<HotelRoomImages> getRoomImages(HotelRoom hotelRoom);
 
-    List<Hotels> getHotelsForUser(User u);
-
-    List<Hotels> getHotelsByLocation(String hotelLocation);
+    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price);
+    public void editRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String HotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price);
+    public void deleteRoom(long hotelRoomId);
+    public HotelRoom findRoomById (long hotelRoomId);
+    public List<HotelRoom> getRoomsOfHotel (long hotelId);
+    public List<HotelRoomAvailable> getRoomsAvailable(Long id);
 
     @Transactional
-    void editHotel(Hotels hotel);
+    public void createRoomAvailible(HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
+    public void editRoomAvailible(long hotelRoomAvailableId, HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
+    public void deleteRoomAvailible(long hotelRoomAvailableId);
+    public HotelRoomAvailable findAvailibleRoomById(long hotelRoomAvailableId);
+    public List<HotelRoomAvailable> getRoomsAvailibility();
+    public List<HotelRoomAvailable> getRoomsAvailibilityByHotel(Hotels hotel);
+    public List<HotelRoomAvailable> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds);
 
-    @Transactional
-    void deleteHotel(Hotels hotel);
+    public void createReservation(User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds);
+    public void editReservation(long hotelRoomReservedId, User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds);
+    public void deleteReservation(long hotelRoomReservedId);
+    public HotelRoomReservations findReservationById(long hotelRoomReservedId);
+    public List<HotelRoomReservations> findReservationByUser(User user);
+    public List<HotelRoomReservations> findReservationByHotel(Hotels hotel);
+    public List<HotelRoomReservations> getReservations();
 
-    Hotels findHotelByID(long hotelId);
-
-    List<HotelsImages> getHotelImages(Hotels hotel);
-
-    @Transactional
-    void addHotelImage(HotelsImages image);
-
-    @Transactional
-    void addRoomImage(HotelRoomImages x);
-
-    @Transactional
-    void  saveReservation(HotelRoomReservations hotelRoomReservations);
-
-    @Transactional
-    HotelsImages findHotelImageById(long hotelImageId);
-
-    @Transactional
-    void deleteHotelImage(HotelsImages hotelsImages);
-
-    List<HotelRoom> getRoomsOfHotel(Hotels hotel);
-
-    List<HotelRoomAvailable> getRoomsAvailable(Long id);
-
-    HotelRoom findRoomById(long hotelRoomId);
-
-    List<HotelRoomImages> getRoomImages(HotelRoom hotelRoom);
-
-    @Transactional
-    void createRoom(HotelRoom hotelRoom);
-
-    @Transactional
-    void editRoom(HotelRoom hr);
-
-    @Transactional
-    void deleteRoom(HotelRoom hr);
-
-    @Transactional
-    void createRoomAvailible(HotelRoomAvailable hra);
-
-    @Transactional
-    void editRoomAvailible(HotelRoomAvailable hr);
-
-    @Transactional
-    void deleteRoomAvailible(HotelRoomAvailable hra);
-
-    HotelRoomAvailable findAvailibleRoomById(long hotelRoomAvailableId);
-
-    List<HotelRoomAvailable> getRoomsAvailibility();
-
-    List<HotelRoomAvailable> getRoomsAvailibilityByHotel(Hotels hotel);
-
-    List<HotelRoomAvailable> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds, Boolean flexible);
-
-    @Transactional
-    void createReservation(HotelRoomReservations r);
-
-    @Transactional
-    void editReservation(HotelRoomReservations hr);
-
-    @Transactional
-    void deleteReservation(HotelRoomReservations hr);
-
-    HotelRoomReservations findReservationById(long hotelRoomReservedId);
-
-    List<HotelRoomReservations> findReservationByUser(User user);
-
-    List<HotelRoomReservations> findReservationByHotel(Hotels hotel);
-
-    List<HotelRoomReservations> getReservations();
-
-    List<Reviews> findReviewsByHotel(Hotels hotel);
-
-    List<HotelRoomReservations> findPastReservationByUser(User u);
-
-    List<HotelRoomReservations> getReservationsInPeriod(String hotelLocation, Date dateFrom, Date dateTo);
-//    public void createHotel(Hotels hotel, long userId);
-//    public void editHotel(long hotelId, String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable);
-//    public void deleteHotel(long hotelId);
-//    public Hotels findHotelByID (long hotelId);
-//    public List<Hotels> getHotels();
-//    public List<Hotels> getHotelsForUser(long userId);
-//    public List<Hotels> getHotelsByLocation(String hotelLocation);
-//
-//    public void deleteHotelImage(long hotelImageId);
-//    public HotelsImages findHotelImageById(long hotelImageId);
-//    public List<HotelsImages> getHotelImages(Hotels hotels);
-//    public List<HotelRoomImages> getRoomImages(HotelRoom hotelRoom);
-//
-//    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds);
-//    public void editRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String HotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price);
-//    public void deleteRoom(long hotelRoomId);
-//    public HotelRoom findRoomById (long hotelRoomId);
-//    public List<HotelRoom> getRoomsOfHotel (long hotelId);
-//    public List<HotelRoomAvailable> getRoomsAvailable(Long id);
-//
-//    @Transactional
-//    public void createRoomAvailible(HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
-//    public void editRoomAvailible(long hotelRoomAvailableId, HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
-//    public void deleteRoomAvailible(long hotelRoomAvailableId);
-//    public HotelRoomAvailable findAvailibleRoomById(long hotelRoomAvailableId);
-//    public List<HotelRoomAvailable> getRoomsAvailibility();
-//    public List<HotelRoomAvailable> getRoomsAvailibilityByHotel(Hotels hotel);
-//    public List<HotelRoomAvailable> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds, Boolean flexible);
-//
-//    public void createReservation(User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds);
-//    public void editReservation(long hotelRoomReservedId, User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds);
-//    public void deleteReservation(long hotelRoomReservedId);
-//    public HotelRoomReservations findReservationById(long hotelRoomReservedId);
-//    public List<HotelRoomReservations> findReservationByUser(User user);
-//    public List<HotelRoomReservations> findReservationByHotel(Hotels hotel);
-//    public List<HotelRoomReservations> getReservations();
-//
-//    List<Reviews> findReviewsByHotel(Hotels hotel);
-//
-//    List<HotelRoomReservations> findPastReservationByUser(User u);
-//
-//    void addHotelImage(HotelsImages x);
-//
-//    void addRoomImage(HotelRoomImages x);
-//    void saveReservation(HotelRoomReservations hotelRoomReservations);
 }
Index: src/main/java/com/tourMate/dao/MenuDao.java
===================================================================
--- src/main/java/com/tourMate/dao/MenuDao.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dao/MenuDao.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -2,33 +2,12 @@
 
 import com.tourMate.entities.Menu;
-import jakarta.transaction.Transactional;
 
 import java.util.List;
 
 public interface MenuDao {
-    @Transactional
-    void createMenu(Menu menu);
-
-    @Transactional
-    void deleteMenu(Menu menu);
-
-    List<Menu> getCreatedMenus();
-
-    Menu findMenuById(long menuId);
-
-    @Transactional
-    void editMenu(Menu menu);
-//    public void createMenu(String name, String ingredients, double price);
-//
-//    @Transactional
-//    void createMenu(Menu menu);
-//
-//    public void deleteMenu(long menuId);
-//
-//    @Transactional
-//    void deleteMenu(Menu menu);
-//
-//    public List<Menu> getCreatedMenus();
-//    public Menu findMenuById(long menuId);
-//    public void editMenu(long menuId, String name, String ingredients, double price);
+    public void createMenu(String name, String ingredients, double price);
+    public void deleteMenu(long menuId);
+    public List<Menu> getCreatedMenus();
+    public Menu findMenuById(long menuId);
+    public void editMenu(long menuId, String name, String ingredients, double price);
 }
Index: src/main/java/com/tourMate/dao/RestaurantDao.java
===================================================================
--- src/main/java/com/tourMate/dao/RestaurantDao.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dao/RestaurantDao.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -8,116 +8,45 @@
 
 public interface RestaurantDao {
+    public void createRestaurant(Restaurant restaurant, long userId);
+    public void deleteRestaurant(long restaurantID);
     @Transactional
-    void createRestaurant(Restaurant restaurant);
-    List<RestaurantsAvailible> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats);
+    public void editRestaurant(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, User restaurantOwner);
+    public Restaurant findRestaurantByID (long restaurantID);
+    public List<Restaurant> searchByRestaurantName(String restaurantName);
+    public List<Restaurant> searchByRestaurantLocation(String restaurantLocation);
+    public List<Restaurant> getRestaurants();
     @Transactional
-    void addRestaurantImage(RestaurantImages restaurantImages);
+    public void addMenuToRestaurant(long restaurantId, Menu menu);
+
+    public List<RestaurantsAvailible> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats);
+
+    public void createTable(Restaurant restaurant, int noSeats);
+    public void editTable(Restaurant restaurant, long tableId, int noSeats);
+    public void deleteTable(long tableId);
+    public List<Restaurant> getRestaurantsByUser(long userId);
+    public RestaurantsTable findTableById(long tableId);
+    public List<RestaurantsTable> searchByNoSeats(int noSeats);
+    public List<RestaurantsTable> getRestaurantTables(long restaurantID);
+
+    public void addRestaurantImage(Restaurant restaurant, String url);
+    public void removeRestaurantImage(long restaurantImageId);
+    public RestaurantImages findRestaurantImageById(long restaurantImageId);
+    public List<RestaurantImages> getRestaurantImages(long restaurantID);
+
+    public void createTableAvailable(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo, int noSeats);
     @Transactional
-    void removeRestaurantImage(RestaurantImages image);
-    @Transactional
-    void saveTable(RestaurantsTable resTable);
-    @Transactional
-    RestaurantImages findRestaurantImageById(long restaurantImageId);
-    void deleteRestaurant(Restaurant r);
-    List<Restaurant> getRestaurants();
-    @Transactional
-    void addMenuToRestaurant(Menu menu);
-    Restaurant findRestaurantByID(long restaurantID);
-    List<RestaurantImages> getRestaurantImages(long restaurantID);
-    List<RestaurantsTable> getRestaurantTables(long restaurantID);
-    RestaurantsTable findTableById(long tableId);
-    @Transactional
-    void deleteTable(RestaurantsTable rt);
-    List<Restaurant> getRestaurantsByUser(User u);
-    List<RestaurantsAvailible> getTablesAvailabilityById(Long id);
-    @Transactional
-    void saveTableAvailable(RestaurantsAvailible ra);
-    @Transactional
-    void deleteTableAvailable(RestaurantsAvailible ra);
+    abstract void createTableAvailable(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo);
+    public List<RestaurantsAvailible> getTablesAvailabilityById(Long id);
+    public void editTableAvailable(long tableId, Restaurant restaurant, int noSeats);
+    public void deleteTableAvailable(long tableId);
+    public RestaurantsAvailible findAvailableReservationByID(long availibleId);
 
-    List<RestaurantsAvailible> getTablesAvailability();
-
-    //    List<RestaurantsAvailible> getTablesAvailability();
-    @Transactional
-    void createReservation(RestaurantReservations reservations);
-    @Transactional
-    void deleteReservation(RestaurantReservations r);
-    RestaurantReservations findReservationByID(long tableId);
-    RestaurantsAvailible findAvailableReservationByID(long availibleId);
-    List<RestaurantReservations> findReservationByUser(User user);
-    List<RestaurantReservations> findReservationByRestaurant(Restaurant restaurant);
-    List<RestaurantReservations> getReservations();
-    List<Restaurant> searchByRestaurantName(String restaurantName);
-
-    List<Restaurant> searchByRestaurantLocation(String restaurantLocation);
-
-    List<RestaurantsTable> searchByNoSeats(int noSeats);
-
-    List<Reviews> findReviewsByRestaurant(Restaurant restaurant);
-
-    List<RestaurantReservations> findPastReservationsByUser(User user);
-
-    List<MenuImages> getMenuImages(long menuId);
-
-    List<MenuImages> getMenuImagesByRestaurant(Restaurant restaurant);
-
-    @Transactional
-    void addMenuImage(MenuImages menuImages);
-
-    Menu findMenuId(Long menuId);
-
-    void saveReservation(RestaurantReservations r);
-
-//    public void createRestaurant(Restaurant restaurant, long userId);
-//    public void deleteRestaurant(long restaurantID);
-//    @Transactional
-//    public void editRestaurant(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, User restaurantOwner);
-//    public Restaurant findRestaurantByID (long restaurantID);
-//    public List<Restaurant> searchByRestaurantName(String restaurantName);
-//    public List<Restaurant> searchByRestaurantLocation(String restaurantLocation);
-//    public List<Restaurant> getRestaurants();
-//    @Transactional
-//    public void addMenuToRestaurant(long restaurantId, Menu menu);
-//
-//    public List<RestaurantsAvailible> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats);
-//
-//    public void createTable(Restaurant restaurant, int noSeats);
-//    public void editTable(Restaurant restaurant, long tableId, int noSeats);
-//    public void deleteTable(long tableId);
-//    public List<Restaurant> getRestaurantsByUser(long userId);
-//    public RestaurantsTable findTableById(long tableId);
-//    public List<RestaurantsTable> searchByNoSeats(int noSeats);
-//    public List<RestaurantsTable> getRestaurantTables(long restaurantID);
-//
-//    public void addRestaurantImage(RestaurantImages restaurantImages);
-//    public void removeRestaurantImage(long restaurantImageId);
-//    public RestaurantImages findRestaurantImageById(long restaurantImageId);
-//    public List<RestaurantImages> getRestaurantImages(long restaurantID);
-//
-//    public void createTableAvailable(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo, int noSeats);
-//    @Transactional
-//    abstract void createTableAvailable(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo);
-//    public List<RestaurantsAvailible> getTablesAvailabilityById(Long id);
-//    public void editTableAvailable(long tableId, Restaurant restaurant, int noSeats);
-//    public void deleteTableAvailable(long tableId);
-//    public RestaurantsAvailible findAvailableReservationByID(long availibleId);
-//
-//    public List<RestaurantsAvailible> getTablesAvailability();
-//    public void createReservation(RestaurantReservations reservations);
-//    public void editReservation(long restaurantsTableId, RestaurantsTable rt, Date hourFrom, Date hourTo, int noSeats, User user);
-//    public void deleteReservation(long restaurantsTableId);
-//    public RestaurantReservations findReservationByID(long tableId);
-//    public List<RestaurantReservations> findReservationByUser(User user);
-//    public List<RestaurantReservations> findReservationByRestaurant(Restaurant restaurant);
-//    public List<RestaurantReservations> getReservations();
-//
-//    List<Reviews> findReviewsByRestaurant(Restaurant restaurant);
-//
-//    List<RestaurantReservations> findPastReservationsByUser(User u);
-//    List<MenuImages> getMenuImages(long menuId);
-//    public void addMenuImage(MenuImages menuImages);
-//
-//    Menu findMenuId(Long menuId);
-//
-//    void saveReservation(RestaurantReservations restaurantReservations);
+    public List<RestaurantsAvailible> getTablesAvailability();
+    public void createReservation(RestaurantsTable rt, Date hourFrom, Date hourTo, User user);
+    public void editReservation(long restaurantsTableId, RestaurantsTable rt, Date hourFrom, Date hourTo, int noSeats, User user);
+    public void deleteReservation(long restaurantsTableId);
+    public RestaurantReservations findReservationByID(long tableId);
+    public List<RestaurantReservations> findReservationByUser(User user);
+    public List<RestaurantReservations> findReservationByRestaurant(Restaurant restaurant);
+    public List<RestaurantReservations> getReservations();
 }
Index: src/main/java/com/tourMate/dao/ReviewDao.java
===================================================================
--- src/main/java/com/tourMate/dao/ReviewDao.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dao/ReviewDao.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -5,44 +5,19 @@
 import com.tourMate.entities.Reviews;
 import com.tourMate.entities.Transport;
-import jakarta.transaction.Transactional;
-
 import java.util.List;
 
 public interface ReviewDao {
-    @Transactional
-    void createReview(Reviews review);
 
-    void deleteReview(Reviews review);
-
-    Reviews findReviewById(long id);
-
-    void editReview(Reviews review);
-
-    List<Reviews> getAllReviews();
-
-    List<Reviews> getHotelReviews();
-
-    List<Reviews> getTransportReviews();
-
-    List<Reviews> getRestaurantReviews();
-
-    List<Reviews> getHotelReviews(Hotels hotel);
-
-    List<Reviews> getRestaurantReviews(Restaurant restaurant);
-
-    List<Reviews> getTransportReviews(Transport transport);
-//    @Transactional
-//    void createReview(Reviews review);
-//
-//    public void deleteReview(long id);
-//    public void editReview(long id, String title, String description, int numStar, Hotels hotel, Restaurant restaurant, Transport transport);
-//    public Reviews findReviewById(long id);
-//    public List<Reviews> getAllReviews();
-//    public List<Reviews> getHotelReviews();
-//    public List<Reviews> getTransportReviews();
-//    public List<Reviews> getRestaurantReviews();
-//    public List<Reviews> getHotelReviews(Hotels hotel);
-//    public List<Reviews> getRestaurantReviews(Restaurant restaurant);
-//    public List<Reviews> getTransportReviews(Transport transport);
+    public void createReview(String title, String description, int numStar, Hotels hotel, Restaurant restaurant, Transport transport);
+    public void deleteReview(long id);
+    public void editReview(long id, String title, String description, int numStar, Hotels hotel, Restaurant restaurant, Transport transport);
+    public Reviews findReviewById(long id);
+    public List<Reviews> getAllReviews();
+    public List<Reviews> getHotelReviews();
+    public List<Reviews> getTransportReviews();
+    public List<Reviews> getRestaurantReviews();
+    public List<Reviews> getHotelReviews(Hotels hotel);
+    public List<Reviews> getRestaurantReviews(Restaurant restaurant);
+    public List<Reviews> getTransportReviews(Transport transport);
 
 }
Index: src/main/java/com/tourMate/dao/TokenDao.java
===================================================================
--- src/main/java/com/tourMate/dao/TokenDao.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/dao/TokenDao.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -0,0 +1,14 @@
+package com.tourMate.dao;
+
+import com.tourMate.entities.Token;
+import jakarta.transaction.Transactional;
+
+import java.time.LocalDateTime;
+import java.util.Date;
+
+public interface TokenDao {
+    public void saveToken(Token token);
+    public Token getToken(String token);
+    @Transactional
+    public void setConfirmedAt(String token, LocalDateTime dateTime);
+}
Index: src/main/java/com/tourMate/dao/TransportDao.java
===================================================================
--- src/main/java/com/tourMate/dao/TransportDao.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dao/TransportDao.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -1,127 +1,58 @@
 package com.tourMate.dao;
 
+import com.tourMate.dto.RouteListingDto;
+import com.tourMate.dto.TransportDto;
 import com.tourMate.entities.*;
-import jakarta.transaction.Transactional;
 
 
+import java.util.Collection;
 import java.util.Date;
 import java.util.List;
 
 public interface TransportDao {
-    @Transactional
-    void createTransport(Transport t);
 
-    @Transactional
-    void deleteTransport(Transport t);
+    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate);
 
-    List<Transport> getTransports();
+    public void deleteTransport(long transportId);
 
-    List<Transport> getTransportsByUser(User u);
+    public void editTransport(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate);
 
-    List<TransportAvailible> getRoutesForTransport(Transport t);
+    public List<Transport> getTransports();
+    public List<TransportDto> getTransportsByUser(long userId);
 
-    Transport findTransportById(long transportId);
+    public List<RouteListingDto> getRoutesForTransport(long transportId);
+    public Transport getTransportById(long transportId);
+    public TransportDto findTransportById (long transportId);
 
-    Transport getTransportById(long transportId);
+    public void createTransportReservation(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour);
 
-    @Transactional
-    void editTransport(Transport t);
+    public void editTransportReservation(Transport transport, long reservationID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour);
 
-    @Transactional
-    void createTransportReservation(TransportReservation transportReservation);
+    public void deleteTransportReservation(long reservationID);
 
-    TransportReservation findTransportReservationByID(long reservationID);
+    public TransportReservation findTransportReservationByID(long reservationID);
 
-    List<TransportReservation> getTransportReservations();
+    public List<TransportReservation> getTransportReservations();
 
-    TransportAvailible findTransportAvailableByID(long reservationID);
+    public List<TransportReservation> getTransportsReservationsByUserID(long userID);
 
-    List<TransportRoute> getTransportsAvailableByFilters(String fromL, String toL, Date date, int numPassengers);
+    public void createTransportAvailable(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour, Collection<TransportRoute> routes);
 
-    List<TransportReservation> getTransportsReservationsByUserID(long userID);
+    public void editTransportAvailable(Transport transport, long availableID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour);
 
-    List<TransportAvailible> getTransportsAvailable();
+    public void deleteTransportAvailable(long availableID);
 
-    @Transactional
-    void createTransportAvailable(TransportAvailible ta);
+    public TransportAvailible findTransportAvailableByID (long reservationID);
 
-    void editTransportAvailable(TransportAvailible ta);
+    public List<TransportAvailible> getTransportsAvailable();
 
-    TransportRoute findTransportRouteById(long transportRouteId);
+    public List<TransportRoute> getTransportsAvailableByFilters (String from,String to,Date date);
 
-    List<Reviews> getReviewsForTransport(Transport transport);
+    public void createTransportRoute(TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order);
 
-    List<TransportReservation> findPastReservationByUser(User user);
+    public void deleteTransportRoute(long transportRouteId);
 
-    @Transactional
-    void saveReservation(TransportReservation transportReservation);
+    public void editTransportRoute(long transportRouteId, TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order);
 
-    List<TransportReservation> findReservationByUser(User user);
-
-    @Transactional
-    void deleteTransportReservation(TransportReservation tr);
-
-    @Transactional
-    void deleteTransportAvailable(TransportAvailible ta);
-
-    void createTransportRoute(TransportRoute tr);
-
-    void deleteTransportRoute(TransportRoute tr);
-
-    void editTransportRoute(TransportRoute tr);
-
-    List<TransportReservation> findTransportReservationByTransportId(Transport t);
-
-//    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, Long userId, String carPlate);
-//
-//    public void deleteTransport(long transportId);
-//
-//    public void editTransport(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate);
-//
-//    public List<Transport> getTransports();
-//    public List<TransportDto> getTransportsByUser(long userId);
-//
-//    public List<RouteListingDto> getRoutesForTransport(long transportId);
-//    public Transport getTransportById(long transportId);
-//    public TransportDto findTransportById (long transportId);
-//
-//    public void createTransportReservation(TransportReservation transportReservation);
-//
-//    public void editTransportReservation(Transport transport, long reservationID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour);
-//
-//    public void deleteTransportReservation(long reservationID);
-//
-//    public TransportReservation findTransportReservationByID(long reservationID);
-//
-//    public List<TransportReservation> getTransportReservations();
-//
-//    public List<TransportReservation> getTransportsReservationsByUserID(long userID);
-//
-//    public void createTransportAvailable(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour, Collection<TransportRoute> routes);
-//
-//    public void editTransportAvailable(Transport transport, long availableID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour);
-//
-//    public void deleteTransportAvailable(long availableID);
-//
-//    public TransportAvailible findTransportAvailableByID (long reservationID);
-//
-//    public List<TransportAvailible> getTransportsAvailable();
-//
-//    public List<TransportRoute> getTransportsAvailableByFilters (String from, String to, Date date, int numPassengers);
-//
-//    public void createTransportRoute(TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order);
-//
-//    public void deleteTransportRoute(long transportRouteId);
-//
-//    public void editTransportRoute(long transportRouteId, TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order);
-//
-//    public TransportRoute findTransportRouteById(long transportRouteId);
-//
-//    List<Reviews> getReviewsForTransport(Transport transport);
-//
-//    List<TransportReservation> findReservationByUser(User u);
-//
-//    List<TransportReservation> findPastReservationByUser(User user);
-//
-//    void saveReservation(TransportReservation transportReservation);
+    public TransportRoute findTransportRouteById(long transportRouteId);
 }
Index: src/main/java/com/tourMate/dao/UsersDao.java
===================================================================
--- src/main/java/com/tourMate/dao/UsersDao.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dao/UsersDao.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -1,8 +1,6 @@
 package com.tourMate.dao;
 
-import com.tourMate.entities.Providers;
 import com.tourMate.entities.Role;
 import com.tourMate.entities.User;
-import jakarta.transaction.Transactional;
 import org.springframework.security.core.userdetails.UserDetails;
 
@@ -25,18 +23,3 @@
 
     UserDetails findUserByUsername(String username);
-
-    List<User> getUnapprovedUsers();
-
-    void approveUserProfile(User u);
-
-    Role findById(Long id);
-    User updateUser(User s);
-    User findByUsernameAndProvider(String username, String providers);
-
-    @Transactional
-    User mergeUser(User user);
-
-    List<User> getAdmins();
-
-    List<User> findConnectedAccountsByUser(User u);
 }
Index: src/main/java/com/tourMate/dao/impl/BusinessDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/BusinessDaoImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dao/impl/BusinessDaoImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -4,10 +4,7 @@
 import com.tourMate.entities.Business;
 import com.tourMate.entities.User;
-import com.tourMate.events.OnBusinessApprovedEvent;
 import jakarta.persistence.EntityManager;
 import jakarta.persistence.PersistenceContext;
 import jakarta.transaction.Transactional;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationEventPublisher;
 import org.springframework.stereotype.Service;
 
@@ -19,15 +16,16 @@
     @PersistenceContext
     EntityManager em;
-    @Autowired
-    ApplicationEventPublisher eventPublisher;
 
     @Transactional
     @Override
-    public void createBusiness(Business business) {
+    public void createBusiness(Business business, long userId) {
+        User u = em.find(User.class, userId);
+        business.setUser(u);
         em.persist(business);
     }
 
     @Override
-    public List<Business> getUnapprovedBusinessesOfUser(User u) {
+    public List<Business> getUnapprovedBusinessesOfUser(long userId) {
+        User u = em.find(User.class, userId);
         return em.createQuery("SELECT b FROM Business b WHERE b.user = :user").setParameter("user", u).getResultList();
     }
@@ -35,27 +33,15 @@
     @Transactional
     @Override
-    public void deleteBusiness(Business business) {
+    public void deleteBusiness(long businessId) {
+        Business business = findBusinessById(businessId);
         em.remove(business);
+
     }
 
     @Override
-    public boolean hasBusiness(User u)
+    public boolean hasBusiness(long userId)
     {
-        return Integer.parseInt(em.createQuery("SELECT COUNT(b) FROM Business b WHERE b.user = :user or b.user in :users")
-                .setParameter("user", u)
-                .setParameter("users", u.getConnectedAccounts())
-                .getSingleResult().toString()) > 0;
-    }
-
-    @Override
-    public List<Business> getUnapprovedBusinesses() {
-        return em.createQuery("select b from Business b where not b.approved").getResultList();
-    }
-
-    @Override
-    @Transactional
-    public void approveBusiness(Business b) {
-        em.persist(b);
-        eventPublisher.publishEvent(new OnBusinessApprovedEvent(b.getUser()));
+        User u = em.find(User.class, userId);
+        return Integer.parseInt(em.createQuery("SELECT COUNT(b) FROM Business b WHERE b.user = :user").setParameter("user", u).getSingleResult().toString()) > 0;
     }
 
@@ -71,8 +57,14 @@
     }
 
-
     @Transactional
     @Override
-    public void editBusiness(Business business) {
+    public void editBusiness(long businessId, String name, String phone, String address, String edbs, User user, boolean approved) {
+        Business business = findBusinessById(businessId);
+        business.setName(name);
+        business.setPhone(phone);
+        business.setAddress(address);
+        business.setEdbs(edbs);
+        business.setUser(user);
+        business.setApproved(approved);
         em.persist(business);
     }
Index: src/main/java/com/tourMate/dao/impl/HotelDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/HotelDaoImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dao/impl/HotelDaoImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -3,14 +3,9 @@
 import com.tourMate.dao.HotelDao;
 import com.tourMate.entities.*;
-import com.tourMate.events.OnHotelReservationEvent;
-import com.tourMate.events.OnRegistrationSuccessEvent;
 import jakarta.persistence.EntityManager;
 import jakarta.persistence.PersistenceContext;
 import jakarta.transaction.Transactional;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationEventPublisher;
 import org.springframework.stereotype.Service;
 
-import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
@@ -21,35 +16,51 @@
     @PersistenceContext
     EntityManager em;
-    @Autowired
-    ApplicationEventPublisher eventPublisher;
-
-    @Override
-    @Transactional
-    public void createHotel(Hotels hotel) {
+
+    @Override
+    @Transactional
+    public void createHotel(Hotels hotel, long userId) {
+        User u = em.find(User.class, userId);
+        Hotels h = new Hotels(hotel.getHotelName(), hotel.getHotelDescripiton(), hotel.getHotelLocation(), hotel.getHotelEDBS(), hotel.getParking(), hotel.getPetFriendly(), hotel.getInternetAvailable(), u);
+        em.persist(h);
+    }
+
+    @Override
+    public List<Hotels> getHotels() {
+        List<Hotels> hoteli = em.createQuery("select h from Hotels h order by h.hotelId").getResultList();
+        System.out.println("OREEEEEEL");
+        return hoteli;
+        //return em.createQuery("select h from Hotels h order by h.hotelId").getResultList();
+    }
+
+    @Override
+    public List<Hotels> getHotelsForUser(long userId) {
+        User u = em.find(User.class, userId);
+        return em.createQuery("select h from Hotels h where h.owner = :u").setParameter("u", u).getResultList();
+    }
+
+    @Override
+    public List<Hotels> getHotelsByLocation(String hotelLocation) {
+        return em.createQuery("select h from Hotels h where h.hotelLocation = hotelLocation").getResultList();
+    }
+
+    @Transactional
+    @Override
+    public void editHotel(long hotelId, String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable) {
+        Hotels hotel = findHotelByID(hotelId);
+        hotel.setHotelName(hotelName);
+        hotel.setHotelDescripiton(hotelDescripiton);
+        hotel.setHotelLocation(hotelLocation);
+        hotel.setHotelEDBS(hotelEDBS);
+        hotel.setParking(parking);
+        hotel.setPetFriendly(petFriendly);
+        hotel.setInternetAvailable(internetAvailable);
         em.persist(hotel);
     }
 
-    @Override
-    public List<Hotels> getHotels() {
-        return em.createQuery("select h from Hotels h order by h.hotelId").getResultList();
-    }
-
-    @Override
-    public List<Hotels> getHotelsForUser(User u) {
-        return em.createQuery("select h from Hotels h where h.owner = :u or h.owner in :users")
-                .setParameter("u", u)
-                .setParameter("users", u.getConnectedAccounts())
-                .getResultList();
-    }
-    @Transactional
-    @Override
-    public void editHotel(Hotels hotel) {
-        em.persist(hotel);
-    }
-
-    @Transactional
-    @Override
-    public void deleteHotel(Hotels hotel) {
-        em.remove(hotel);
+    @Transactional
+    @Override
+    public void deleteHotel(long hotelId) {
+        Hotels h = findHotelByID(hotelId);
+        em.remove(h);
     }
 
@@ -66,23 +77,13 @@
     @Override
     @Transactional
-    public void addHotelImage(HotelsImages image) {
-        em.persist(image);
-    }
-
-    @Transactional
-    @Override
-    public void addRoomImage(HotelRoomImages x) {
-        em.persist(x);
-    }
-
-    @Override
-    @Transactional
-    public void  saveReservation(HotelRoomReservations hotelRoomReservations) {
-        em.persist(hotelRoomReservations);
-    }
-
-    @Override
-    @Transactional
-    public HotelsImages findHotelImageById(long hotelImageId) {
+    public void addHotelImage(Hotels hotel, String url)
+    {
+        HotelsImages hotelsImages = new HotelsImages(hotel, url);
+        em.persist(hotelsImages);
+    }
+
+    @Override
+    @Transactional
+    public HotelsImages findHotelImageById(long hotelImageId){
         return em.find(HotelsImages.class, hotelImageId);
     }
@@ -90,11 +91,13 @@
     @Override
     @Transactional
-    public void deleteHotelImage(HotelsImages hotelsImages) {
+    public void deleteHotelImage(long hotelImageId){
+        HotelsImages hotelsImages = findHotelImageById(hotelImageId);
         em.remove(hotelsImages);
     }
 
     @Override
-    public List<HotelRoom> getRoomsOfHotel(Hotels hotel) {
-        return em.createQuery("SELECT hr from HotelRoom hr where hr.hotel = :hotel").setParameter("hotel", hotel).getResultList();
+    public List<HotelRoom> getRoomsOfHotel(long hotelId) {
+        Hotels h = findHotelByID(hotelId);
+        return em.createQuery("SELECT hr from HotelRoom hr where hr.hotel = :hotel").setParameter("hotel", h).getResultList();
     }
 
@@ -111,10 +114,11 @@
     @Override
     public List<HotelRoomImages> getRoomImages(HotelRoom hotelRoom) {
-        return em.createQuery("select i from HotelRoomImages i where i.room = :hotelRoom").setParameter("hotelRoom", hotelRoom).getResultList();
-    }
-
-    @Transactional
-    @Override
-    public void createRoom(HotelRoom hotelRoom) {
+        return em.createQuery("select i.url from HotelRoomImages i where i.room = :hotelRoom").setParameter("hotelRoom", hotelRoom).getResultList();
+    }
+
+    @Transactional
+    @Override
+    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
+        HotelRoom hotelRoom = new HotelRoom(hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price);
         em.persist(hotelRoom);
     }
@@ -122,5 +126,13 @@
     @Transactional
     @Override
-    public void editRoom(HotelRoom hr) {
+    public void editRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
+        HotelRoom hr = findRoomById(hotelRoomId);
+        hr.setHotel(hotel);
+        hr.setHotelRoomDescription(hotelRoomDescription);
+        hr.setHotelRoomName(hotelRoomName);
+        hr.setKitchenAvailable(kitchenAvailable);
+        hr.setAirConditioning(airConditioning);
+        hr.setBalcony(balcony);
+        hr.setPrice(price);
         em.persist(hr);
     }
@@ -128,5 +140,6 @@
     @Transactional
     @Override
-    public void deleteRoom(HotelRoom hr) {
+    public void deleteRoom(long hotelRoomId) {
+        HotelRoom hr = findRoomById(hotelRoomId);
         em.remove(hr);
     }
@@ -134,5 +147,6 @@
     @Transactional
     @Override
-    public void createRoomAvailible(HotelRoomAvailable hra) {
+    public void createRoomAvailible(HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds) {
+        HotelRoomAvailable hra = new HotelRoomAvailable(hotelRoom, dateFrom, dateTo, numberOfBeds);
         em.persist(hra);
     }
@@ -140,5 +154,10 @@
     @Transactional
     @Override
-    public void editRoomAvailible(HotelRoomAvailable hr) {
+    public void editRoomAvailible(long hotelRoomAvailableId, HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds) {
+        HotelRoomAvailable hr = findAvailibleRoomById(hotelRoomAvailableId);
+        hr.setHotelRoom(hotelRoom);
+        hr.setDateFrom(dateFrom);
+        hr.setDateTo(dateTo);
+        hr.setNumberOfBeds(numberOfBeds);
         em.persist(hr);
     }
@@ -146,5 +165,6 @@
     @Transactional
     @Override
-    public void deleteRoomAvailible(HotelRoomAvailable hra) {
+    public void deleteRoomAvailible(long hotelRoomAvailableId) {
+        HotelRoomAvailable hra = findAvailibleRoomById(hotelRoomAvailableId);
         em.remove(hra);
     }
@@ -166,135 +186,60 @@
 
     @Override
-    public List<HotelRoomAvailable> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds, Boolean flexible) {
-        if(flexible)
-        {
-            Calendar calendar = Calendar.getInstance();
-            Calendar calendar1 = Calendar.getInstance();
-            calendar.setTime(dateTo);
-            calendar1.setTime(dateFrom);
-            return em.createQuery("SELECT hr FROM HotelRoomAvailable hr WHERE " +
-                            "((hr.dateFrom <= :dateTo AND hr.dateTo >= :dateFrom) OR " +
-                            "(hr.dateFrom <= :dateToMinus1 AND hr.dateTo >= :dateFromMinus1) OR " +
-                            "(hr.dateFrom <= :dateToMinus2 AND hr.dateTo >= :dateFromMinus2) OR " +
-                            "(hr.dateFrom <= :dateToMinus3 AND hr.dateTo >= :dateFromMinus3) OR " +
-                            "(hr.dateFrom <= :dateToPlus1 AND hr.dateTo >= :dateFromPlus1) OR " +
-                            "(hr.dateFrom <= :dateToPlus2 AND hr.dateTo >= :dateFromPlus2) OR " +
-                            "(hr.dateFrom <= :dateToPlus3 AND hr.dateTo >= :dateFromPlus3)) " +
-                            "AND hr.hotelRoom.hotel.hotelLocation LIKE :hotelLocation " +
-                            "AND hr.hotelRoom.numOfBeds >= :numBeds")
-                    .setParameter("hotelLocation", hotelLocation)
-                    .setParameter("dateFrom", dateFrom)
-                    .setParameter("dateTo", dateTo)
-                    .setParameter("dateToMinus1", subtractDays(calendar, 1))
-                    .setParameter("dateToMinus2", subtractDays(calendar, 2))
-                    .setParameter("dateToMinus3", subtractDays(calendar, 3))
-                    .setParameter("dateToPlus1", addDays(calendar, 1))
-                    .setParameter("dateToPlus2", addDays(calendar, 2))
-                    .setParameter("dateToPlus3", addDays(calendar, 3))
-                    .setParameter("dateFromMinus1", subtractDays(calendar1, 1))
-                    .setParameter("dateFromMinus2", subtractDays(calendar1, 2))
-                    .setParameter("dateFromMinus3", subtractDays(calendar1, 3))
-                    .setParameter("dateFromPlus1", addDays(calendar1, 1))
-                    .setParameter("dateFromPlus2", addDays(calendar1, 2))
-                    .setParameter("dateFromPlus3", addDays(calendar1, 3))
-                    .setParameter("numBeds", numberOfBeds)
-                    .getResultList();
-        }
-        else
-        {
-            return em.createQuery("SELECT hr FROM HotelRoomAvailable hr WHERE " +
-                            "((hr.dateFrom <= :dateTo AND hr.dateTo >= :dateFrom)) " +
-                            "AND hr.hotelRoom.hotel.hotelLocation LIKE :hotelLocation " +
-                            "AND hr.hotelRoom.numOfBeds >= :numBeds")
-                    .setParameter("hotelLocation", hotelLocation)
-                    .setParameter("dateFrom", dateFrom)
-                    .setParameter("dateTo", dateTo)
-                    .setParameter("numBeds", numberOfBeds)
-                    .getResultList();
-        }
-
-    }
-
-    private Date addDays(Calendar calendar, int days) {
-        Calendar newCalendar = (Calendar) calendar.clone();
-        newCalendar.add(Calendar.DAY_OF_MONTH, days);
-        return newCalendar.getTime();
-    }
-
-    private Date subtractDays(Calendar calendar, int days) {
-        Calendar newCalendar = (Calendar) calendar.clone();
-        newCalendar.add(Calendar.DAY_OF_MONTH, -days);
-        return newCalendar.getTime();
-    }
-
-    @Override
-    @Transactional
-    public void createReservation(HotelRoomReservations  r) {
-        em.persist(r);
-        eventPublisher.publishEvent(new OnHotelReservationEvent(r.getUser(), r));
-    }
-
-    @Override
-    @Transactional
-    public void editReservation(HotelRoomReservations hr) {
-        em.persist(hr);
-    }
-
-    @Transactional
-    @Override
-    public void deleteReservation(HotelRoomReservations hr) {
-        em.remove(hr);
-    }
-
-    @Override
-    public HotelRoomReservations findReservationById(long hotelRoomReservedId) {
-        return em.find(HotelRoomReservations.class, hotelRoomReservedId);
-    }
-
-    @Override
-    public List<HotelRoomReservations> findReservationByUser(User user) {
-        return em.createQuery("select hr from HotelRoomReservations hr where hr.user = :user and hr.dateTo >= now()")
-                .setParameter("user", user).getResultList();
-    }
-
-    @Override
-    public List<HotelRoomReservations> findReservationByHotel(Hotels hotel) {
-        List<HotelRoom> hotelRooms = getRoomsOfHotel(hotel);
-        return em.createQuery("select hr from HotelRoomReservations hr where hr.hotelRoom.hotel = :hotel").setParameter("hotel", hotel).getResultList();
-    }
-
-    @Override
-    public List<HotelRoomReservations> getReservations() {
-        return em.createQuery("select hr from HotelRoomReservations hr order by hr.user.name").getResultList();
-    }
-
-    @Override
-    public List<Reviews> findReviewsByHotel(Hotels hotel) {
-        return em.createQuery("select r from Reviews r where r.hotel = :hotel")
-                .setParameter("hotel", hotel)
-                .getResultList();
-    }
-
-    @Override
-    public List<HotelRoomReservations> findPastReservationByUser(User u) {
-        return em.createQuery("select hr from HotelRoomReservations hr where hr.user = :user and hr.dateTo <= now()")
-                .setParameter("user", u).getResultList();
-    }
-
-    @Override
-    public List<HotelRoomReservations> getReservationsInPeriod(String hotelLocation, Date dateFrom, Date dateTo) {
-        return em.createQuery("select hr from HotelRoomReservations hr where hr.hotelRoom.hotel.hotelLocation like :hotelLocation and (hr.dateFrom between :dateFrom and :dateTo) or (hr.dateTo between :dateFrom and :dateTo)")
+    public List<HotelRoomAvailable> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds) {
+        return em.createQuery("select hr from HotelRoomAvailable hr where hr.dateFrom <= :dateFrom and hr.dateTo >= :dateTo " +
+                "and hr.hotelRoom.hotel.hotelLocation LIKE :hotelLocation and hr.numberOfBeds >= :numBeds")
                 .setParameter("hotelLocation", hotelLocation)
                 .setParameter("dateFrom", dateFrom)
                 .setParameter("dateTo", dateTo)
+                .setParameter("numBeds", numberOfBeds)
                 .getResultList();
     }
 
     @Override
-    public List<Hotels> getHotelsByLocation(String hotelLocation)
-    {
-        return em.createQuery("select h from Hotels h where h.hotelLocation like :hotelLocation")
-                .setParameter("hotelLocation", hotelLocation)
-                .getResultList();
+    @Transactional
+    public void createReservation(User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds) {
+        HotelRoomReservations r = new HotelRoomReservations(user, hotelRoom, dateFrom, dateTo, numberOfBeds);
+        em.persist(r);
+    }
+
+    @Override
+    @Transactional
+    public void editReservation(long hotelRoomReservedId, User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds) {
+        HotelRoomReservations hr = findReservationById(hotelRoomReservedId);
+        hr.setUser(user);
+        hr.setHotelRoom(hotelRoom);
+        hr.setDateFrom(dateFrom);
+        hr.setDateTo(dateTo);
+        hr.setNumberOfBeds(numberOfBeds);
+        em.persist(hr);
+
+    }
+
+    @Transactional
+    @Override
+    public void deleteReservation(long hotelRoomReservedId) {
+        HotelRoomReservations r = findReservationById(hotelRoomReservedId);
+        em.remove(hotelRoomReservedId);
+    }
+
+    @Override
+    public HotelRoomReservations findReservationById(long hotelRoomReservedId) {
+        return em.find(HotelRoomReservations.class, hotelRoomReservedId);
+    }
+
+    @Override
+    public List<HotelRoomReservations> findReservationByUser(User user) {
+        return em.createQuery("select hr from HotelRoomReservations hr where hr.user = :user").setParameter("user", user).getResultList();
+    }
+
+    @Override
+    public List<HotelRoomReservations> findReservationByHotel(Hotels hotel) {
+        List<HotelRoom> hotelRooms = getRoomsOfHotel(hotel.getHotelId());
+        return em.createQuery("select hr from HotelRoomReservations hr where hr.hotelRoom in :hotelRooms").setParameter("hotelRooms", hotelRooms).getResultList();
+    }
+
+    @Override
+    public List<HotelRoomReservations> getReservations() {
+        return em.createQuery("select hr from HotelRoomReservations hr order by hr.user.name").getResultList();
     }
 }
Index: src/main/java/com/tourMate/dao/impl/MenuDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/MenuDaoImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dao/impl/MenuDaoImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -18,5 +18,6 @@
     @Transactional
     @Override
-    public void createMenu(Menu menu) {
+    public void createMenu(String name, String ingredients, double price) {
+        Menu menu = new Menu(name, ingredients, price);
         em.persist(menu);
     }
@@ -24,5 +25,6 @@
     @Transactional
     @Override
-    public void deleteMenu(Menu menu) {
+    public void deleteMenu(long menuId) {
+        Menu menu = findMenuById(menuId);
         em.remove(menu);
     }
@@ -40,6 +42,9 @@
     @Transactional
     @Override
-    public void editMenu(Menu menu) {
-
+    public void editMenu(long menuId, String name, String ingredients, double price) {
+        Menu menu = findMenuById(menuId);
+        menu.setName(name);
+        menu.setIngredients(ingredients);
+        menu.setPrice(price);
         em.persist(menu);
     }
Index: src/main/java/com/tourMate/dao/impl/RestaurantDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/RestaurantDaoImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dao/impl/RestaurantDaoImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -18,6 +18,8 @@
     @Override
     @Transactional
-    public void createRestaurant(Restaurant restaurant) {
-        em.persist(restaurant);
+    public void createRestaurant(Restaurant restaurant, long userId) {
+        User u = em.find(User.class, userId);
+        Restaurant r = new Restaurant(restaurant.getRestaurantName(), restaurant.getRestaurantLocation(), restaurant.getCousineType(), restaurant.getRestaurantDescription(), restaurant.getRestaurantEdbs(), u);
+        em.persist(r);
     }
 
@@ -33,14 +35,14 @@
     }
 
-    @Transactional
-    @Override
-    public void addRestaurantImage(RestaurantImages restaurantImages){
-        em.persist(restaurantImages);
-    }
-
-    @Transactional
-    @Override
-    public void removeRestaurantImage(RestaurantImages image){
-        em.remove(image);
+    @Override
+    public void addRestaurantImage(Restaurant restaurant, String url){
+
+    }
+
+    @Transactional
+    @Override
+    public void removeRestaurantImage(long restaurantImageId){
+        RestaurantImages restaurantImage = findRestaurantImageById(restaurantImageId);
+        em.remove(restaurantImage);
     }
 
@@ -52,5 +54,6 @@
 
     @Override
-    public void deleteRestaurant(Restaurant r) {
+    public void deleteRestaurant(long restaurantID) {
+        Restaurant r = findRestaurantByID(restaurantID);
         em.remove(r);
     }
@@ -63,5 +66,7 @@
     @Override
     @Transactional
-    public void addMenuToRestaurant(Menu menu) {
+    public void addMenuToRestaurant(long restaurantId, Menu menu) {
+        Restaurant r = findRestaurantByID(restaurantId);
+        menu.setRestaurant(r);
         em.persist(menu);
     }
@@ -78,6 +83,20 @@
 
     @Override
+    @Transactional
+    public void editRestaurant(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, User restaurantOwner) {
+        Restaurant res = findRestaurantByID(restaurantID);
+        res.setRestaurantName(restaurantName);
+        res.setRestaurantLocation(restaurantLocation);
+        res.setRestaurantEdbs(restaurantEdbs);
+        res.setRestaurantDescription(restaurantDescription);
+        res.setRestaurantOwner(restaurantOwner);
+        res.setCousineType(cousineType);
+        em.persist(res);
+    }
+
+    @Override
     public List<RestaurantsTable> getRestaurantTables(long restaurantID) {
-        return em.createQuery("select rt from RestaurantsTable rt where rt.restaurant.restaurantID = :restaurantId").setParameter("restaurantId", restaurantID).getResultList();
+        List<RestaurantsTable> restaurantsTables = getRestaurantTables(restaurantID);
+        return restaurantsTables;
     }
 
@@ -89,21 +108,36 @@
     @Override
     @Transactional
-    public void saveTable(RestaurantsTable resTable) {
+    public void createTable(Restaurant restaurant, int noSeats) {
+        RestaurantsTable resTable = new RestaurantsTable(restaurant, noSeats);
         em.persist(resTable);
     }
 
-
-    @Override
-    @Transactional
-    public void deleteTable(RestaurantsTable rt) {
+    @Override
+    @Transactional
+    public void editTable(Restaurant restaurant, long tableId, int noSeats) {
+        RestaurantsTable resTable = findTableById(tableId);
+        resTable.setRestaurant(restaurant);
+        resTable.setNoSeats(noSeats);
+        em.persist(resTable);
+    }
+
+    @Override
+    @Transactional
+    public void deleteTable(long tableId) {
+        RestaurantsTable rt  = findTableById(tableId);
         em.persist(rt);
     }
 
     @Override
-    public List<Restaurant> getRestaurantsByUser(User u) {
-        return em.createQuery("select r from Restaurant r where r.restaurantOwner = :u or r.restaurantOwner in :users")
-                .setParameter("u", u)
-                .setParameter("users", u.getConnectedAccounts())
-                .getResultList();
+    public List<Restaurant> getRestaurantsByUser(long userId) {
+        User u = em.find(User.class, userId);
+        return em.createQuery("select r from Restaurant r where r.restaurantOwner = :u").setParameter("u", u).getResultList();
+    }
+
+    @Override
+    @Transactional
+    public void createTableAvailable(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo, int noSeats) {
+        RestaurantsAvailible ra = new RestaurantsAvailible(restaurantsTable, hourFrom, hourTo, noSeats);
+        em.persist(ra);
     }
 
@@ -116,11 +150,22 @@
     @Override
     @Transactional
-    public void saveTableAvailable(RestaurantsAvailible ra){
-        em.persist(ra);
-    }
-
-    @Override
-    @Transactional
-    public void deleteTableAvailable(RestaurantsAvailible ra) {
+    public void createTableAvailable(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo){
+        RestaurantsAvailible rta = new RestaurantsAvailible(restaurantsTable, hourFrom, hourTo);
+        em.persist(rta);
+    }
+
+    @Override
+    @Transactional
+    public void editTableAvailable(long tableId, Restaurant restaurant, int noSeats) {
+        RestaurantsTable rt = findTableById(tableId);
+        rt.setRestaurant(restaurant);
+        rt.setNoSeats(noSeats);
+        em.persist(rt);
+    }
+
+    @Override
+    @Transactional
+    public void deleteTableAvailable(long tableId) {
+        RestaurantsAvailible ra = findAvailableReservationByID(tableId);
         em.remove(ra);
     }
@@ -132,13 +177,24 @@
 
     @Override
-    @Transactional
-    public void createReservation(RestaurantReservations reservations) {
-        em.persist(reservations);
-    }
-
-
-    @Override
-    @Transactional
-    public void deleteReservation(RestaurantReservations r) {
+    public void createReservation(RestaurantsTable rt, Date hourFrom, Date hourTo, User user) {
+
+    }
+
+    @Override
+    @Transactional
+    public void editReservation(long restaurantsTableId, RestaurantsTable rt, Date hourFrom, Date hourTo, int noSeats, User user) {
+        RestaurantReservations r = findReservationByID(restaurantsTableId);
+        r.setTable(rt);
+        r.setTimeFrom(hourFrom);
+        r.setTimeTo(hourTo);
+        r.setNoSeats(noSeats);
+        r.setUser(user);
+        em.persist(r);
+    }
+
+    @Override
+    @Transactional
+    public void deleteReservation(long restaurantsTableId) {
+        RestaurantReservations r = findReservationByID(restaurantsTableId);
         em.remove(r);
     }
@@ -156,7 +212,5 @@
     @Override
     public List<RestaurantReservations> findReservationByUser(User user) {
-        return em.createQuery("SELECT r from RestaurantReservations r where r.user = :user and r.timeTo >= now()")
-                .setParameter("user", user)
-                .getResultList();
+        return em.createQuery("SELECT r from RestaurantReservations r where r.user = :user").setParameter("user", user).getResultList();
     }
 
@@ -187,46 +241,3 @@
         return em.createQuery("select rt from RestaurantsTable rt where rt.noSeats = noSeats").getResultList();
     }
-
-    @Override
-    public List<Reviews> findReviewsByRestaurant(Restaurant restaurant) {
-        return em.createQuery("select r from Reviews r where r.restaurant = :restaurant")
-                .setParameter("restaurant", restaurant)
-                .getResultList();
-    }
-
-    @Override
-    public List<RestaurantReservations> findPastReservationsByUser(User user) {
-        return em.createQuery("SELECT r from RestaurantReservations r where r.user = :user and r.timeTo <= now()")
-                .setParameter("user", user).getResultList();
-
-    }
-
-    @Override
-    public List<MenuImages> getMenuImages(long menuId) {
-        return em.createQuery("select ri from MenuImages ri where ri.menu.id = :menuId").setParameter("menuId", menuId).getResultList();
-    }
-
-    @Override
-    public List<MenuImages> getMenuImagesByRestaurant(Restaurant resta) {
-        return em.createQuery("select mi from MenuImages mi where mi.menu.restaurant = :restaurant")
-                .setParameter("restaurant", resta)
-                .getResultList();
-    }
-
-    @Transactional
-    @Override
-    public void addMenuImage(MenuImages menuImages) {
-        em.persist(menuImages);
-    }
-
-    @Override
-    public Menu findMenuId(Long menuId) {
-        return em.find(Menu.class, menuId);
-    }
-
-    @Override
-    @Transactional
-    public void saveReservation(RestaurantReservations restaurantReservations) {
-        em.persist(restaurantReservations);
-    }
 }
Index: src/main/java/com/tourMate/dao/impl/ReviewDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/ReviewDaoImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dao/impl/ReviewDaoImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -8,5 +8,4 @@
 import jakarta.persistence.EntityManager;
 import jakarta.persistence.PersistenceContext;
-import jakarta.transaction.Transactional;
 import org.springframework.stereotype.Service;
 
@@ -19,11 +18,12 @@
     
     @Override
-    @Transactional
-    public void createReview(Reviews review) {
+    public void createReview(String title, String description, int numStar, Hotels hotel, Restaurant restaurant, Transport transport) {
+        Reviews review = new Reviews (title, numStar, description, hotel, restaurant, transport);
         em.persist(review);
     }
 
     @Override
-    public void deleteReview(Reviews review) {
+    public void deleteReview(long id) {
+        Reviews review = findReviewById(id);
         em.remove(review);
     }
@@ -35,5 +35,12 @@
 
     @Override
-    public void editReview(Reviews review) {
+    public void editReview(long id, String title, String description, int numStar, Hotels hotel, Restaurant restaurant, Transport transport) {
+        Reviews review = findReviewById(id);
+        review.setDescription(description);
+        review.setHotel(hotel);
+        review.setRestaurant(restaurant);
+        review.setTitle(title);
+        review.setNumStar(numStar);
+        review.setTransport(transport);
         em.persist(review);
     }
Index: src/main/java/com/tourMate/dao/impl/TokenDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/TokenDaoImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/dao/impl/TokenDaoImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -0,0 +1,36 @@
+package com.tourMate.dao.impl;
+
+import com.tourMate.dao.TokenDao;
+import com.tourMate.entities.Token;
+import jakarta.persistence.Entity;
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.PersistenceContext;
+import jakarta.transaction.Transactional;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+
+@Service
+public class TokenDaoImpl implements TokenDao {
+
+    @PersistenceContext
+    EntityManager em;
+    @Override
+    public void saveToken(Token token) {
+        em.persist(token);
+    }
+
+    @Override
+    public Token getToken(String token) {
+        return (Token) em.createQuery("select t from Token t where t.token = :token").setParameter("token", token).getSingleResult();
+    }
+
+    @Override
+    @Transactional
+    public void setConfirmedAt(String token, LocalDateTime dateTime) {
+        Token t = getToken(token);
+        t.setConfirmedAt(LocalDateTime.now());
+        em.persist(t);
+    }
+}
Index: src/main/java/com/tourMate/dao/impl/TransportDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/TransportDaoImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dao/impl/TransportDaoImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -2,4 +2,6 @@
 
 import com.tourMate.dao.TransportDao;
+import com.tourMate.dto.RouteListingDto;
+import com.tourMate.dto.TransportDto;
 import com.tourMate.entities.*;
 import jakarta.persistence.EntityManager;
@@ -8,4 +10,5 @@
 import org.springframework.stereotype.Service;
 
+import java.util.Collection;
 import java.util.Date;
 import java.util.List;
@@ -19,5 +22,7 @@
     @Override
     @Transactional
-    public void createTransport(Transport t) {
+    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate) {
+        User u = em.find(User.class, 1);
+        Transport t=new Transport(transportName,carBrand,carType,carManufacturedYear,noPassengers,noBags,EMBG,u,carPlate);
         em.persist(t);
     }
@@ -25,5 +30,6 @@
     @Override
     @Transactional
-    public void deleteTransport(Transport t) {
+    public void deleteTransport(long transportId) {
+        Transport t=getTransportById(transportId);
         em.remove(t);
     }
@@ -35,25 +41,70 @@
 
     @Override
-    public List<Transport> getTransportsByUser(User u) {
-        List<Transport> transports = em.createQuery("select t from Transport t where t.owner = :u or t.owner in :users")
-                .setParameter("u", u)
-                .setParameter("users", u.getConnectedAccounts())
-                .getResultList();
-        return transports;
-    }
-
-    @Override
-    public List<TransportAvailible> getRoutesForTransport(Transport t) {
+    public List<TransportDto> getTransportsByUser(long userId) {
+        User u = em.find(User.class, userId);
+        List<Transport> transports = em.createQuery("select t from Transport t where t.owner = :u").setParameter("u", u).getResultList();
+        return transports.stream().map(x -> new TransportDto(
+                x.getTransportID(),
+                x.getTransportName(),
+                x.getCarBrand(),
+                x.getCarType(),
+                x.getCarManufacturedYear(),
+                x.getNoPassengers(),
+                x.getNoBags(),
+                x.getEMBG(),
+                x.getOwner(),
+                x.getCarPlate(),
+                x.getAvailableRoutes().stream().map(y -> new RouteListingDto(
+                        y.getTransportAvailibleId(),
+                        y.getFrom(),
+                        y.getTo(),
+                        y.getDate(),
+                        y.getFreeSpace(),
+                        y.getTime(),
+                        y.getRoutes()
+                )).toList()
+        )).toList();
+    }
+
+    @Override
+    public List<RouteListingDto> getRoutesForTransport(long transportId) {
+        Transport t = em.find(Transport.class, transportId);
         List<TransportAvailible> transportsAvailible = em.createQuery("select ta from TransportAvailible ta where ta.transport = :transport").setParameter("transport", t).getResultList();
-        return transportsAvailible;
-    }
-
-    @Override
-    public Transport findTransportById(long transportId) {
+        return transportsAvailible.stream().map(x -> new RouteListingDto(
+                x.getTransportAvailibleId(),
+                x.getFrom(),
+                x.getTo(),
+                x.getDate(),
+                x.getFreeSpace(),
+                x.getTime(),
+                x.getRoutes()
+        )).toList();
+    }
+
+    @Override
+    public TransportDto findTransportById(long transportId) {
         Transport x = em.find(Transport.class,transportId);
-        return x;
-    }
-
-    @Override
+        return new TransportDto(
+                x.getTransportID(),
+                x.getTransportName(),
+                x.getCarBrand(),
+                x.getCarType(),
+                x.getCarManufacturedYear(),
+                x.getNoPassengers(),
+                x.getNoBags(),
+                x.getEMBG(),
+                x.getOwner(),
+                x.getCarPlate(),
+                x.getAvailableRoutes().stream().map(y -> new RouteListingDto(
+                        y.getTransportAvailibleId(),
+                        y.getFrom(),
+                        y.getTo(),
+                        y.getDate(),
+                        y.getFreeSpace(),
+                        y.getTime(),
+                        y.getRoutes()
+                )).toList());
+    }
+
     public Transport getTransportById(long transportId)
     {
@@ -63,5 +114,15 @@
     @Override
     @Transactional
-    public void editTransport(Transport t) {
+    public void editTransport(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate) {
+        Transport t=getTransportById(transportID);
+        t.setTransportName(transportName);
+        t.setCarBrand(carBrand);
+        t.setCarType(carType);
+        t.setCarManufacturedYear(carManufacturedYear);
+        t.setNoPassengers(noPassengers);
+        t.setNoBags(noBags);
+        t.setEMBG(EMBG);
+        t.setOwner(owner);
+        t.setCarPlate(carPlate);
         em.persist(t);
     }
@@ -69,6 +130,7 @@
     @Override
     @Transactional
-    public void createTransportReservation(TransportReservation transportReservation) {
-        em.persist(transportReservation);
+    public void createTransportReservation(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour) {
+        TransportReservation tr=new TransportReservation(transport,departureLocation,arrivalLocation,date,noSeats,user,departureHour);
+        em.persist(tr);
     }
 
@@ -89,11 +151,8 @@
 
     @Override
-    public List<TransportRoute> getTransportsAvailableByFilters(String fromL, String toL, Date date, int numPassengers) {
+    public List<TransportRoute> getTransportsAvailableByFilters(String fromL, String toL, Date date) {
         System.out.println(fromL + " " + toL);
-        return em.createQuery("select h from TransportRoute h where h.from = :froml and h.to = :tol and h.freeSpace >= :nump")
-                .setParameter("froml", fromL)
-                .setParameter("tol", toL)
-                .setParameter("nump", numPassengers)
-                .getResultList();
+        return em.createQuery("select h from TransportRoute h where h.from = :froml and h.to = :tol").setParameter("froml", fromL).
+                setParameter("tol", toL).getResultList();
     }
 
@@ -110,11 +169,37 @@
     @Override
     @Transactional
-    public void createTransportAvailable(TransportAvailible ta) {
+    public void createTransportAvailable(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour, Collection<TransportRoute> routes) {
+        TransportAvailible ta=new TransportAvailible(transport,departureLocation,arrivalLocation,date,noSeats,departureHour);
         em.persist(ta);
-
-    }
-
-    @Override
-    public void editTransportAvailable(TransportAvailible ta) {
+        List<TransportRoute> routes1 = routes.stream().toList();
+        routes.forEach(x -> {
+            createTransportRoute(ta, x.getFrom(), x.getTo(), x.getPrice(), x.getDeparture(), x.getArrival(), x.getFreeSpace(), x.getOrder());
+        });
+    }
+
+    @Override
+    @Transactional
+    public void editTransportReservation(Transport transport, long reservationID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour)
+    {
+        TransportReservation tr=findTransportReservationByID(reservationID);
+        tr.setTransport(transport);
+        tr.setDepartureLocation(departureLocation);
+        tr.setArrivalLocation(arrivalLocation);
+        tr.setDate(date);
+        tr.setNoSeats(noSeats);
+        tr.setUser(user);
+        tr.setDepartureHour(departureHour);
+        em.persist(tr);
+    }
+
+    @Override
+    public void editTransportAvailable(Transport transport, long availableID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour) {
+        TransportAvailible ta=findTransportAvailableByID(availableID);
+        ta.setTransport(transport);
+        ta.setFrom(departureLocation);
+        ta.setTo(arrivalLocation);
+        ta.setDate(date);
+        ta.setFreeSpace(noSeats);
+        ta.setTime(departureHour);
         em.persist(ta);
     }
@@ -126,36 +211,7 @@
 
     @Override
-    public List<Reviews> getReviewsForTransport(Transport transport) {
-        return em.createQuery("select r from Reviews r where r.transport = :transport")
-                .setParameter("transport", transport)
-                .getResultList();
-    }
-
-    @Override
-    public List<TransportReservation> findPastReservationByUser(User user) {
-        return em.createQuery("SELECT r from TransportReservation r where r.user = :user and r.transportRoute.arrival <= now()")
-                .setParameter("user", user)
-                .getResultList();
-
-    }
-
-    @Transactional
-    @Override
-    public void saveReservation(TransportReservation transportReservation) {
-        em.persist(transportReservation);
-    }
-
-    @Override
-    public List<TransportReservation> findReservationByUser(User user) {
-        return em.createQuery("SELECT r from TransportReservation r where r.user = :user and r.transportRoute.arrival >= now()")
-                .setParameter("user", user)
-                .getResultList();
-
-    }
-
-
-    @Override
-    @Transactional
-    public void deleteTransportReservation(TransportReservation tr) {
+    @Transactional
+    public void deleteTransportReservation(long reservationID) {
+        TransportReservation tr=findTransportReservationByID(reservationID);
         em.remove(tr);
     }
@@ -163,32 +219,34 @@
     @Override
     @Transactional
-    public void deleteTransportAvailable(TransportAvailible ta) {
+    public void deleteTransportAvailable(long availableID) {
+        TransportAvailible ta=findTransportAvailableByID(availableID);
         em.remove(ta);
     }
 
     @Override
-    @Transactional
-    public void createTransportRoute(TransportRoute tr) {
-        em.persist(tr);
-    }
-
-    @Override
-    public void deleteTransportRoute(TransportRoute tr) {
+    public void createTransportRoute(TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order) {
+        TransportRoute tr = new TransportRoute(parentRoute, from, to, price, departure, arrival, freeSpace, order);
+        em.persist(tr);
+    }
+
+    @Override
+    public void deleteTransportRoute(long transportRouteId) {
+        TransportRoute tr = findTransportRouteById(transportRouteId);
         em.remove(tr);
     }
 
     @Override
-    public void editTransportRoute(TransportRoute tr) {
-        em.persist(tr);
-
-    }
-
-    @Override
-    public List<TransportReservation> findTransportReservationByTransportId(Transport t) {
-        return em.createQuery("SELECT tr from TransportReservation tr where tr.transportRoute.parentRoute.transport= :transport")
-                .setParameter("transport", t)
-                .getResultList();
-    }
-
-
+    public void editTransportRoute(long transportRouteId, TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order) {
+        TransportRoute tr = findTransportRouteById(transportRouteId);
+        tr.setParentRoute(parentRoute);
+        tr.setFrom(from);
+        tr.setTo(to);
+        tr.setPrice(price);
+        tr.setDeparture(departure);
+        tr.setArrival(arrival);
+        tr.setFreeSpace(freeSpace);
+        tr.setOrder(order);
+        em.persist(tr);
+
+    }
 }
Index: src/main/java/com/tourMate/dao/impl/UsersDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/UsersDaoImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dao/impl/UsersDaoImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -4,40 +4,31 @@
 import com.tourMate.entities.Role;
 import com.tourMate.entities.User;
-import com.tourMate.events.OnProfileEnabledEvent;
-import com.tourMate.events.OnRegistrationSuccessEvent;
 import jakarta.persistence.EntityManager;
 import jakarta.persistence.PersistenceContext;
 import jakarta.transaction.Transactional;
+import org.jetbrains.annotations.NotNull;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationEventPublisher;
 import org.springframework.security.core.userdetails.UserDetails;
 import org.springframework.security.crypto.password.PasswordEncoder;
-import org.springframework.stereotype.Repository;
+import org.springframework.stereotype.Service;
 
 import java.util.Date;
 import java.util.List;
 
-@Repository
+@Service
 public class UsersDaoImpl implements UsersDao {
 
     @PersistenceContext
     EntityManager em;
+
     @Autowired
     PasswordEncoder passwordEncoder;
-    @Autowired
-    private ApplicationEventPublisher eventPublisher;
 
     @Transactional
     @Override
     public void createUser(String name, String surname, String email, Date birthDate, String address, String contact) {
-        Role r = em.find(Role.class, 2);
+        Role r = em.find(Role.class, 1);
         User user = new User(name, surname, email, passwordEncoder.encode("password"), birthDate, address, contact, r);
-        user.setProvider("local");
-        user.setLocked(true);
         em.persist(user);
-        if(user.getProvider().equals("local"))
-        {
-            eventPublisher.publishEvent(new OnRegistrationSuccessEvent(user));
-        }
     }
 
@@ -83,62 +74,5 @@
     }
 
-    @Override
-    public List<User> getUnapprovedUsers() {
-        return em.createQuery("select u from User u where not u.enabled").getResultList();
-    }
 
-    @Override
-    @Transactional
-    public void approveUserProfile(User u) {
-        u.setEnabled(true);
-        em.persist(u);
-        eventPublisher.publishEvent(new OnProfileEnabledEvent(u));
-    }
 
-    @Override
-    public Role findById(Long id) {
-        return em.find(Role.class, id);
-    }
-
-    @Override
-    @Transactional
-    public User updateUser(User s) {
-        em.persist(s);
-        return s;
-    }
-
-    @Override
-    public User findByUsernameAndProvider(String username, String providers)
-    {
-        try
-        {
-            return (User) em.createQuery("select u from User u where u.email = :username and u.provider = :provider")
-                    .setParameter("username", username)
-                    .setParameter("provider", providers)
-                    .getSingleResult();
-        }
-        catch (Exception ex)
-        {
-            return null;
-        }
-    }
-
-    @Override
-    @Transactional
-    public User mergeUser(User user) {
-        return em.merge(user);
-    }
-
-    @Override
-    public List<User> getAdmins() {
-        return em.createQuery("select u from User u where u.role.roleName = 'SUPERADMIN'")
-                .getResultList();
-    }
-
-    @Override
-    public List<User> findConnectedAccountsByUser(User u) {
-        return em.createQuery("select u.connectedAccounts from User u where u = :user")
-                .setParameter("user", u)
-                .getResultList();
-    }
 }
Index: src/main/java/com/tourMate/dto/HotelDto.java
===================================================================
--- src/main/java/com/tourMate/dto/HotelDto.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dto/HotelDto.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -1,5 +1,7 @@
 package com.tourMate.dto;
 
-import com.tourMate.entities.*;
+import com.tourMate.entities.HotelRoom;
+import com.tourMate.entities.HotelRoomAvailable;
+import com.tourMate.entities.User;
 
 import java.util.ArrayList;
@@ -18,10 +20,6 @@
     private double totalPrice;
     private List<HotelRoomAvailable> hotelRooms;
-    private List<Reviews> hotelReviews;
-    private double averageScore;
-    private List<HotelsImages> images;
-    private Boolean promoted;
-    private Boolean marketed;
-    public HotelDto(long hotelId, String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable, double totalPrice, List<HotelRoomAvailable> hotelRooms, List<Reviews> hotelReviews, double averageScore, List<HotelsImages> images, Boolean promoted, Boolean marketed) {
+
+    public HotelDto(long hotelId, String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable, double totalPrice, List<HotelRoomAvailable> hotelRooms) {
         this.hotelId = hotelId;
         this.hotelName = hotelName;
@@ -34,9 +32,4 @@
         this.totalPrice = totalPrice;
         this.hotelRooms = hotelRooms;
-        this.hotelReviews = hotelReviews;
-        this.averageScore = averageScore;
-        this.images = images;
-        this.promoted = promoted;
-        this.marketed = marketed;
     }
 
@@ -120,42 +113,3 @@
         this.hotelRooms = hotelRooms;
     }
-    public List<Reviews> getHotelReviews() {
-        return hotelReviews;
-    }
-
-    public double getAverageScore() {
-        return averageScore;
-    }
-
-    public List<HotelsImages> getImages() {
-        return images;
-    }
-
-    public void setImages(List<HotelsImages> images) {
-        this.images = images;
-    }
-
-    public void setHotelReviews(List<Reviews> hotelReviews) {
-        this.hotelReviews = hotelReviews;
-    }
-
-    public void setAverageScore(double averageScore) {
-        this.averageScore = averageScore;
-    }
-
-    public Boolean getPromoted() {
-        return promoted;
-    }
-
-    public void setPromoted(Boolean promoted) {
-        this.promoted = promoted;
-    }
-
-    public Boolean getMarketed() {
-        return marketed;
-    }
-
-    public void setMarketed(Boolean marketed) {
-        this.marketed = marketed;
-    }
 }
Index: src/main/java/com/tourMate/dto/HotelReservationDto.java
===================================================================
--- src/main/java/com/tourMate/dto/HotelReservationDto.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,42 +1,0 @@
-package com.tourMate.dto;
-
-import com.tourMate.entities.HotelRoom;
-import com.tourMate.entities.User;
-
-import java.util.Date;
-
-public class HotelReservationDto {
-    private User user;
-    private HotelRoom hotelRoom;
-    private Date dateFrom;
-    private Date dateTo;
-    private Integer numBeds;
-
-    public HotelReservationDto(User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numBeds) {
-        this.user = user;
-        this.hotelRoom = hotelRoom;
-        this.dateFrom = dateFrom;
-        this.dateTo = dateTo;
-        this.numBeds = numBeds;
-    }
-
-    public User getUser() {
-        return user;
-    }
-
-    public HotelRoom getHotelRoom() {
-        return hotelRoom;
-    }
-
-    public Date getDateFrom() {
-        return dateFrom;
-    }
-
-    public Date getDateTo() {
-        return dateTo;
-    }
-
-    public Integer getNumBeds() {
-        return numBeds;
-    }
-}
Index: src/main/java/com/tourMate/dto/HotelReservationUserDto.java
===================================================================
--- src/main/java/com/tourMate/dto/HotelReservationUserDto.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,79 +1,0 @@
-package com.tourMate.dto;
-import com.tourMate.entities.HotelRoom;
-import com.tourMate.entities.User;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.util.Date;
-
-public class HotelReservationUserDto {
-    private Long reservationId;
-    private User user;
-    private HotelRoom hotelRoom;
-    private Long hotelId;
-    @DateTimeFormat(pattern = "dd.MM.yyyy")
-    private Date dateFrom;
-    @DateTimeFormat(pattern = "dd.MM.yyyy")
-    private Date dateTo;
-    private Integer numBeds;
-    private String hotelName;
-    private String hotelLocation;
-    private String hotelAddress;
-    private Boolean reviewed;
-
-    public HotelReservationUserDto(Long reservationId, User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numBeds, String hotelName, String hotelLocation, String hotelAddress, Long hotelId, Boolean reviewed) {
-        this.reservationId = reservationId;
-        this.user = user;
-        this.hotelRoom = hotelRoom;
-        this.dateFrom = dateFrom;
-        this.dateTo = dateTo;
-        this.numBeds = numBeds;
-        this.hotelLocation = hotelLocation;
-        this.hotelName = hotelName;
-        this.hotelAddress = hotelAddress;
-        this.hotelId = hotelId;
-        this.reviewed = reviewed;
-    }
-
-    public Long getReservationId() {
-        return reservationId;
-    }
-
-    public User getUser() {
-        return user;
-    }
-
-    public HotelRoom getHotelRoom() {
-        return hotelRoom;
-    }
-
-    public Date getDateFrom() {
-        return dateFrom;
-    }
-
-    public Date getDateTo() {
-        return dateTo;
-    }
-
-    public Integer getNumBeds() {
-        return numBeds;
-    }
-
-    public String getHotelName() {
-        return hotelName;
-    }
-
-    public String getHotelLocation() {
-        return hotelLocation;
-    }
-    public String getHotelAddress() {
-        return hotelAddress;
-    }
-
-    public Long getHotelId() {
-        return hotelId;
-    }
-
-    public Boolean getReviewed() {
-        return reviewed;
-    }
-}
Index: src/main/java/com/tourMate/dto/PrincipalInfo.java
===================================================================
--- src/main/java/com/tourMate/dto/PrincipalInfo.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,71 +1,0 @@
-package com.tourMate.dto;
-
-public class PrincipalInfo {
-    Long id;
-    String username;
-    String role;
-    String name;
-    String surname;
-    String email;
-
-    public PrincipalInfo(Long id, String username, String role, String name, String surname, String email) {
-        this.id = id;
-        this.username = username;
-        this.role = role;
-        this.name = name;
-        this.surname = surname;
-        this.email = email;
-    }
-
-    public PrincipalInfo() {
-
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-    public String getRole() {
-        return role;
-    }
-
-    public void setRole(String role) {
-        this.role = role;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getSurname() {
-        return surname;
-    }
-
-    public void setSurname(String surname) {
-        this.surname = surname;
-    }
-
-    public String getEmail() {
-        return email;
-    }
-
-    public void setEmail(String email) {
-        this.email = email;
-    }
-}
Index: src/main/java/com/tourMate/dto/RestaurantDto.java
===================================================================
--- src/main/java/com/tourMate/dto/RestaurantDto.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dto/RestaurantDto.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -1,9 +1,10 @@
 package com.tourMate.dto;
 
-import com.tourMate.entities.*;
+import com.tourMate.entities.Menu;
+import com.tourMate.entities.RestaurantsTable;
+import com.tourMate.entities.User;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.List;
 
 public class RestaurantDto {
@@ -15,11 +16,7 @@
     private String restaurantEdbs;
     private Collection<Menu> menus = new ArrayList<Menu>();
-    private Collection<MenuImages> menuImages;
-    private Collection<RestaurantsAvailible> tables;
-    private Collection<Reviews> reviews;
-    private double averageScore;
-    private Collection<RestaurantImages> images;
+    private Collection<RestaurantsTable> tables;
 
-    public RestaurantDto(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, Collection<Menu> menus, Collection<RestaurantsAvailible> tables, Collection<Reviews> reviews, double averageScore, Collection<RestaurantImages> images, Collection<MenuImages> menuImages) {
+    public RestaurantDto(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, Collection<Menu> menus, Collection<RestaurantsTable> tables) {
         this.restaurantID = restaurantID;
         this.restaurantName = restaurantName;
@@ -30,11 +27,4 @@
         this.menus = menus;
         this.tables = tables;
-        this.reviews = reviews;
-        this.averageScore = averageScore;
-        this.images = images;
-        this.menuImages = menuImages;
-    }
-    public Collection<MenuImages> getMenuImages() {
-        return menuImages;
     }
 
@@ -95,35 +85,10 @@
     }
 
-    public Collection<RestaurantsAvailible> getTables() {
+    public Collection<RestaurantsTable> getTables() {
         return tables;
     }
 
-    public void setTables(Collection<RestaurantsAvailible> tables) {
+    public void setTables(Collection<RestaurantsTable> tables) {
         this.tables = tables;
     }
-
-    public Collection<Reviews> getReviews() {
-        return reviews;
-    }
-
-    public void setReviews(Collection<Reviews> reviews) {
-        this.reviews = reviews;
-    }
-
-    public double getAverageScore() {
-        return averageScore;
-    }
-
-    public void setAverageScore(double averageScore) {
-        this.averageScore = averageScore;
-    }
-
-    public Collection<RestaurantImages> getImages() {
-        return images;
-    }
-
-    public void setImages(Collection<RestaurantImages> images) {
-        this.images = images;
-    }
-
 }
Index: src/main/java/com/tourMate/dto/RestaurantReservationDto.java
===================================================================
--- src/main/java/com/tourMate/dto/RestaurantReservationDto.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,37 +1,0 @@
-package com.tourMate.dto;
-
-import com.tourMate.entities.HotelRoom;
-import com.tourMate.entities.RestaurantsTable;
-import com.tourMate.entities.User;
-
-import java.util.Date;
-
-public class RestaurantReservationDto {
-    private User user;
-    private RestaurantsTable restaurantsTable;
-    private Date dateFrom;
-    private Date dateTo;
-
-    public RestaurantReservationDto(User user, RestaurantsTable restaurantsTable, Date dateFrom, Date dateTo) {
-        this.user = user;
-        this.restaurantsTable = restaurantsTable;
-        this.dateFrom = dateFrom;
-        this.dateTo = dateTo;
-    }
-
-    public User getUser() {
-        return user;
-    }
-
-    public RestaurantsTable getRestaurantsTable() {
-        return restaurantsTable;
-    }
-
-    public Date getDateFrom() {
-        return dateFrom;
-    }
-
-    public Date getDateTo() {
-        return dateTo;
-    }
-}
Index: src/main/java/com/tourMate/dto/RestaurantReservationUserDto.java
===================================================================
--- src/main/java/com/tourMate/dto/RestaurantReservationUserDto.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,81 +1,0 @@
-package com.tourMate.dto;
-import com.tourMate.entities.HotelRoom;
-import com.tourMate.entities.RestaurantsTable;
-import com.tourMate.entities.User;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.util.Date;
-
-public class RestaurantReservationUserDto {
-    private Long reservationId;
-    private User user;
-    private RestaurantsTable restaurantsTable;
-    private Long restaurantId;
-    @DateTimeFormat(pattern = "dd.MM.yyyy")
-    private Date dateFrom;
-    @DateTimeFormat(pattern = "dd.MM.yyyy")
-    private Date dateTo;
-    private Integer numPeople;
-    private String restaurantName;
-    private String restaurantLocation;
-    private String restaurantAddress;
-    private Boolean reviewed;
-
-    public RestaurantReservationUserDto(Long reservationId, User user, RestaurantsTable restaurantsTable, Date dateFrom, Date dateTo, Integer numPeople, String restaurantName, String restaurantLocation, String restaurantAddress, Long restaurantId, Boolean reviewed) {
-        this.reservationId = reservationId;
-        this.user = user;
-        this.restaurantsTable = restaurantsTable;
-        this.dateFrom = dateFrom;
-        this.dateTo = dateTo;
-        this.numPeople = numPeople;
-        this.restaurantLocation = restaurantLocation;
-        this.restaurantName = restaurantName;
-        this.restaurantAddress = restaurantAddress;
-        this.restaurantId = restaurantId;
-        this.reviewed = reviewed;
-    }
-
-    public Long getReservationId() {
-        return reservationId;
-    }
-
-    public User getUser() {
-        return user;
-    }
-
-    public RestaurantsTable getRestaurantsTable() {
-        return restaurantsTable;
-    }
-
-    public Long getRestaurantId() {
-        return restaurantId;
-    }
-
-    public Date getDateFrom() {
-        return dateFrom;
-    }
-
-    public Date getDateTo() {
-        return dateTo;
-    }
-
-    public Integer getNumPeople() {
-        return numPeople;
-    }
-
-    public String getRestaurantName() {
-        return restaurantName;
-    }
-
-    public String getRestaurantLocation() {
-        return restaurantLocation;
-    }
-
-    public String getRestaurantAddress() {
-        return restaurantAddress;
-    }
-
-    public Boolean getReviewed() {
-        return reviewed;
-    }
-}
Index: src/main/java/com/tourMate/dto/RouteListingDto.java
===================================================================
--- src/main/java/com/tourMate/dto/RouteListingDto.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dto/RouteListingDto.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -18,7 +18,6 @@
     private Date time;
     private Collection<String> routes;
-    private Double maxPrice;
 
-    public RouteListingDto(long transportAvailibleId, String from, String to, Date date, int freeSpace, Date time, Collection<TransportRoute> routes, Double maxPrice) {
+    public RouteListingDto(long transportAvailibleId, String from, String to, Date date, int freeSpace, Date time, Collection<TransportRoute> routes) {
         this.transportAvailibleId = transportAvailibleId;
         this.from = from;
@@ -28,5 +27,4 @@
         this.time = time;
         this.routes = routes.stream().map(x -> x.getFrom()).distinct().skip(1).toList();
-        this.maxPrice = maxPrice;
     }
 
@@ -86,7 +84,3 @@
         this.routes = routes;
     }
-
-    public Double getMaxPrice() {
-        return maxPrice;
-    }
 }
Index: src/main/java/com/tourMate/dto/TransportDto.java
===================================================================
--- src/main/java/com/tourMate/dto/TransportDto.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dto/TransportDto.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -16,8 +16,7 @@
     private User owner;
     private String carPlate;
-    private Double maxPrice;
     private Collection<RouteListingDto> availableRoutes;
 
-    public TransportDto(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate, Collection<RouteListingDto> availableRoutes, Double maxPrice) {
+    public TransportDto(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate, Collection<RouteListingDto> availableRoutes) {
         this.transportID = transportID;
         this.transportName = transportName;
@@ -31,5 +30,4 @@
         this.carPlate = carPlate;
         this.availableRoutes = availableRoutes;
-        this.maxPrice = maxPrice;
     }
 
Index: src/main/java/com/tourMate/dto/TransportListingDto.java
===================================================================
--- src/main/java/com/tourMate/dto/TransportListingDto.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/dto/TransportListingDto.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -1,5 +1,4 @@
 package com.tourMate.dto;
 
-import com.tourMate.entities.Reviews;
 import com.tourMate.entities.Transport;
 import com.tourMate.entities.TransportRoute;
@@ -17,10 +16,12 @@
     private double price;
     private Collection<String> routes;
-    private Collection<TransportRoute> transportRoutes;
     private Collection<Date> times;
     private Transport transport;
-    private Collection<Reviews> reviews;
-    private double averageScore;
-    public TransportListingDto(long transportAvailibleId, String from, String to, Date date, int freeSpace, Date time, double price, Collection<TransportRoute> routes, Transport transport, Collection<Reviews> reviews, double averageScore) {
+
+    public Collection<Date> getTimes() {
+        return times;
+    }
+
+    public TransportListingDto(long transportAvailibleId, String from, String to, Date date, int freeSpace, Date time, double price, Collection<TransportRoute> routes, Transport transport) {
         this.transportAvailibleId = transportAvailibleId;
         this.from = from;
@@ -33,7 +34,4 @@
         this.times = routes.stream().map(x -> x.getArrival()).distinct().skip(1).toList();
         this.transport = transport;
-        this.transportRoutes = routes;
-        this.reviews = reviews;
-        this.averageScore = averageScore;
     }
 
@@ -109,27 +107,3 @@
         this.transport = transport;
     }
-
-    public Collection<TransportRoute> getTransportRoutes() {
-        return transportRoutes;
-    }
-
-    public void setTransportRoutes(Collection<TransportRoute> transportRoutes) {
-        this.transportRoutes = transportRoutes;
-    }
-
-    public void setTimes(Collection<Date> times) {
-        this.times = times;
-    }
-
-    public Collection<Date> getTimes() {
-        return times;
-    }
-
-    public Collection<Reviews> getReviews() {
-        return reviews;
-    }
-
-    public double getAverageScore() {
-        return averageScore;
-    }
 }
Index: src/main/java/com/tourMate/dto/TransportReservationUserDto.java
===================================================================
--- src/main/java/com/tourMate/dto/TransportReservationUserDto.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,68 +1,0 @@
-package com.tourMate.dto;
-
-import com.tourMate.entities.HotelRoom;
-import com.tourMate.entities.RestaurantsTable;
-import com.tourMate.entities.TransportRoute;
-import com.tourMate.entities.User;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.util.Date;
-
-public class TransportReservationUserDto {
-    private Long reservationId;
-    private User user;
-    private TransportRoute transportRoute;
-    private Long transportId;
-    private Integer numPeople;
-    private String carBrand;
-    private String carType;
-    private User owner;
-    private Boolean reviewed;
-
-    public TransportReservationUserDto(Long reservationId, User user, TransportRoute transportRoute, Long transportId, Integer numPeople, String carBrand, String carType, User owner, Boolean reviewed) {
-        this.reservationId = reservationId;
-        this.user = user;
-        this.transportRoute = transportRoute;
-        this.transportId = transportId;
-        this.numPeople = numPeople;
-        this.carBrand = carBrand;
-        this.carType = carType;
-        this.owner = owner;
-        this.reviewed = reviewed;
-    }
-    public Long getReservationId() {
-        return reservationId;
-    }
-
-    public User getUser() {
-        return user;
-    }
-
-    public TransportRoute getTransportRoute() {
-        return transportRoute;
-    }
-
-    public Long getTransportId() {
-        return transportId;
-    }
-
-    public Integer getNumPeople() {
-        return numPeople;
-    }
-
-    public String getCarBrand() {
-        return carBrand;
-    }
-
-    public String getCarType() {
-        return carType;
-    }
-
-    public User getOwner() {
-        return owner;
-    }
-
-    public Boolean getReviewed() {
-        return reviewed;
-    }
-}
Index: src/main/java/com/tourMate/entities/Business.java
===================================================================
--- src/main/java/com/tourMate/entities/Business.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/entities/Business.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -88,5 +88,5 @@
     }
 
-    @OneToOne(fetch = FetchType.EAGER)
+    @OneToOne(fetch = FetchType.LAZY)
     @JoinColumn(name = "owner_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_biznis_kon_korisnik"))
     public User getUser() {
@@ -107,4 +107,3 @@
         this.approved = approved;
     }
-
 }
Index: src/main/java/com/tourMate/entities/HotelRoom.java
===================================================================
--- src/main/java/com/tourMate/entities/HotelRoom.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/entities/HotelRoom.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -5,5 +5,4 @@
 
 import javax.validation.constraints.NotNull;
-import java.util.List;
 
 @Entity
@@ -17,11 +16,9 @@
     private String hotelRoomName;
     private double price;
-    private int numOfBeds;
     private Boolean kitchenAvailable;
     private Boolean airConditioning;
     private Boolean balcony;
-    private List<HotelRoomImages> images;
 
-    public HotelRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String hotelRoomName, double price, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, int numOfBeds) {
+    public HotelRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String hotelRoomName, double price, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony) {
         this.hotelRoomId = hotelRoomId;
         this.hotel = hotel;
@@ -32,9 +29,8 @@
         this.airConditioning = airConditioning;
         this.balcony = balcony;
-        this.numOfBeds = numOfBeds;
     }
 
     public HotelRoom(Hotels hotel, String hotelRoomDescription, String type,
-                     Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds) {
+                     Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
         this.hotel = hotel;
         this.hotelRoomDescription = hotelRoomDescription;
@@ -44,9 +40,8 @@
         this.balcony = balcony;
         this.price = price;
-        this.numOfBeds = numOfBeds;
     }
 
     public HotelRoom(String hotelRoomDescription, String type,
-                     Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds) {
+                     Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
         this.hotel = hotel;
         this.hotelRoomDescription = hotelRoomDescription;
@@ -56,5 +51,4 @@
         this.balcony = balcony;
         this.price = price;
-        this.numOfBeds = numOfBeds;
     }
 
@@ -74,5 +68,5 @@
     }
 
-    @ManyToOne(fetch = FetchType.EAGER)
+    @ManyToOne(fetch = FetchType.LAZY)
     @JoinColumn(name = "hotel_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_room_kon_hotel"))
     public Hotels getHotel() {
@@ -140,21 +134,3 @@
         this.balcony = balcony;
     }
-
-    @Column(name = "hotel_room_num_beds", unique = false)
-    public int getNumOfBeds() {
-        return numOfBeds;
-    }
-
-    public void setNumOfBeds(int numOfBeds) {
-        this.numOfBeds = numOfBeds;
-    }
-
-    @OneToMany(mappedBy = "room")
-    public List<HotelRoomImages> getImages() {
-        return images;
-    }
-
-    public void setImages(List<HotelRoomImages> images) {
-        this.images = images;
-    }
 }
Index: src/main/java/com/tourMate/entities/HotelRoomImages.java
===================================================================
--- src/main/java/com/tourMate/entities/HotelRoomImages.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/entities/HotelRoomImages.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -1,5 +1,4 @@
 package com.tourMate.entities;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
 import jakarta.persistence.*;
 import org.jetbrains.annotations.NotNull;
@@ -9,16 +8,6 @@
 public class HotelRoomImages {
     private long imageID;
-    @JsonIgnore
     private HotelRoom room;
     private String url;
-
-    public HotelRoomImages(HotelRoom room, String url) {
-        this.room = room;
-        this.url = url;
-    }
-
-    public HotelRoomImages() {
-
-    }
 
     @Id
Index: src/main/java/com/tourMate/entities/HotelRoomReservations.java
===================================================================
--- src/main/java/com/tourMate/entities/HotelRoomReservations.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/entities/HotelRoomReservations.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -17,5 +17,4 @@
     private Date dateTo;
     private Integer numberOfBeds;
-    Boolean reviewed;
 
     public HotelRoomReservations(User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds) {
@@ -25,5 +24,4 @@
         this.dateTo = dateTo;
         this.numberOfBeds = numberOfBeds;
-        this.reviewed = false;
     }
 
@@ -43,5 +41,5 @@
     }
 
-    @ManyToOne(fetch = FetchType.EAGER)
+    @ManyToOne(fetch = FetchType.LAZY)
     @JoinColumn(name = "room_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_roomres_kon_room"))
     public HotelRoom getHotelRoom() {
@@ -59,5 +57,5 @@
     }
 
-    @OneToOne(fetch = FetchType.EAGER)
+    @OneToOne(fetch = FetchType.LAZY)
     @JoinColumn(name = "user_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_roomres_kon_user"))
     public User getUser() {
@@ -91,12 +89,4 @@
         this.numberOfBeds = numberOfBeds;
     }
-    @Column(name="reviewed", unique = false)
-    public Boolean getReviewed() {
-        return reviewed;
-    }
-
-    public void setReviewed(Boolean reviewed) {
-        this.reviewed = reviewed;
-    }
 }
 
Index: src/main/java/com/tourMate/entities/HotelRoomType.java
===================================================================
--- src/main/java/com/tourMate/entities/HotelRoomType.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/entities/HotelRoomType.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
Index: src/main/java/com/tourMate/entities/HotelsImages.java
===================================================================
--- src/main/java/com/tourMate/entities/HotelsImages.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/entities/HotelsImages.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -15,7 +15,4 @@
         this.hotel = hotel;
         this.url = url;
-    }
-
-    public HotelsImages() {
     }
 
Index: src/main/java/com/tourMate/entities/MenuImages.java
===================================================================
--- src/main/java/com/tourMate/entities/MenuImages.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-package com.tourMate.entities;
-
-import jakarta.persistence.*;
-import lombok.Data;
-
-@Entity
-public class MenuImages {
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    private long imageId;
-    @ManyToOne
-    private Menu menu;
-    private String url;
-
-    public MenuImages(Menu menu, String url) {
-        this.menu = menu;
-        this.url = url;
-    }
-
-    public MenuImages() {
-    }
-
-    public long getImageId() {
-        return imageId;
-    }
-
-    public void setImageId(long imageId) {
-        this.imageId = imageId;
-    }
-
-    public Menu getMenu() {
-        return menu;
-    }
-
-    public void setMenu(Menu menu) {
-        this.menu = menu;
-    }
-
-    public String getUrl() {
-        return url;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-}
Index: src/main/java/com/tourMate/entities/Providers.java
===================================================================
--- src/main/java/com/tourMate/entities/Providers.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,8 +1,0 @@
-package com.tourMate.entities;
-
-public enum Providers {
-    local,
-    github,
-    google,
-    facebook
-}
Index: src/main/java/com/tourMate/entities/RestaurantImages.java
===================================================================
--- src/main/java/com/tourMate/entities/RestaurantImages.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/entities/RestaurantImages.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -12,12 +12,4 @@
     private String url;
 
-    public RestaurantImages(Restaurant restaurant, String url) {
-        this.restaurant = restaurant;
-        this.url = url;
-    }
-
-    public RestaurantImages() {
-    }
-
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
@@ -31,5 +23,5 @@
     }
 
-    @ManyToOne(fetch = FetchType.EAGER)
+    @ManyToOne(fetch = FetchType.LAZY)
     @JoinColumn(name="restaurant_id",unique = false,nullable = false,foreignKey = @ForeignKey(name = "fk_ref_od_restimg_kon_restoran"))
     public Restaurant getRestaurant() {
Index: src/main/java/com/tourMate/entities/RestaurantReservations.java
===================================================================
--- src/main/java/com/tourMate/entities/RestaurantReservations.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/entities/RestaurantReservations.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -17,5 +17,4 @@
     private int noSeats;
     private User user;
-    private Boolean reviewed;
 
     public RestaurantReservations(RestaurantsTable table, Date timeFrom, Date timeTo, int noSeats, User user) {
@@ -25,8 +24,4 @@
         this.noSeats = noSeats;
         this.user = user;
-        this.reviewed = false;
-    }
-
-    public RestaurantReservations() {
     }
 
@@ -42,5 +37,5 @@
     }
 
-    @ManyToOne(fetch = FetchType.EAGER)
+    @ManyToOne(fetch = FetchType.LAZY)
     @JoinColumn(name = "table_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_rezervacija_kon_masa"))
     public RestaurantsTable getTable() {
@@ -82,5 +77,5 @@
     }
 
-    @ManyToOne(fetch = FetchType.EAGER)
+    @ManyToOne(fetch = FetchType.LAZY)
     @JoinColumn(name = "user_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_rezervacija_restoran_kon_korisnik"))
     public User getUser() {
@@ -91,12 +86,3 @@
         this.user = user;
     }
-
-    @Column(name="reviewed", unique = false)
-    public Boolean getReviewed() {
-        return reviewed;
-    }
-
-    public void setReviewed(Boolean reviewed) {
-        this.reviewed = reviewed;
-    }
 }
Index: src/main/java/com/tourMate/entities/RestaurantsAvailible.java
===================================================================
--- src/main/java/com/tourMate/entities/RestaurantsAvailible.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/entities/RestaurantsAvailible.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -11,4 +11,5 @@
 public class RestaurantsAvailible {
     private long restaurantAvailibleId;
+    @JsonIgnore
     private RestaurantsTable restaurantTable;
     @Temporal(TemporalType.TIME)
@@ -17,4 +18,7 @@
     private Date hourTo;
     private int numTables;
+
+    //TODO geteri seteri za numPeople
+    //TODO sredi vo dao i services
 
     public RestaurantsAvailible(RestaurantsTable restaurantTable, Date hourFrom, Date hourTo, int numTables) {
@@ -46,5 +50,5 @@
     }
 
-    @ManyToOne(fetch = FetchType.EAGER)
+    @ManyToOne(fetch = FetchType.LAZY)
     @JoinColumn(name = "table_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_tableavailable_kon_table"))
     public RestaurantsTable getRestaurantTable() {
@@ -75,13 +79,3 @@
         this.hourTo = hourTo;
     }
-
-    @Column(name = "num_tables", unique = false, nullable = true)
-    public int getNumTables() {
-        return numTables;
-    }
-
-    public void setNumTables(int numTables) {
-        this.numTables = numTables;
-    }
-
 }
Index: src/main/java/com/tourMate/entities/Reviews.java
===================================================================
--- src/main/java/com/tourMate/entities/Reviews.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/entities/Reviews.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -1,5 +1,4 @@
 package com.tourMate.entities;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
 import jakarta.persistence.*;
 
@@ -13,9 +12,6 @@
     private int numStar;
     private String description;
-    @JsonIgnore
     private Hotels hotel;
-    @JsonIgnore
     private Restaurant restaurant;
-    @JsonIgnore
     private Transport transport;
 
@@ -75,5 +71,5 @@
 
     @ManyToOne(fetch = FetchType.LAZY)
-    @JoinColumn(name = "hotel_id", unique = false, nullable = true, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_hotel"))
+    @JoinColumn(name = "hotel_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_hotel"))
     public Hotels getHotel () {
         return hotel;
@@ -85,5 +81,5 @@
 
     @ManyToOne(fetch = FetchType.LAZY)
-    @JoinColumn(name = "restaurant_id", unique = false, nullable = true, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_restorani"))
+    @JoinColumn(name = "restaurant_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_restorani"))
     public Restaurant getRestaurant () {
         return restaurant;
@@ -95,5 +91,5 @@
 
     @ManyToOne(fetch = FetchType.LAZY)
-    @JoinColumn(name = "transport_id", unique = false, nullable = true, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_transport"))
+    @JoinColumn(name = "transport_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_transport"))
     public Transport getTransport () {
         return transport;
Index: src/main/java/com/tourMate/entities/TransportReservation.java
===================================================================
--- src/main/java/com/tourMate/entities/TransportReservation.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/entities/TransportReservation.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -9,15 +9,23 @@
 @Table(name = "TransportReservation", schema = "public")
 public class TransportReservation {
+    private Transport transport;
     private long reservationID;
-    private TransportRoute transportRoute;
+    private String departureLocation;
+    private String arrivalLocation;
+    @Temporal(TemporalType.DATE)
+    private Date date;
     private Integer noSeats;
     private User user;
-    private Boolean reviewed;
+    @Temporal(TemporalType.TIME)
+    private Date departureHour;
 
-    public TransportReservation(TransportRoute transportRoute, Integer noSeats, User user) {
-        this.transportRoute = transportRoute;
+    public TransportReservation(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour) {
+        this.transport = transport;
+        this.departureLocation = departureLocation;
+        this.arrivalLocation = arrivalLocation;
+        this.date = date;
         this.noSeats = noSeats;
         this.user = user;
-        this.reviewed = false;
+        this.departureHour = departureHour;
     }
 
@@ -25,16 +33,12 @@
     }
 
-    @ManyToOne(fetch = FetchType.EAGER)
-    @JoinColumn(name = "transport_route_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_rezervacii_kon_prevozi"))
-    public TransportRoute getTransportRoute() {
-        return transportRoute;
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "transport_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_rezervacii_kon_prevozi"))
+    public Transport getTransport() {
+        return transport;
     }
 
-    public void setTransportRoute(TransportRoute transportRoute) {
-        this.transportRoute = transportRoute;
-    }
-
-    public void setNoSeats(Integer noSeats) {
-        this.noSeats = noSeats;
+    public void setTransport(Transport transport) {
+        this.transport = transport;
     }
 
@@ -48,4 +52,34 @@
     public void setReservationID(long reservationID) {
         this.reservationID = reservationID;
+    }
+
+    @Column(name = "departure_location", unique = false, nullable = false)
+    @NotNull
+    public String getDepartureLocation() {
+        return departureLocation;
+    }
+
+    public void setDepartureLocation(String departureLocation) {
+        this.departureLocation = departureLocation;
+    }
+
+    @Column(name = "arrival_location", unique = false, nullable = false)
+    @NotNull
+    public String getArrivalLocation() {
+        return arrivalLocation;
+    }
+
+    public void setArrivalLocation(String arrivalLocation) {
+        this.arrivalLocation = arrivalLocation;
+    }
+
+    @Column(name = "date", unique = false, nullable = false)
+    @NotNull
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
     }
 
@@ -69,12 +103,13 @@
         this.user = user;
     }
-    @Column(name="reviewed", unique = false)
-    public Boolean getReviewed() {
-        return reviewed;
+
+    @Column(name = "departure_hour", unique = false, nullable = false)
+    @NotNull
+    public Date getDepartureHour() {
+        return departureHour;
     }
 
-    public void setReviewed(Boolean reviewed) {
-        this.reviewed = reviewed;
+    public void setDepartureHour(Date departureHour) {
+        this.departureHour = departureHour;
     }
-
 }
Index: src/main/java/com/tourMate/entities/User.java
===================================================================
--- src/main/java/com/tourMate/entities/User.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/entities/User.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -14,5 +14,4 @@
 import java.util.Collections;
 import java.util.Date;
-import java.util.List;
 
 @Entity
@@ -28,5 +27,5 @@
     private String name;
 
-    @Column(name = "surname", unique = false, nullable = true)
+    @Column(name = "surname", unique = false, nullable = false)
     private String surname;
 
@@ -35,16 +34,16 @@
     private String email;
 
-    @Column(name = "password", unique = true, nullable = true)
+    @Column(name = "password", unique = true, nullable = false)
     @NotNull
     private String password;
 
-    @Column(name = "birth_date", unique = false, nullable = true)
+    @Column(name = "birth_date", unique = false, nullable = false)
     @NotNull
     private Date birthDate;
 
-    @Column(name = "address", unique = false, nullable = true)
+    @Column(name = "address", unique = false, nullable = false)
     private String address;
 
-    @Column(name = "contact", unique = false, nullable = true)
+    @Column(name = "contact", unique = false, nullable = false)
     private String contact;
 
@@ -53,15 +52,8 @@
     private Role role;
     @Column(name = "locked", unique = false, nullable = false)
-    boolean locked = false;
+    boolean locked;
 
     @Column(name = "enabled", unique = false, nullable = false)
     boolean enabled;
-
-    @Column(name = "provider", unique = false, nullable = true)
-    String provider;
-
-    @ManyToMany
-    @JsonIgnore
-    List<User> connectedAccounts;
 
 
@@ -104,7 +96,4 @@
     }
 
-    public boolean isLocked() {
-        return locked;
-    }
 
     public long getUserID() {
@@ -128,16 +117,4 @@
     }
 
-    public List<User> getConnectedAccounts() {
-        return connectedAccounts;
-    }
-
-    public void setConnectedAccounts(List<User> connectedAccounts) {
-        this.connectedAccounts = connectedAccounts;
-    }
-
-    public void addConnectedUser(User u)
-    {
-        connectedAccounts.add(u);
-    }
 
     public void setSurname(String surname) {
@@ -185,5 +162,5 @@
     @Override
     public boolean isAccountNonLocked() {
-        return locked;
+        return true;
     }
 
@@ -232,11 +209,3 @@
         this.enabled = enabled;
     }
-
-    public String getProvider() {
-        return provider;
-    }
-
-    public void setProvider(String  provider) {
-        this.provider = provider;
-    }
 }
Index: src/main/java/com/tourMate/events/EmailEvent.java
===================================================================
--- src/main/java/com/tourMate/events/EmailEvent.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,48 +1,0 @@
-package com.tourMate.events;
-
-import com.tourMate.entities.User;
-import org.springframework.context.ApplicationEvent;
-
-public abstract class EmailEvent extends ApplicationEvent {
-    protected EventType eventType;
-    protected User user;
-    protected String subject;
-    protected String message;
-
-    public EmailEvent(User user) {
-        super(user);
-        this.user = user;
-    }
-
-    public User getUser() {
-        return user;
-    }
-
-    public void setUser(User user) {
-        this.user = user;
-    }
-
-    public EventType getEventType() {
-        return eventType;
-    }
-
-    public void setEventType(EventType eventType) {
-        this.eventType = eventType;
-    }
-
-    public String getSubject() {
-        return subject;
-    }
-
-    public void setSubject(String subject) {
-        this.subject = subject;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public void setMessage(String message) {
-        this.message = message;
-    }
-}
Index: src/main/java/com/tourMate/events/EventType.java
===================================================================
--- src/main/java/com/tourMate/events/EventType.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,10 +1,0 @@
-package com.tourMate.events;
-
-public enum EventType {
-    REGISTRATION,
-    PROFILE_ENABLED,
-    BUSINESS_APPROVED,
-    HOTEL_RESERVATION,
-    TRANSPORT_RESERVATION,
-    RESTAURANT_RESERVATION
-}
Index: src/main/java/com/tourMate/events/OnBusinessApprovedEvent.java
===================================================================
--- src/main/java/com/tourMate/events/OnBusinessApprovedEvent.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,12 +1,0 @@
-package com.tourMate.events;
-
-import com.tourMate.entities.User;
-
-public class OnBusinessApprovedEvent extends EmailEvent{
-    public OnBusinessApprovedEvent(User u) {
-        super(u);
-        this.eventType = EventType.BUSINESS_APPROVED;
-        this.subject = "TourMate - Верификуван бизнис";
-        this.message = "Драг кориснику,\n\nВе известуваме дека Вашата регистрација за фирма е одобрена. Можете да започнете со користење на бизнис услугите од нашата апликација.\n\n\nСо почит,\nTourMate";
-    }
-}
Index: src/main/java/com/tourMate/events/OnHotelReservationEvent.java
===================================================================
--- src/main/java/com/tourMate/events/OnHotelReservationEvent.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,32 +1,0 @@
-package com.tourMate.events;
-
-import com.tourMate.entities.HotelRoomReservations;
-import com.tourMate.entities.User;
-
-import java.text.SimpleDateFormat;
-
-public class OnHotelReservationEvent extends EmailEvent{
-    private HotelRoomReservations hotelRoomReservations;
-    public OnHotelReservationEvent(User u, HotelRoomReservations hotelRoomReservations) {
-        super(u);
-        this.hotelRoomReservations = hotelRoomReservations;
-        this.eventType = EventType.HOTEL_RESERVATION;
-        this.subject = "TourMate - Потврда за резервација - " + hotelRoomReservations.getHotelRoom().getHotel().getHotelName();
-        this.message = String.format("Драг кориснику,\n\nВе известуваме дека Вашата резервација за %s е потврдена\n\n" +
-                        "Детали за резервацијата:\n" +
-                        "%s - %s" +
-                        "\n%s" +
-                        "\n\n\nСо почит,\nTourMate", hotelRoomReservations.getHotelRoom().getHotel().getHotelName()
-                , new SimpleDateFormat("dd-MM-yyyy").format(hotelRoomReservations.getDateFrom())
-                , new SimpleDateFormat("dd-MM-yyyy").format(hotelRoomReservations.getDateTo())
-                , hotelRoomReservations.getHotelRoom().getHotelRoomName());
-    }
-
-    public HotelRoomReservations getHotelRoomReservations() {
-        return hotelRoomReservations;
-    }
-
-    public void setHotelRoomReservations(HotelRoomReservations hotelRoomReservations) {
-        this.hotelRoomReservations = hotelRoomReservations;
-    }
-}
Index: src/main/java/com/tourMate/events/OnProfileEnabledEvent.java
===================================================================
--- src/main/java/com/tourMate/events/OnProfileEnabledEvent.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,17 +1,0 @@
-package com.tourMate.events;
-
-import com.tourMate.entities.User;
-import jdk.jfr.Event;
-import org.springframework.context.ApplicationEvent;
-
-public class OnProfileEnabledEvent extends EmailEvent {
-    private static final long serialVersionUID = 1L;
-    private User user;
-
-    public OnProfileEnabledEvent(User user) {
-        super(user);
-        this.eventType = EventType.PROFILE_ENABLED;
-        this.subject = "TourMate - Активиран профил";
-        this.message = "Драг кориснику,\n\nВе известуваме дека Вашата регистрација е ревидирана од страна на администраторот и Вашиот профил е одобрен. Можете да започнете со користење.\n\n\nСо почит,\nTourMate";
-    }
-}
Index: src/main/java/com/tourMate/events/OnRegistrationSuccessEvent.java
===================================================================
--- src/main/java/com/tourMate/events/OnRegistrationSuccessEvent.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,17 +1,0 @@
-package com.tourMate.events;
-
-import com.tourMate.entities.User;
-import lombok.Data;
-import org.springframework.context.ApplicationEvent;
-
-public class OnRegistrationSuccessEvent extends EmailEvent {
-    private static final long serialVersionUID = 1L;
-    private User user;
-
-    public OnRegistrationSuccessEvent(User user) {
-        super(user);
-        this.eventType = EventType.REGISTRATION;
-        this.subject = "TourMate - Успешна регистрација";
-        this.message = "Драг кориснику,\n\nВе известуваме дека Вашата регистрација на апликацијата TourMate е успешна. За да можете да го користите профилот, потребно е истиот да е одобрен од страна на администраторот за што ќе добиете дополнителна потврда на оваа адреса.\n\n\nСо почит,\nTourMate";
-    }
-}
Index: src/main/java/com/tourMate/events/OnRestaurantReservationEvent.java
===================================================================
--- src/main/java/com/tourMate/events/OnRestaurantReservationEvent.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,34 +1,0 @@
-package com.tourMate.events;
-
-import com.tourMate.entities.RestaurantReservations;
-import com.tourMate.entities.TransportReservation;
-import com.tourMate.entities.User;
-
-import java.text.SimpleDateFormat;
-
-public class OnRestaurantReservationEvent extends EmailEvent {
-    private RestaurantReservations restaurantReservations;
-    public OnRestaurantReservationEvent(User u, RestaurantReservations restaurantReservations) {
-        super(u);
-        this.restaurantReservations = restaurantReservations;
-        this.eventType = EventType.RESTAURANT_RESERVATION;
-        this.subject = "TourMate - Потврда за резервација - " + restaurantReservations.getTable().getRestaurant().getRestaurantName();
-        this.message = String.format("Драг кориснику,\n\nВе известуваме дека Вашата резервација за %s е потврдена\n\n" +
-                        "Детали за резервацијата:\n" +
-                        "%s - %s" +
-                        "\nМаса за %s луѓе" +
-                        "\n\n\nСо почит,\nTourMate", restaurantReservations.getTable().getRestaurant().getRestaurantName()
-                , new SimpleDateFormat("dd-MM-yyyy hh:mm").format(restaurantReservations.getTimeFrom())
-                , new SimpleDateFormat("dd-MM-yyyy hh:mm").format(restaurantReservations.getTimeTo())
-                , restaurantReservations.getTable().getNoSeats());
-
-    }
-
-    public RestaurantReservations getRestaurantReservations() {
-        return restaurantReservations;
-    }
-
-    public void setRestaurantReservations(RestaurantReservations restaurantReservations) {
-        this.restaurantReservations = restaurantReservations;
-    }
-}
Index: src/main/java/com/tourMate/events/OnTransportReservationEvent.java
===================================================================
--- src/main/java/com/tourMate/events/OnTransportReservationEvent.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,30 +1,0 @@
-package com.tourMate.events;
-
-import com.tourMate.entities.HotelRoomReservations;
-import com.tourMate.entities.TransportReservation;
-import com.tourMate.entities.User;
-
-public class OnTransportReservationEvent extends EmailEvent {
-    private TransportReservation transportReservation;
-    public OnTransportReservationEvent(User u, TransportReservation transportReservation) {
-        super(u);
-        this.transportReservation = transportReservation;
-        this.eventType = EventType.HOTEL_RESERVATION;
-
-        this.subject = "TourMate - Потврда за резервација за рута " + transportReservation.getTransportRoute().getFrom() + " " + transportReservation.getTransportRoute().getTo();
-        this.message = String.format("Драг кориснику,\n\nВе известуваме дека Вашата резервација за патувањето %s е потврдена\n\n" +
-                        "Детали за резервацијата:\n" +
-                        "%s - %s" +
-                        "\n\n\nСо почит,\nTourMate", transportReservation.getTransportRoute().getFrom() + " " + transportReservation.getTransportRoute().getTo()
-                , transportReservation.getTransportRoute().getDeparture()
-                , transportReservation.getTransportRoute().getArrival());
-    }
-
-    public TransportReservation getTransportReservation() {
-        return transportReservation;
-    }
-
-    public void setTransportReservation(TransportReservation transportReservation) {
-        this.transportReservation = transportReservation;
-    }
-}
Index: src/main/java/com/tourMate/listeners/RegistrationEmailListener.java
===================================================================
--- src/main/java/com/tourMate/listeners/RegistrationEmailListener.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,27 +1,0 @@
-package com.tourMate.listeners;
-
-import com.tourMate.entities.User;
-import com.tourMate.events.*;
-import com.tourMate.services.MailingService;
-import com.tourMate.services.UsersManager;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationListener;
-import org.springframework.core.env.Environment;
-import org.springframework.stereotype.Component;
-
-import java.text.SimpleDateFormat;
-
-@Component
-public class RegistrationEmailListener implements ApplicationListener<EmailEvent> {
-
-    @Autowired
-    private Environment environment;
-    @Autowired
-    private MailingService mailingService;
-
-
-    @Override
-    public void onApplicationEvent(EmailEvent event) {
-        mailingService.sendMail(event.getUser().getEmail(), event.getSubject(), event.getMessage());
-    }
-}
Index: src/main/java/com/tourMate/services/BusinessManager.java
===================================================================
--- src/main/java/com/tourMate/services/BusinessManager.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/services/BusinessManager.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -8,12 +8,8 @@
     public void createBusiness(Business business, long userId);
     public List<Business> getUnapprovedBusinessesOfUser(long userId);
-
-    void deleteBusiness(long businessId);
-
-    public List<Business> getUnapprovedBusinesses();
-    public void approveBusiness(Long businessId);
+    public void deleteBusiness(long businessId);
+    public List<Business> getCreatedBusinesses();
     public Business findBusinessById (long businessId);
+    public void editBusiness(long businessId, String name, String phone, String address, String edbs, User user, boolean approved);
     public boolean hasBusiness(long userId);
-
-    void editBusiness(long businessId, String name, String phone, String address, String edbs, User user, boolean approved);
 }
Index: src/main/java/com/tourMate/services/HotelManager.java
===================================================================
--- src/main/java/com/tourMate/services/HotelManager.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/services/HotelManager.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -2,6 +2,4 @@
 
 import com.tourMate.dto.HotelDto;
-import com.tourMate.dto.HotelReservationDto;
-import com.tourMate.dto.HotelReservationUserDto;
 import com.tourMate.entities.*;
 
@@ -10,23 +8,24 @@
 
 public interface HotelManager {
-    void createHotel(String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable);
-    void createHotel(Hotels hotel, long userId);
-    List<Hotels> getHotels();
-    List<Hotels> getHotelsForUser(long userId);
-    List<Hotels> getHotelsByLocation(String hotelLocation);
-    void editHotel(long hotelId, String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable);
-    void deleteHotel(long hotelId);
-    Hotels findHotelByID (long hotelId);
-    public List<HotelsImages> getHotelImages(Long hotelId);
-    public void addHotelImage(Long hotel, List<String> url);
+    public void createHotel(String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable);
+    public void createHotel(Hotels hotel, long userId);
+    public List<Hotels> getHotels();
+    public List<Hotels> getHotelsForUser(long userId);
+    public List<Hotels> getHotelsByLocation(String hotelLocation);
+    public void editHotel(long hotelId, String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable);
+    public void deleteHotel(long hotelId);
+    public Hotels findHotelByID (long hotelId);
+    public List<HotelsImages> getHotelImages(Hotels hotels);
+    public void addHotelImage(Hotels hotel, String url);
     public void deleteHotelImage(long hotelImageId);
     public HotelsImages findHotelImageById(long hotelImageId);
     public List<HotelRoom> getRoomsOfHotel (long hotelId);
     public HotelRoom findRoomById (long hotelRoomId);
-    public List<HotelRoomImages> getRoomImages(Long hotelRoom);
-    public void createRoom(Long hotelId, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds);
+    public List<HotelRoomImages> getRoomImages(HotelRoom hotelRoom);
+    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price);
     public void editRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price);
     public void deleteRoom(long hotelRoomId);
-    public void createRoomAvailible(long hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
+    public List<HotelRoomAvailable> getRoomsAvailable(Long id);
+    public void createRoomAvailible(HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
     public void editRoomAvailible(long hotelRoomAvailableId, HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
     public void editRoomAvailibleReservation(Long HotelRoomAvailableId, Long hotelRoomId, Date from, Date to, int numberOfBeds);
@@ -34,24 +33,13 @@
     public HotelRoomAvailable findAvailibleRoomById(long hotelRoomAvailableId);
     public List<HotelRoomAvailable> getRoomsAvailibility();
-    public List<HotelRoomAvailable> getRoomsAvailableById(Long id);
     public List<HotelRoomAvailable> getRoomsAvailibilityByHotel(Hotels hotel);
-
-    List<HotelRoomReservations> getReservationsInPeriod(String hotelLocation, Date dateFrom, Date dateTo);
-
-    public List<HotelDto> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds, Boolean flexible);
+    public List<HotelDto> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds);
     public void createReservation(Long userId, Long hotelRoomId, Long hotelRoomAvailableId, Date dateFrom, Date dateTo, Integer numberOfBeds);
     public void editReservation(long hotelRoomReservedId, User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds);
     public void deleteReservation(long hotelRoomReservedId);
-    public List<HotelReservationDto> findVaidReseravtionsByHotel(Long hotelId);
-    public List<HotelReservationUserDto> findValidHotelReservationsByUser(Long userId);
     public HotelRoomReservations findReservationById(long hotelRoomReservedId);
     public List<HotelRoomReservations> findReservationByUser(User user);
     public List<HotelRoomReservations> findReservationByHotel(Hotels hotel);
     public List<HotelRoomReservations> getReservations();
-    public List<Reviews> getReviewsForHotel(Long hotelId);
 
-    List<HotelReservationUserDto> findPastHotelReservationsByUser(Long id);
-
-    void addRoomImage(Long id, List<String> filesToAdd);
-    void setReservationReviewed(Long reservationId);
 }
Index: src/main/java/com/tourMate/services/ImageManager.java
===================================================================
--- src/main/java/com/tourMate/services/ImageManager.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,9 +1,0 @@
-package com.tourMate.services;
-
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.List;
-
-public interface ImageManager {
-    public List<String> uploadImages(List<MultipartFile> files, Long id, String type);
-}
Index: src/main/java/com/tourMate/services/MailJobs.java
===================================================================
--- src/main/java/com/tourMate/services/MailJobs.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,31 +1,0 @@
-package com.tourMate.services;
-
-import com.tourMate.entities.Business;
-import com.tourMate.entities.User;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-@Component
-public class MailJobs {
-    @Autowired
-    private BusinessManager businessManager;
-    @Autowired
-    private UsersManager usersManager;
-    @Autowired
-    private MailingService mailingService;
-
-    @Scheduled(cron = "8 0 * * * MON")
-    public void execute() {
-        List<Business> unapprovedBusinesses = businessManager.getUnapprovedBusinesses();
-        if(!unapprovedBusinesses.isEmpty())
-        {
-            List<User> admins = usersManager.getAdmins().stream().filter(x -> x.getEmail().contains("@")).toList();
-            String subject = "Бизниси кои чекаат на одобрување";
-            String message = "Почитувани,\n\nВе известуваме дека постојат повеќе бизнис кои чекаат на Ваша одлука за одобрување.\n\nСо почит,\n\nTourMate";
-            admins.forEach(x -> mailingService.sendMail(x.getEmail(), subject, message));
-        }
-    }
-}
Index: src/main/java/com/tourMate/services/MailingService.java
===================================================================
--- src/main/java/com/tourMate/services/MailingService.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,5 +1,0 @@
-package com.tourMate.services;
-
-public interface MailingService {
-    public void sendMail(String to, String subject, String message);
-}
Index: src/main/java/com/tourMate/services/RestaurantManager.java
===================================================================
--- src/main/java/com/tourMate/services/RestaurantManager.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/services/RestaurantManager.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -2,6 +2,4 @@
 
 import com.tourMate.dto.RestaurantDto;
-import com.tourMate.dto.RestaurantReservationDto;
-import com.tourMate.dto.RestaurantReservationUserDto;
 import com.tourMate.entities.*;
 
@@ -11,86 +9,46 @@
 public interface RestaurantManager {
     public void createRestaurant(Restaurant restaurant, long userId);
-
+    public void deleteRestaurant(long restaurantID);
     public void addMenuToRestaurant(long restaurantId, Menu menu);
-
     public List<Restaurant> getRestaurantsByUser(long userId);
-    public void deleteRestaurant(Long restaurantID);
-
-    void deleteRestaurant(long restaurantID);
+    void deleteHotel(long restaurantID);
 
     public List<Restaurant> getRestaurants();
-
-    public Restaurant findRestaurantByID(long restaurantID);
-
-    public void addRestaurantImage(Long restaurant, List<String> url);
-
+    public Restaurant findRestaurantByID (long restaurantID);
+    public void addRestaurantImage(Restaurant restaurant, String url);
     public void removeRestaurantImage(long restaurantImageId);
-
     public RestaurantImages findRestaurantImageById(long restaurantImageId);
 
     public List<RestaurantImages> getRestaurantImages(long restaurantID);
-
     public void editRestaurant(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, User restaurantOwner);
-
-    void editReservation(long restaurantsTableId, RestaurantsTable rt, Date hourFrom, Date hourTo, int noSeats, User user);
-
     public List<RestaurantsTable> getRestaurantTables(long restaurantID);
-
-    public List<RestaurantDto> getTablesByDateAndLocation(String restaurantLocation, Date date, String hourFrom, String hourTo, int noSeats);
-
+    public List<RestaurantDto> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats );
     public RestaurantsTable findTableById(long tableId);
-
     public void createTable(Long restaurantId, int noSeats);
-
     public void editTable(Restaurant restaurant, long tableId, int noSeats);
-
     public void deleteTable(long tableId);
 
-    public void createTableAvailable(Long rt, Date hourFrom, Date hourTo, int numTables);
+    public void createTableAvailable(Long rt, Date hourFrom, Date hourTo);
 
     public void editTableAvailable(long tableId, Restaurant restaurant, int noSeats);
-
     public void deleteTableAvailable(long tableId);
-
+    public List<RestaurantsTable> getTablesAvailability();
     public List<RestaurantsAvailible> getTablesAvailabilityById(Long id);
-
-    RestaurantsAvailible findAvailableReservationByID(long tableId);
+    public void createReservation(Restaurant restaurant, int noSeats);
 
     void createReservation(RestaurantsTable rt, Date dateFrom, Date dateTo, User user);
 
+    public void editReservation(long tableId, Restaurant restaurant, int noSeats);
     public void deleteReservation(long tableId);
+    public RestaurantReservations findReservationByID(long tableId);
+    public List<RestaurantReservations> findAvailableReservationByID();
 
-    public RestaurantReservations findReservationByID(long tableId);
-
-//    List<RestaurantReservations> findAvailableReservationByID(long reservationId);
+    List<RestaurantReservations> findAvailableReservationByID(long reservationId);
 
     public List<RestaurantReservations> findReservationByUser(User user);
-
-    public List<RestaurantReservationDto> findReservationByRestaurant(Long restaurant);
-
+    public List<RestaurantReservations> findReservationByRestaurant(Restaurant restaurant);
     public List<RestaurantReservations> getReservations();
-
     public List<Restaurant> searchByRestaurantName(String restaurantName);
-
     public List<Restaurant> searchByRestaurantLocation(String restaurantLocation);
-
     public List<RestaurantsTable> searchByNoSeats(int noSeats);
-
-    List<Reviews> getReviewsForRestaurant(Long restaurantId);
-
-    void createReservation(Long userId, Long restaurantTableId, Long restaurantAvailibleId, String hourFrom, String hourTo, Date date);
-
-    List<RestaurantReservationUserDto> findValidRestaurantReservationsByUser(Long userId);
-
-    List<RestaurantReservationUserDto> findPastRestaurantReservationsByUser(Long userId);
-
-    List<MenuImages> getMenuImages(Long id);
-
-    void addMenuImage(Long restaurant, List<String> url);
-
-    Menu findMenuById(Long menuId);
-
-    void setReservationReviewed(Long reservationId);
-
-    List<MenuImages> getMenuImagesByRestaurant(long restaurantId);
 }
Index: src/main/java/com/tourMate/services/ReviewManager.java
===================================================================
--- src/main/java/com/tourMate/services/ReviewManager.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/services/ReviewManager.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -9,5 +9,5 @@
 public interface ReviewManager{
 
-    public void createReview(String title, int numStar, String description, Long hotel, Long restaurant, Long transport, Long reservationId);
+    public void createReview(String title, int numStar, String description, Hotels hotel, Restaurant restaurant, Transport transport);
     public void deleteReview(long id);
     public Reviews findReviewById(long id);
Index: src/main/java/com/tourMate/services/TokenManager.java
===================================================================
--- src/main/java/com/tourMate/services/TokenManager.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/services/TokenManager.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -0,0 +1,9 @@
+package com.tourMate.services;
+
+import com.tourMate.entities.Token;
+
+public interface TokenManager {
+    public void saveToken(Token token);
+    public Token getToken(String token);
+    public void setConfirmedAt(String token);
+}
Index: src/main/java/com/tourMate/services/TransportManager.java
===================================================================
--- src/main/java/com/tourMate/services/TransportManager.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/services/TransportManager.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -4,5 +4,4 @@
 import com.tourMate.dto.TransportDto;
 import com.tourMate.dto.TransportListingDto;
-import com.tourMate.dto.TransportReservationUserDto;
 import com.tourMate.entities.*;
 
@@ -13,5 +12,5 @@
 public interface TransportManager {
 
-    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, Long userId, String carPlate);
+    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate);
 
     public void deleteTransport(long transportId);
@@ -23,12 +22,9 @@
     public TransportDto findTransportById (long transportId);
 
-    Transport getTransportById(Long transportId);
-
     public void editTransport(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate);
 
-    public void createTransportReservation(Long transportRouteId, Long userId, int noSeats);
+    public void createTransportReservation(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour);
+
     public TransportReservation findTransportReservationByID(long reservationID);
-
-    List<TransportReservation> findTransportReservationByTransportId(long reservationID);
 
     public List<TransportReservation> getTransportReservations();
@@ -37,7 +33,5 @@
     public Transport getTransportById(long transportId);
 
-    List<Reviews> getReviewsForTransport(long transportId);
-
-    public List<TransportListingDto> getTransportsAvailableByFilters (String from, String to, Date date, int numPassengers);
+    public List<TransportListingDto> getTransportsAvailableByFilters (String from, String to, Date date);
 
     public List<TransportReservation> getTransportsReservationsByUserID(long userID);
@@ -45,5 +39,8 @@
     public List<TransportAvailible> getTransportsAvailable();
 
-    public void createTransportAvailable(TransportAvailible transportAvailible, Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour, Long trnasportId, Collection<TransportRoute> routes);
+    public void createTransportAvailable(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour, Collection<TransportRoute> routes);
+
+    public void editTransportReservation(Transport transport, long reservationID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour);
+
     public void editTransportAvailable(Transport transport, long availableID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour);
 
@@ -59,9 +56,4 @@
 
 
-    List<TransportReservationUserDto> findValidTransportReservationsByUser(Long userId);
-
-    List<TransportReservationUserDto> findPastTransportReservationsByUser(Long userId);
-
-    void setReservationReviewed(Long reservationId);
 }
 
Index: src/main/java/com/tourMate/services/UsersManager.java
===================================================================
--- src/main/java/com/tourMate/services/UsersManager.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/services/UsersManager.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -1,5 +1,4 @@
 package com.tourMate.services;
 
-import com.tourMate.dto.PrincipalInfo;
 import com.tourMate.entities.User;
 
@@ -17,14 +16,3 @@
 
     public void editUser(long userID, String name, String surname, String email, Date birthDate, String address, String contact);
-    public List<User> getUnapprovedUsers();
-    public void approveUserProfile(long userId);
-
-    void unlock(Long id);
-
-    List<User> getAdmins();
-
-    void connectAccount(Long id, String username, String password);
-
-    List<User> findConnectedAccountsByUser(Long id);
-    PrincipalInfo getPrincipalInfo(Long userId);
 }
Index: src/main/java/com/tourMate/services/impl/BusinessManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/BusinessManagerImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/services/impl/BusinessManagerImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -2,10 +2,7 @@
 
 import com.tourMate.dao.BusinessDao;
-import com.tourMate.dao.UsersDao;
 import com.tourMate.entities.Business;
-import com.tourMate.entities.Role;
 import com.tourMate.entities.User;
 import com.tourMate.services.BusinessManager;
-import com.tourMate.services.UsersManager;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -19,54 +16,29 @@
     @Autowired
     BusinessDao businessDao;
-    @Autowired
-    UsersDao usersDao;
-    @Autowired
-    UsersManager usersManager;
 
     @Override
     public void createBusiness(Business business, long userId) {
-        User u = usersManager.findUserByID(userId);
-        business.setUser(u);
-        businessDao.createBusiness(business);
+        businessDao.createBusiness(business, userId);
     }
 
     @Override
     public List<Business> getUnapprovedBusinessesOfUser(long userId) {
-        User u = usersManager.findUserByID(userId);
-        return businessDao.getUnapprovedBusinessesOfUser(u);
+        return businessDao.getUnapprovedBusinessesOfUser(userId);
     }
 
     @Override
     public void deleteBusiness(long businessId) {
-        Business business = businessDao.findBusinessById(businessId);
-        businessDao.deleteBusiness(business);
+        businessDao.deleteBusiness(businessId);
 
     }
 
     @Override
-    public List<Business> getUnapprovedBusinesses() {
-        return businessDao.getUnapprovedBusinesses();
+    public boolean hasBusiness(long userId){
+        return businessDao.hasBusiness(userId);
     }
 
     @Override
-    public void approveBusiness(Long businessId) {
-        Business b = findBusinessById(businessId);
-        b.setApproved(true);
-        businessDao.approveBusiness(b);
-        changeUserRoleBusiness(b.getUser().getUserID());
-    }
-
-    private void changeUserRoleBusiness(Long userId)
-    {
-        User u = usersDao.findUserByID(userId);
-        Role r = usersDao.findById(3L);
-        u.setRole(r);
-        usersDao.updateUser(u);
-    }
-
-    @Override
-    public boolean hasBusiness(long userId){
-        User u = usersManager.findUserByID(userId);
-        return businessDao.hasBusiness(u);
+    public List<Business> getCreatedBusinesses() {
+        return businessDao.getCreatedBusinesses();
     }
 
@@ -78,12 +50,5 @@
     @Override
     public void editBusiness(long businessId, String name, String phone, String address, String edbs, User user, boolean approved) {
-        Business business = findBusinessById(businessId);
-        business.setName(name);
-        business.setPhone(phone);
-        business.setAddress(address);
-        business.setEdbs(edbs);
-        business.setUser(user);
-        business.setApproved(approved);
-        businessDao.editBusiness(business);
+        businessDao.editBusiness(businessId, name, phone, address, edbs, user, approved);
     }
 
Index: src/main/java/com/tourMate/services/impl/HotelManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/HotelManagerImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/services/impl/HotelManagerImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -4,14 +4,14 @@
 import com.tourMate.dao.UsersDao;
 import com.tourMate.dto.HotelDto;
-import com.tourMate.dto.HotelReservationDto;
-import com.tourMate.dto.HotelReservationUserDto;
 import com.tourMate.entities.*;
 import com.tourMate.services.HotelManager;
-import com.tourMate.services.UsersManager;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.time.Duration;
-import java.util.*;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
@@ -23,6 +23,5 @@
     @Autowired
     UsersDao usersDao;
-    @Autowired
-    UsersManager usersManager;
+
 
     @Override
@@ -33,7 +32,5 @@
     @Override
     public void createHotel(Hotels hotels, long userId) {
-        User u = usersManager.findUserByID(userId);
-        hotels.setOwner(u);
-        hotelDao.createHotel(hotels);
+        hotelDao.createHotel(hotels, userId);
     }
 
@@ -41,4 +38,5 @@
     @Override
     public List<Hotels> getHotels() {
+        List<Hotels> hoteli = hotelDao.getHotels();
         return hotelDao.getHotels();
     }
@@ -46,6 +44,5 @@
     @Override
     public List<Hotels> getHotelsForUser(long userId) {
-        User u = usersManager.findUserByID(userId);
-        return hotelDao.getHotelsForUser(u);
+        return hotelDao.getHotelsForUser(userId);
     }
 
@@ -57,19 +54,10 @@
     @Override
     public void editHotel(long hotelId, String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable) {
-        Hotels hotel = hotelDao.findHotelByID(hotelId);
-        hotel.setHotelName(hotelName);
-        hotel.setHotelDescripiton(hotelDescripiton);
-        hotel.setHotelLocation(hotelLocation);
-        hotel.setHotelEDBS(hotelEDBS);
-        hotel.setParking(parking);
-        hotel.setPetFriendly(petFriendly);
-        hotel.setInternetAvailable(internetAvailable);
-        hotelDao.editHotel(hotel);
+        hotelDao.editHotel(hotelId, hotelName, hotelDescripiton, hotelLocation, hotelEDBS, parking, petFriendly, internetAvailable);
     }
 
     @Override
     public void deleteHotel(long hotelId) {
-        Hotels h = findHotelByID(hotelId);
-        hotelDao.deleteHotel(h);
+        hotelDao.deleteHotel(hotelId);
     }
 
@@ -80,13 +68,11 @@
 
     @Override
-    public List<HotelsImages> getHotelImages(Long hotelId) {
-        Hotels h = hotelDao.findHotelByID(hotelId);
-        return hotelDao.getHotelImages(h);
+    public List<HotelsImages> getHotelImages(Hotels hotels) {
+        return hotelDao.getHotelImages(hotels);
     }
 
     @Override
     public List<HotelRoom> getRoomsOfHotel(long hotelId) {
-        Hotels h = findHotelByID(hotelId);
-        return hotelDao.getRoomsOfHotel(h);
+        return hotelDao.getRoomsOfHotel(hotelId);
     }
 
@@ -97,20 +83,17 @@
 
     @Override
-    public List<HotelRoomImages> getRoomImages(Long hotelRoom) {
-        HotelRoom hr = hotelDao.findRoomById(hotelRoom);
-        return hotelDao.getRoomImages(hr);
-    }
-
-    @Override
-    public void addHotelImage(Long hotel, List<String> url)
+    public List<HotelRoomImages> getRoomImages(HotelRoom hotelRoom) {
+        return hotelDao.getRoomImages(hotelRoom);
+    }
+
+    @Override
+    public void addHotelImage(Hotels hotel, String url)
     {
-        Hotels h = findHotelByID(hotel);
-        url.stream().map(file -> new HotelsImages(h, file)).forEach(x -> hotelDao.addHotelImage(x));
+        hotelDao.addHotelImage(hotel, url);
     }
 
     @Override
     public void deleteHotelImage(long hotelImageId){
-        HotelsImages hotelsImages = findHotelImageById(hotelImageId);
-        hotelDao.deleteHotelImage(hotelsImages);
+        hotelDao.deleteHotelImage(hotelImageId);
     }
 
@@ -121,56 +104,33 @@
 
     @Override
-    public void createRoom(Long hotelId, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds) {
-        Hotels hotel = findHotelByID(hotelId);
-        HotelRoom hotelRoom = new HotelRoom(hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price, numOfBeds);
-        hotelDao.createRoom(hotelRoom);
+    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
+        hotelDao.createRoom(hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price);
     }
 
     @Override
     public void editRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
-        HotelRoom hr = findRoomById(hotelRoomId);
-        hr.setHotel(hotel);
-        hr.setHotelRoomDescription(hotelRoomDescription);
-        hr.setHotelRoomName(hotelRoomName);
-        hr.setKitchenAvailable(kitchenAvailable);
-        hr.setAirConditioning(airConditioning);
-        hr.setBalcony(balcony);
-        hr.setPrice(price);
-        hotelDao.editRoom(hr);
+        hotelDao.editRoom(hotelRoomId, hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price);
     }
 
     @Override
     public void deleteRoom(long hotelRoomId) {
-        HotelRoom hr = findRoomById(hotelRoomId);
-        hotelDao.deleteRoom(hr);
-    }
-
-
-    @Override
-    public List<HotelRoomAvailable> getRoomsAvailableById(Long id) {
+        hotelDao.deleteRoom(hotelRoomId);
+    }
+
+    @Override
+    public List<HotelRoomAvailable> getRoomsAvailable(Long id) {
         return hotelDao.getRoomsAvailable(id);
     }
 
     @Override
-    public void createRoomAvailible(long hotelRoomId, Date dateFrom, Date dateTo, int numberOfBeds) {
-        HotelRoom hotelRoom = findRoomById(hotelRoomId);
-        HotelRoomAvailable hra = new HotelRoomAvailable(hotelRoom, dateFrom, dateTo, numberOfBeds);
-        hotelDao.createRoomAvailible(hra);
+    public void createRoomAvailible(HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds) {
+        hotelDao.createRoomAvailible(hotelRoom, dateFrom, dateTo, numberOfBeds);
     }
 
     @Override
     public void editRoomAvailible(long hotelRoomAvailableId, HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds) {
-        HotelRoomAvailable hr = findAvailibleRoomById(hotelRoomAvailableId);
-        hr.setHotelRoom(hotelRoom);
-        hr.setDateFrom(dateFrom);
-        hr.setDateTo(dateTo);
-        hr.setNumberOfBeds(numberOfBeds);
-        hotelDao.editRoomAvailible(hr);
-    }
-    //01-01-2024 - 30-01-2024
-    //05-01-2024 - 10-01-2024
-
-    //01-01 - 05-01
-    //10-01 - 30-01
+        hotelDao.editRoomAvailible(hotelRoomAvailableId, hotelRoom, dateFrom, dateTo, numberOfBeds);
+    }
+
     @Override
     public void editRoomAvailibleReservation(Long HotelRoomAvailableId, Long hotelRoomId, Date from, Date to, int numberOfBeds){
@@ -178,14 +138,11 @@
         roomAvailable.setNumberOfBeds(numberOfBeds-1);
         HotelRoom room = hotelDao.findRoomById(hotelRoomId);
-        HotelRoomAvailable hra = new HotelRoomAvailable(room,roomAvailable.getDateFrom(),from,1);
-        hotelDao.createRoomAvailible(hra);
-        HotelRoomAvailable hra1 = new HotelRoomAvailable(room,to,roomAvailable.getDateTo(),1);
-        hotelDao.createRoomAvailible(hra1);
+        hotelDao.createRoomAvailible(room, roomAvailable.getDateFrom(), from, 1);
+        hotelDao.createRoomAvailible(room, to, roomAvailable.getDateTo(), 1);
     }
 
     @Override
     public void deleteRoomAvailible(long hotelRoomAvailableId) {
-        HotelRoomAvailable hra = findAvailibleRoomById(hotelRoomAvailableId);
-        hotelDao.deleteRoomAvailible(hra);
+        hotelDao.deleteRoomAvailible(hotelRoomAvailableId);
     }
 
@@ -206,32 +163,7 @@
 
     @Override
-    public List<HotelRoomReservations> getReservationsInPeriod(String hotelLocation, Date dateFrom, Date dateTo)
-    {
-        return hotelDao.getReservationsInPeriod(hotelLocation, dateFrom, dateTo);
-    }
-
-    @Override
-    public List<HotelDto> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds, Boolean flexible) {
+    public List<HotelDto> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds) {
         long numberOfNights = Duration.between(dateFrom.toInstant(), dateTo.toInstant()).toDays();
-        List<Hotels> hotels = getHotelsByLocation(hotelLocation);
-        List<HotelRoomReservations> hotelRoomReservations = getReservationsInPeriod(hotelLocation, dateFrom, dateTo);
-        List<Hotels> hotelsWithReservations = hotelRoomReservations.stream().map(x -> x.getHotelRoom().getHotel()).toList();
-        List<Hotels> mostReservedHotels = hotelRoomReservations.stream()
-                .collect(Collectors.groupingBy(x -> x.getHotelRoom().getHotel(), Collectors.counting())).entrySet().stream()
-                .sorted(Map.Entry.comparingByValue(Comparator.reverseOrder()))
-                .limit(5)
-                .map(Map.Entry::getKey)
-                .toList();
-        List<Hotels> leastReservedHotels = hotelRoomReservations.stream()
-                .collect(Collectors.groupingBy(x -> x.getHotelRoom().getHotel(), Collectors.counting())).entrySet().stream()
-                .sorted(Map.Entry.comparingByValue())
-                .limit(5)
-                .map(Map.Entry::getKey)
-                .toList();
-        List<Hotels> hotelsWithoutReservations = hotels.stream().filter(x -> !hotelsWithReservations.contains(x)).toList();
-        List<Hotels> hotelsToBeMarketed = new ArrayList<>();
-        hotelsToBeMarketed.addAll(hotelsWithoutReservations);
-        hotelsToBeMarketed.addAll(leastReservedHotels);
-        List<HotelRoomAvailable> roomsAvailible = hotelDao.getRoomsAvailibilityByDateAndLocation(hotelLocation, dateFrom, dateTo, numberOfBeds, flexible);
+        List<HotelRoomAvailable> roomsAvailible = hotelDao.getRoomsAvailibilityByDateAndLocation(hotelLocation, dateFrom, dateTo, numberOfBeds);
         Map<Hotels, List<HotelRoomAvailable>> roomsByHotels = roomsAvailible.stream().collect(Collectors.groupingBy(x -> x.getHotelRoom().getHotel()));
         List<HotelDto> hotelsList = roomsByHotels.keySet().stream()
@@ -246,10 +178,5 @@
                         x.getInternetAvailable(),
                         roomsByHotels.get(x).stream().mapToDouble(y -> y.getHotelRoom().getPrice()).min().getAsDouble() * numberOfNights,
-                        roomsByHotels.get(x),
-                        getReviewsForHotel(x.getHotelId()),
-                        getReviewsForHotel(x.getHotelId()).stream().mapToDouble(Reviews::getNumStar).average().orElse(0),
-                        getHotelImages(x.getHotelId()),
-                        mostReservedHotels.contains(x),
-                        hotelsToBeMarketed.contains(x)
+                        roomsByHotels.get(x)
                 )).toList();
         return hotelsList;
@@ -258,66 +185,19 @@
 
     @Override
-    // TODO:Transactional
     public void createReservation(Long userId, Long hotelRoomId, Long hotelRoomAvailableId, Date dateFrom, Date dateTo, Integer numberOfBeds) {
         HotelRoom room = hotelDao.findRoomById(hotelRoomId);
         User user = usersDao.findUserByID(userId);
-        HotelRoomReservations r = new HotelRoomReservations(user, room, dateFrom, dateTo, numberOfBeds);
+        hotelDao.createReservation(user, room, dateFrom, dateTo, numberOfBeds);
         editRoomAvailibleReservation(hotelRoomAvailableId, hotelRoomId, dateFrom, dateTo, numberOfBeds);
-        hotelDao.createReservation(r);
-
     }
 
     @Override
     public void editReservation(long hotelRoomReservedId, User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds) {
-        HotelRoomReservations hr = findReservationById(hotelRoomReservedId);
-        hr.setUser(user);
-        hr.setHotelRoom(hotelRoom);
-        hr.setDateFrom(dateFrom);
-        hr.setDateTo(dateTo);
-        hr.setNumberOfBeds(numberOfBeds);
-        hotelDao.editReservation(hr);
-    }
-
+        hotelDao.editReservation(hotelRoomReservedId, user, hotelRoom, dateFrom, dateTo, numberOfBeds);
+    }
 
     @Override
     public void deleteReservation(long hotelRoomReservedId) {
-        HotelRoomReservations r = findReservationById(hotelRoomReservedId);
-        HotelRoomAvailable hra = new HotelRoomAvailable(r.getHotelRoom(), r.getDateFrom(), r.getDateTo(), r.getNumberOfBeds());
-        hotelDao.createRoomAvailible(hra);
-        hotelDao.deleteReservation(r);
-    }
-
-    @Override
-    public List<HotelReservationDto> findVaidReseravtionsByHotel(Long hotelId) {
-        Hotels hotel = findHotelByID(hotelId);
-        List<HotelRoomReservations> reservations = hotelDao.findReservationByHotel(hotel);
-        return reservations.stream()
-//                .filter(x -> x.getDateFrom().after(new Date()))
-                .map(x -> new HotelReservationDto(
-                        x.getUser(),
-                        x.getHotelRoom(),
-                        x.getDateFrom(),
-                        x.getDateTo(),
-                        x.getNumberOfBeds()
-                )).toList();
-    }
-
-    @Override
-    public List<HotelReservationUserDto> findValidHotelReservationsByUser(Long userId) {
-        User u = usersDao.findUserByID(userId);
-        List<HotelRoomReservations> reservations = hotelDao.findReservationByUser(u);
-        return reservations.stream().map(x -> new HotelReservationUserDto(
-                x.getHotelRoomReservedId(),
-                x.getUser(),
-                x.getHotelRoom(),
-                x.getDateFrom(),
-                x.getDateTo(),
-                x.getNumberOfBeds(),
-                x.getHotelRoom().getHotel().getHotelName(),
-                x.getHotelRoom().getHotel().getHotelLocation(),
-                "",
-                x.getHotelRoom().getHotel().getHotelId(),
-                x.getReviewed()
-        )).toList();
+        hotelDao.deleteReservation(hotelRoomReservedId);
     }
 
@@ -341,41 +221,3 @@
         return hotelDao.getReservations();
     }
-
-    @Override
-    public List<Reviews> getReviewsForHotel(Long hotelId) {
-        Hotels hotel = findHotelByID(hotelId);
-        return hotelDao.findReviewsByHotel(hotel);
-    }
-
-    @Override
-    public List<HotelReservationUserDto> findPastHotelReservationsByUser(Long id) {
-        User u = usersDao.findUserByID(id);
-        List<HotelRoomReservations> reservations = hotelDao.findPastReservationByUser(u);
-        return reservations.stream().map(x -> new HotelReservationUserDto(
-                x.getHotelRoomReservedId(),
-                x.getUser(),
-                x.getHotelRoom(),
-                x.getDateFrom(),
-                x.getDateTo(),
-                x.getNumberOfBeds(),
-                x.getHotelRoom().getHotel().getHotelName(),
-                x.getHotelRoom().getHotel().getHotelLocation(),
-                "",
-                x.getHotelRoom().getHotel().getHotelId(),
-                x.getReviewed()
-        )).toList();
-    }
-
-    @Override
-    public void addRoomImage(Long id, List<String> filesToAdd) {
-        HotelRoom hr = findRoomById(id);
-        filesToAdd.stream().map(file -> new HotelRoomImages(hr, file)).forEach(x -> hotelDao.addRoomImage(x));
-    }
-
-    @Override
-    public void setReservationReviewed(Long reservationId) {
-        HotelRoomReservations hotelRoomReservations = findReservationById(reservationId);
-        hotelRoomReservations.setReviewed(true);
-        hotelDao.saveReservation(hotelRoomReservations);
-    }
 }
Index: src/main/java/com/tourMate/services/impl/ImageManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/ImageManagerImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,65 +1,0 @@
-package com.tourMate.services.impl;
-
-import com.tourMate.controllers.ImageController;
-import com.tourMate.services.HotelManager;
-import com.tourMate.services.ImageManager;
-import com.tourMate.services.RestaurantManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.IOException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class ImageManagerImpl implements ImageManager {
-
-    @Autowired
-    HotelManager hotelManager;
-    @Autowired
-    RestaurantManager restaurantManager;
-    private static final Logger logger = LoggerFactory.getLogger(ImageController.class);
-    @Override
-    public List<String> uploadImages(List<MultipartFile> files, Long id, String type) {
-        List<String> filesToAdd = new ArrayList<>();
-        try
-        {
-            Path desktopPath = Paths.get(System.getProperty("user.home"), "Desktop\\images_tm");
-            for (MultipartFile file : files) {
-                Path filePath = desktopPath.resolve(file.getOriginalFilename());
-                System.out.println(filePath);
-                file.transferTo(filePath.toFile());
-                filesToAdd.add(filePath.toString());
-                logger.info(String.format("File name '%s' uploaded successfully.", file.getOriginalFilename()));
-            }
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-
-        if(type.equals("hotel"))
-        {
-            hotelManager.addHotelImage(id, filesToAdd);
-        }
-        else if(type.equals("restaurant"))
-        {
-            restaurantManager.addRestaurantImage(id, filesToAdd);
-        }
-        else if(type.equals("room"))
-        {
-            hotelManager.addRoomImage(id, filesToAdd);
-        }
-        else if(type.equals("menu"))
-        {
-            restaurantManager.addMenuImage(id, filesToAdd);
-        }
-
-        return filesToAdd;
-    }
-}
Index: src/main/java/com/tourMate/services/impl/MailingServiceImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/MailingServiceImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ 	(revision )
@@ -1,26 +1,0 @@
-package com.tourMate.services.impl;
-
-import com.tourMate.services.MailingService;
-import org.springframework.mail.SimpleMailMessage;
-import org.springframework.mail.javamail.JavaMailSender;
-import org.springframework.stereotype.Service;
-
-@Service
-public class MailingServiceImpl implements MailingService {
-
-    private final JavaMailSender emailSender;
-
-    public MailingServiceImpl(JavaMailSender emailSender) {
-        this.emailSender = emailSender;
-    }
-
-    @Override
-    public void sendMail(String to, String subject, String messageText) {
-        SimpleMailMessage mail = new SimpleMailMessage();
-        mail.setFrom("Trip2MK");
-        mail.setTo(to);
-        mail.setSubject(subject);
-        mail.setText(messageText);
-        emailSender.send(mail);
-    }
-}
Index: src/main/java/com/tourMate/services/impl/MenuManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/MenuManagerImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/services/impl/MenuManagerImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -17,11 +17,10 @@
     @Override
     public void createMenu(String name, String ingredients, double price) {
-        menuDao.createMenu(new Menu(name, ingredients, price));
+        menuDao.createMenu(name, ingredients, price);
     }
 
     @Override
     public void deleteMenu(long menuId) {
-        Menu menu = findMenuById(menuId);
-        menuDao.deleteMenu(menu);
+        menuDao.deleteMenu(menuId);
     }
 
@@ -38,9 +37,5 @@
     @Override
     public void editMenu(long menuId, String name, String ingredients, double price) {
-        Menu menu = findMenuById(menuId);
-        menu.setName(name);
-        menu.setIngredients(ingredients);
-        menu.setPrice(price);
-        menuDao.editMenu(menu);
+        menuDao.editMenu(menuId, name, ingredients, price);
     }
 }
Index: src/main/java/com/tourMate/services/impl/RestaurantManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/RestaurantManagerImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/services/impl/RestaurantManagerImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -3,9 +3,6 @@
 import com.tourMate.dao.RestaurantDao;
 import com.tourMate.dto.RestaurantDto;
-import com.tourMate.dto.RestaurantReservationDto;
-import com.tourMate.dto.RestaurantReservationUserDto;
 import com.tourMate.services.RestaurantManager;
 import com.tourMate.entities.*;
-import com.tourMate.services.UsersManager;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -21,37 +18,30 @@
     @Autowired
     RestaurantDao restaurantDao;
-    @Autowired
-    UsersManager usersManager;
 
     @Override
     public void createRestaurant(Restaurant restaurant, long userId) {
-        User u = usersManager.findUserByID(userId);
-        Restaurant r = new Restaurant(restaurant.getRestaurantName(), restaurant.getRestaurantLocation(), restaurant.getCousineType(), restaurant.getRestaurantDescription(), restaurant.getRestaurantEdbs(), u);
-        restaurantDao.createRestaurant(r);
-    }
-
-    @Override
-    public void deleteRestaurant(Long restaurantID) {
-        Restaurant r = findRestaurantByID(restaurantID);
-        restaurantDao.deleteRestaurant(r);
+        restaurantDao.createRestaurant(restaurant, userId);
+    }
+
+
+
+    @Override
+    public void deleteRestaurant(long restaurantID) {
+        restaurantDao.deleteRestaurant(restaurantID);
     }
 
     @Override
     public void addMenuToRestaurant(long restaurantId, Menu menu) {
-        Restaurant r = findRestaurantByID(restaurantId);
-        menu.setRestaurant(r);
-        restaurantDao.addMenuToRestaurant(menu);
+        restaurantDao.addMenuToRestaurant(restaurantId, menu);
     }
 
     @Override
     public List<Restaurant> getRestaurantsByUser(long userId) {
-        User u = usersManager.findUserByID(userId);
-        return restaurantDao.getRestaurantsByUser(u);
-    }
-
-    @Override
-    public void deleteRestaurant(long restaurantID) {
-        Restaurant r = findRestaurantByID(restaurantID);
-        restaurantDao.deleteRestaurant(r);
+        return restaurantDao.getRestaurantsByUser(userId);
+    }
+
+    @Override
+    public void deleteHotel(long restaurantID) {
+        restaurantDao.deleteRestaurant(restaurantID);
     }
 
@@ -67,13 +57,11 @@
 
     @Override
-    public void addRestaurantImage(Long restaurant, List<String> url) {
-        Restaurant r = restaurantDao.findRestaurantByID(restaurant);
-        url.stream().map(file -> new RestaurantImages(r, file)).forEach(x -> restaurantDao.addRestaurantImage(x));
+    public void addRestaurantImage(Restaurant restaurant, String url) {
+        restaurantDao.addRestaurantImage(restaurant, url);
     }
 
     @Override
     public void removeRestaurantImage(long restaurantImageId) {
-        RestaurantImages restaurantImage = findRestaurantImageById(restaurantImageId);
-        restaurantDao.removeRestaurantImage(restaurantImage);
+        restaurantDao.removeRestaurantImage(restaurantImageId);
     }
 
@@ -89,54 +77,13 @@
 
     @Override
-    public List<RestaurantDto> getTablesByDateAndLocation(String restaurantLocation, Date date, String hourFrom, String hourTo, int noSeats) {
-        Date dateFrom = date;
-        Date dateTo = Date.from(date.toInstant());
-        String[] splittedFrom = hourFrom.split(":");
-        String[] splittedTo = hourTo.split(":");
-        dateFrom.setHours(Integer.parseInt(splittedFrom[0]));
-        dateFrom.setMinutes(Integer.parseInt(splittedFrom[1]));
-        dateTo.setHours(Integer.parseInt(splittedTo[0]));
-        dateTo.setMinutes(Integer.parseInt(splittedTo[1]));
-        List<RestaurantsAvailible> restaurantsAvailibles = restaurantDao.getTablesByDateAndLocation(restaurantLocation, dateFrom, dateTo, noSeats);
-        Map<Restaurant, List<RestaurantsAvailible>> tablesByRestaurants = restaurantsAvailibles.stream().collect(Collectors.groupingBy(x -> x.getRestaurantTable().getRestaurant()));
-        List<RestaurantDto> restaurantsList = tablesByRestaurants.keySet().stream()
-                .map(x -> new RestaurantDto(
-                        x.getRestaurantID(),
-                        x.getRestaurantName(),
-                        x.getRestaurantLocation(),
-                        x.getCousineType(),
-                        x.getRestaurantDescription(),
-                        x.getRestaurantEdbs(),
-                        x.getMenus(),
-                        tablesByRestaurants.get(x),
-                        getReviewsForRestaurant(x.getRestaurantID()),
-                        getReviewsForRestaurant(x.getRestaurantID()).stream().mapToDouble(Reviews::getNumStar).average().orElse(0),
-                        getRestaurantImages(x.getRestaurantID()),
-                        getMenuImagesByRestaurant(x.getRestaurantID())
-                )).toList();
-        return restaurantsList;
+    public List<RestaurantDto> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats){
+        List<RestaurantsAvailible> restaurantsAvailibles = restaurantDao.getTablesByDateAndLocation(restaurantLocation, hourFrom, hourTo, noSeats);
+        Map<Restaurant, List<RestaurantsAvailible>> RestaurantsByAvailability = restaurantsAvailibles.stream().collect(Collectors.groupingBy(x -> x.getRestaurantTable().getRestaurant()));
+        return null;
     }
 
     @Override
     public void editRestaurant(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, User restaurantOwner) {
-        Restaurant res = findRestaurantByID(restaurantID);
-        res.setRestaurantName(restaurantName);
-        res.setRestaurantLocation(restaurantLocation);
-        res.setRestaurantEdbs(restaurantEdbs);
-        res.setRestaurantDescription(restaurantDescription);
-        res.setRestaurantOwner(restaurantOwner);
-        res.setCousineType(cousineType);
-        restaurantDao.createRestaurant(res);
-    }
-
-    @Override
-    public void editReservation(long restaurantsTableId, RestaurantsTable rt, Date hourFrom, Date hourTo, int noSeats, User user){
-        RestaurantReservations r = findReservationByID(restaurantsTableId);
-        r.setTable(rt);
-        r.setTimeFrom(hourFrom);
-        r.setTimeTo(hourTo);
-        r.setNoSeats(noSeats);
-        r.setUser(user);
-        restaurantDao.saveReservation(r);
+        restaurantDao.editRestaurant(restaurantID, restaurantName, restaurantLocation, cousineType, restaurantDescription, restaurantEdbs, restaurantOwner);
     }
 
@@ -154,31 +101,26 @@
     public void createTable(Long restaurantId, int noSeats) {
         Restaurant r = restaurantDao.findRestaurantByID(restaurantId);
-        RestaurantsTable restaurantsTable = new RestaurantsTable(r, noSeats);
-        restaurantDao.saveTable(restaurantsTable);
+        restaurantDao.createTable(r, noSeats);
     }
 
     @Override
     public void editTable(Restaurant restaurant, long tableId, int noSeats) {
-        RestaurantsTable resTable = findTableById(tableId);
-        resTable.setRestaurant(restaurant);
-        resTable.setNoSeats(noSeats);
-        restaurantDao.saveTable(resTable);
+        restaurantDao.editTable(restaurant, tableId, noSeats);
     }
 
     @Override
     public void deleteTable(long tableId) {
-        RestaurantsTable rt = findTableById(tableId);
-        restaurantDao.deleteTable(rt);
-    }
-
-    @Override
-    public void createTableAvailable(Long rt, Date hourFrom, Date hourTo, int numTables) {
+        restaurantDao.deleteTable(tableId);
+    }
+
+    @Override
+    public void createTableAvailable(Long rt, Date hourFrom, Date hourTo) {
         RestaurantsTable rtabl = findTableById(rt);
-        RestaurantsAvailible ra = new RestaurantsAvailible(rtabl, hourFrom, hourTo, numTables);
-        restaurantDao.saveTableAvailable(ra);
-    }
-
-    @Override
-    public List<RestaurantsAvailible> getTablesAvailabilityById(Long id) {
+        restaurantDao.createTableAvailable(rtabl, hourFrom, hourTo);
+    }
+
+    @Override
+    public List<RestaurantsAvailible> getTablesAvailabilityById(Long id)
+    {
         return restaurantDao.getTablesAvailabilityById(id);
     }
@@ -186,40 +128,52 @@
     @Override
     public void editTableAvailable(long tableId, Restaurant restaurant, int noSeats) {
-        RestaurantsTable rt = findTableById(tableId);
-        rt.setRestaurant(restaurant);
-        rt.setNoSeats(noSeats);
-        restaurantDao.saveTable(rt);
+        restaurantDao.editTableAvailable(tableId, restaurant, noSeats);
     }
 
     @Override
     public void deleteTableAvailable(long tableId) {
-        RestaurantsAvailible ra = findAvailableReservationByID(tableId);
-        restaurantDao.deleteTableAvailable(ra);
-    }
-
-    @Override
-    public RestaurantsAvailible findAvailableReservationByID(long tableId){
-        return restaurantDao.findAvailableReservationByID(tableId);
+        restaurantDao.deleteTableAvailable(tableId);
+    }
+
+    @Override
+    public List<RestaurantsTable> getTablesAvailability() {
+        return null;
+    }
+
+    @Override
+    public void createReservation(Restaurant restaurant, int noSeats) {
+
     }
 
     @Override
     public void createReservation(RestaurantsTable rt, Date dateFrom, Date dateTo, User user) {
-        RestaurantReservations restaurantReservations = new RestaurantReservations(rt, dateFrom, dateTo, rt.getNoSeats(), user);
-        restaurantDao.createReservation(restaurantReservations);
-    }
-
+        restaurantDao.createReservation(rt, dateFrom, dateTo, user);
+    }
+
+    @Override
+    public void editReservation(long tableId, Restaurant restaurant, int noSeats) {
+        //restaurantDao.editReservation(tableId, restaurant, noSeats);
+    }
 
     @Override
     public void deleteReservation(long tableId) {
-        RestaurantReservations r = findReservationByID(tableId);
-        RestaurantsAvailible ra = new RestaurantsAvailible(r.getTable(), r.getTimeFrom(), r.getTimeTo(), r.getNoSeats());
-        restaurantDao.saveTableAvailable(ra);
-        restaurantDao.deleteReservation(r);
+        restaurantDao.deleteReservation(tableId);
     }
 
     @Override
     public RestaurantReservations findReservationByID(long tableId) {
-        return restaurantDao.findReservationByID(tableId);
-        //return null;
+        //return restaurantDao.findReservationByID(tableId);
+        return null;
+    }
+
+    @Override
+    public List<RestaurantReservations> findAvailableReservationByID() {
+        return null;
+    }
+
+    @Override
+    public List<RestaurantReservations> findAvailableReservationByID(long reservationId) {
+        return null;
+        // return restaurantDao.findAvailableReservationByID(reservationId);
     }
 
@@ -230,13 +184,6 @@
 
     @Override
-    public List<RestaurantReservationDto> findReservationByRestaurant(Long restaurant) {
-        Restaurant r = findRestaurantByID(restaurant);
-        List<RestaurantReservations> res = restaurantDao.findReservationByRestaurant(r);
-        return res.stream().map(x -> new RestaurantReservationDto(
-                x.getUser(),
-                x.getTable(),
-                x.getTimeFrom(),
-                x.getTimeTo()
-        )).collect(Collectors.toList());
+    public List<RestaurantReservations> findReservationByRestaurant(Restaurant restaurant) {
+        return restaurantDao.findReservationByRestaurant(restaurant);
     }
 
@@ -260,103 +207,3 @@
         return restaurantDao.searchByNoSeats(noSeats);
     }
-
-    @Override
-    public List<Reviews> getReviewsForRestaurant(Long restaurantId) {
-        Restaurant restaurant = findRestaurantByID(restaurantId);
-        return restaurantDao.findReviewsByRestaurant(restaurant);
-    }
-
-    @Override
-    public void createReservation(Long userId, Long restaurantTableId, Long restaurantAvailibleId, String hourFrom, String hourTo, Date date) {
-        User u = usersManager.findUserByID(userId);
-        RestaurantsTable restaurantTable = restaurantDao.findTableById(restaurantTableId);
-        RestaurantsAvailible restaurantsAvailible = restaurantDao.findAvailableReservationByID(restaurantAvailibleId);
-        Date dateFrom = date;
-        Date dateTo = Date.from(date.toInstant());
-        String[] splittedFrom = hourFrom.split(":");
-        String[] splittedTo = hourTo.split(":");
-        dateFrom.setHours(Integer.parseInt(splittedFrom[0]));
-        dateFrom.setMinutes(Integer.parseInt(splittedFrom[1]));
-        dateTo.setHours(Integer.parseInt(splittedTo[0]));
-        dateTo.setMinutes(Integer.parseInt(splittedTo[1]));
-        RestaurantReservations reservation = new RestaurantReservations(restaurantTable, dateFrom, dateTo, restaurantTable.getNoSeats(), u);
-        restaurantDao.createReservation(reservation);
-        editTableAvailability(restaurantsAvailible, restaurantTable, dateFrom, dateTo);
-    }
-
-    public void editTableAvailability(RestaurantsAvailible restaurantsAvailible, RestaurantsTable table, Date dateFrom, Date dateTo) {
-        restaurantsAvailible.setNumTables(restaurantsAvailible.getNumTables() - 1);
-        RestaurantsAvailible ra1 = new RestaurantsAvailible(table, restaurantsAvailible.getHourFrom(), dateFrom, 1);
-        RestaurantsAvailible ra2 = new RestaurantsAvailible(table, dateTo, restaurantsAvailible.getHourTo(), 1);
-
-        restaurantDao.saveTableAvailable(ra1);
-        restaurantDao.saveTableAvailable(ra2);
-    }
-
-    @Override
-    public List<RestaurantReservationUserDto> findValidRestaurantReservationsByUser(Long userId) {
-        User u = usersManager.findUserByID(userId);
-        List<RestaurantReservations> reservations = restaurantDao.findReservationByUser(u);
-        return reservations.stream().map(x -> new RestaurantReservationUserDto(
-                x.getReservationId(),
-                x.getUser(),
-                x.getTable(),
-                x.getTimeFrom(),
-                x.getTimeTo(),
-                x.getNoSeats(),
-                x.getTable().getRestaurant().getRestaurantName(),
-                x.getTable().getRestaurant().getRestaurantLocation(),
-                "",
-                x.getTable().getRestaurant().getRestaurantID(),
-                x.getReviewed()
-        )).toList();
-    }
-
-    @Override
-    public List<RestaurantReservationUserDto> findPastRestaurantReservationsByUser(Long userId) {
-        User u = usersManager.findUserByID(userId);
-        List<RestaurantReservations> reservations = restaurantDao.findPastReservationsByUser(u);
-        return reservations.stream().map(x -> new RestaurantReservationUserDto(
-                x.getReservationId(),
-                x.getUser(),
-                x.getTable(),
-                x.getTimeFrom(),
-                x.getTimeTo(),
-                x.getNoSeats(),
-                x.getTable().getRestaurant().getRestaurantName(),
-                x.getTable().getRestaurant().getRestaurantLocation(),
-                "",
-                x.getTable().getRestaurant().getRestaurantID(),
-                x.getReviewed()
-        )).toList();
-    }
-
-    @Override
-    public List<MenuImages> getMenuImages(Long id) {
-        return restaurantDao.getMenuImages(id);
-    }
-
-    @Override
-    public void addMenuImage(Long menuId, List<String> url) {
-        Menu r = restaurantDao.findMenuId(menuId);
-        url.stream().map(file -> new MenuImages(r, file)).forEach(x -> restaurantDao.addMenuImage(x));
-    }
-
-    @Override
-    public Menu findMenuById(Long menuId) {
-        return restaurantDao.findMenuId(menuId);
-    }
-
-    @Override
-    public void setReservationReviewed(Long reservationId) {
-        RestaurantReservations restaurantReservations = findReservationByID(reservationId);
-        restaurantReservations.setReviewed(true);
-        restaurantDao.saveReservation(restaurantReservations);
-    }
-
-    @Override
-    public List<MenuImages> getMenuImagesByRestaurant(long restaurantId) {
-        Restaurant r = findRestaurantByID(restaurantId);
-        return restaurantDao.getMenuImagesByRestaurant(r);
-    }
 }
Index: src/main/java/com/tourMate/services/impl/ReviewManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/ReviewManagerImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/services/impl/ReviewManagerImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -3,8 +3,8 @@
 import com.tourMate.dao.ReviewDao;
 import com.tourMate.dao.ReviewManager;
-import com.tourMate.entities.*;
-import com.tourMate.services.HotelManager;
-import com.tourMate.services.RestaurantManager;
-import com.tourMate.services.TransportManager;
+import com.tourMate.entities.Hotels;
+import com.tourMate.entities.Restaurant;
+import com.tourMate.entities.Reviews;
+import com.tourMate.entities.Transport;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -18,39 +18,12 @@
     ReviewDao reviewDao;
 
-    @Autowired
-    HotelManager hotelManager;
-    @Autowired
-    TransportManager transportManager;
-    @Autowired
-    RestaurantManager restaurantManager;
-
     @Override
-    public void createReview(String title, int numStar, String description, Long hotel, Long restaurant, Long transport, Long reservationId) {
-        Hotels h = null;
-        Restaurant r = null;
-        Transport t = null;
-        if(hotel != null)
-        {
-            h = hotelManager.findHotelByID(hotel);
-            hotelManager.setReservationReviewed(reservationId);
-        }
-        if(restaurant != null)
-        {
-            r = restaurantManager.findRestaurantByID(restaurant);
-            restaurantManager.setReservationReviewed(reservationId);
-        }
-        if(transport != null)
-        {
-            t = transportManager.getTransportById(transport);
-            transportManager.setReservationReviewed(reservationId);
-        }
-        Reviews review = new Reviews (title, numStar, description, h, r, t);
-        reviewDao.createReview(review);
+    public void createReview(String title, int numStar, String description, Hotels hotel, Restaurant restaurant, Transport transport) {
+        reviewDao.createReview(title, description, numStar, hotel, restaurant, transport);
     }
 
     @Override
     public void deleteReview(long id) {
-        Reviews review = findReviewById(id);
-        reviewDao.deleteReview(review);
+        reviewDao.deleteReview(id);
     }
 
@@ -62,12 +35,5 @@
     @Override
     public void editReview(long id, String title, String description, int numStar, Hotels hotel, Restaurant restaurant, Transport transport) {
-        Reviews review = findReviewById(id);
-        review.setDescription(description);
-        review.setHotel(hotel);
-        review.setRestaurant(restaurant);
-        review.setTitle(title);
-        review.setNumStar(numStar);
-        review.setTransport(transport);
-        reviewDao.editReview(review);
+        reviewDao.editReview(id, title, description, numStar, hotel, restaurant, transport);
     }
 
Index: src/main/java/com/tourMate/services/impl/TokenManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/TokenManagerImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/services/impl/TokenManagerImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -0,0 +1,31 @@
+package com.tourMate.services.impl;
+
+import com.tourMate.dao.TokenDao;
+import com.tourMate.entities.Token;
+import com.tourMate.services.TokenManager;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+
+@Service
+public class TokenManagerImpl implements TokenManager {
+    @Autowired
+    TokenDao tokenDao;
+
+
+    @Override
+    public void saveToken(Token token) {
+        tokenDao.saveToken(token);
+    }
+
+    @Override
+    public Token getToken(String token) {
+        return tokenDao.getToken(token);
+    }
+    
+    @Override
+    public void setConfirmedAt(String token) {
+        tokenDao.setConfirmedAt(token, LocalDateTime.now());
+    }
+}
Index: src/main/java/com/tourMate/services/impl/TransportManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/TransportManagerImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/services/impl/TransportManagerImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -3,8 +3,9 @@
 
 import com.tourMate.dao.TransportDao;
-import com.tourMate.dto.*;
+import com.tourMate.dto.RouteListingDto;
+import com.tourMate.dto.TransportDto;
+import com.tourMate.dto.TransportListingDto;
 import com.tourMate.entities.*;
 import com.tourMate.services.TransportManager;
-import com.tourMate.services.UsersManager;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -15,4 +16,5 @@
 import java.util.Map;
 import java.util.stream.Collectors;
+import java.util.stream.DoubleStream;
 
 @Service
@@ -21,157 +23,56 @@
     TransportDao transportDao;
 
-    @Autowired
-    UsersManager usersManager;
-
-
     @Override
-    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, Long userId, String carPlate) {
-        User u = usersManager.findUserByID(userId);
-        Transport t=new Transport(transportName,carBrand,carType,carManufacturedYear,noPassengers,noBags,EMBG,u,carPlate);
-        transportDao.createTransport(t);
+    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate) {
+        transportDao.createTransport(transportName, carBrand, carType, carManufacturedYear, noPassengers, noBags, EMBG, owner, carPlate);
     }
 
     @Override
     public void deleteTransport(long transportId) {
-        Transport t=getTransportById(transportId);
-        transportDao.deleteTransport(t);
+        transportDao.deleteTransport(transportId);
     }
 
     @Override
     public List<Transport> getTransports() {
-        return transportDao.getTransports();
+       return transportDao.getTransports();
     }
 
     @Override
     public List<TransportDto> getTransportsByUser(long userId) {
-        User u = usersManager.findUserByID(userId);
-        List<Transport> transports = transportDao.getTransportsByUser(u);
-        return transports.stream().map(x -> new TransportDto(
-                x.getTransportID(),
-                x.getTransportName(),
-                x.getCarBrand(),
-                x.getCarType(),
-                x.getCarManufacturedYear(),
-                x.getNoPassengers(),
-                x.getNoBags(),
-                x.getEMBG(),
-                x.getOwner(),
-                x.getCarPlate(),
-                x.getAvailableRoutes().stream().map(y -> new RouteListingDto(
-                        y.getTransportAvailibleId(),
-                        y.getFrom(),
-                        y.getTo(),
-                        y.getDate(),
-                        y.getFreeSpace(),
-                        y.getTime(),
-                        y.getRoutes(),
-                        y.getRoutes().stream()
-                                .mapToDouble(TransportRoute::getPrice)
-                                .max().orElse(0)
-                )).toList(),
-                x.getAvailableRoutes().stream()
-                        .flatMapToDouble(y -> y.getRoutes()
-                                .stream()
-                                .mapToDouble(TransportRoute::getPrice)).max().orElseGet(() -> 0)
-        )).toList();
+        return transportDao.getTransportsByUser(userId);
     }
 
     @Override
     public List<RouteListingDto> getRoutesForTransport(long transportId) {
-        Transport t = getTransportById(transportId);
-        List<TransportAvailible> transportAvailibles = transportDao.getRoutesForTransport(t);
-        return transportAvailibles.stream().map(x -> new RouteListingDto(
-                x.getTransportAvailibleId(),
-                x.getFrom(),
-                x.getTo(),
-                x.getDate(),
-                x.getFreeSpace(),
-                x.getTime(),
-                x.getRoutes(),
-                x.getRoutes().stream()
-                        .mapToDouble(TransportRoute::getPrice)
-                        .max().orElse(0)
-        )).toList();
+        return transportDao.getRoutesForTransport(transportId);
     }
 
     @Override
     public TransportDto findTransportById(long transportId) {
-        Transport x = transportDao.findTransportById(transportId);
-        return new TransportDto(
-                x.getTransportID(),
-                x.getTransportName(),
-                x.getCarBrand(),
-                x.getCarType(),
-                x.getCarManufacturedYear(),
-                x.getNoPassengers(),
-                x.getNoBags(),
-                x.getEMBG(),
-                x.getOwner(),
-                x.getCarPlate(),
-                x.getAvailableRoutes().stream().map(y -> new RouteListingDto(
-                        y.getTransportAvailibleId(),
-                        y.getFrom(),
-                        y.getTo(),
-                        y.getDate(),
-                        y.getFreeSpace(),
-                        y.getTime(),
-                        y.getRoutes(),
-                        y.getRoutes().stream()
-                                .mapToDouble(TransportRoute::getPrice)
-                                .max().orElse(0)
-                )).toList(),
-                x.getAvailableRoutes().stream()
-                        .flatMapToDouble(y -> y.getRoutes()
-                                .stream()
-                                .mapToDouble(TransportRoute::getPrice)).max().orElseGet(() -> 0));
-    }
-
-    @Override
-    public Transport getTransportById(Long transportId) {
-        return transportDao.getTransportById(transportId);
+        return transportDao.findTransportById(transportId);
     }
 
     @Override
     public void editTransport(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate) {
-        Transport t=getTransportById(transportID);
-        t.setTransportName(transportName);
-        t.setCarBrand(carBrand);
-        t.setCarType(carType);
-        t.setCarManufacturedYear(carManufacturedYear);
-        t.setNoPassengers(noPassengers);
-        t.setNoBags(noBags);
-        t.setEMBG(EMBG);
-        t.setOwner(owner);
-        t.setCarPlate(carPlate);
-        transportDao.editTransport(t);
+        transportDao.editTransport(transportID, transportName, carBrand, carType, carManufacturedYear, noPassengers, noBags, EMBG, owner, carPlate);
     }
 
     @Override
-    public void createTransportReservation(Long transportRouteId, Long userId, int noSeats) {
-        TransportRoute transportRoute = transportDao.findTransportRouteById(transportRouteId);
-        User u = usersManager.findUserByID(userId);
-        TransportReservation transportReservation = new TransportReservation(transportRoute, noSeats, u);
-        transportDao.createTransportReservation(transportReservation);
+    public void createTransportReservation(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour) {
+        transportDao.createTransportReservation(transport, departureLocation, arrivalLocation, date, noSeats, user, departureHour);
     }
 
     @Override
     public TransportReservation findTransportReservationByID(long reservationID) {
-        return transportDao.findTransportReservationByID(reservationID);
-    }
-
-    @Override
-    public List<TransportReservation> findTransportReservationByTransportId(long reservationID) {
-        Transport t = getTransportById(reservationID);
-        return transportDao.findTransportReservationByTransportId(t);
+       return transportDao.findTransportReservationByID(reservationID);
     }
 
     @Override
     public List<TransportReservation> getTransportReservations() {
-        return transportDao.getTransportReservations();
+      return  transportDao.getTransportReservations();
     }
 
     @Override
-    public TransportAvailible findTransportAvailableByID(long reservationID) {
-        return transportDao.findTransportAvailableByID(reservationID);
+    public TransportAvailible findTransportAvailableByID(long reservationID) {return transportDao.findTransportAvailableByID(reservationID);
     }
 
@@ -182,27 +83,19 @@
 
     @Override
-    public List<Reviews> getReviewsForTransport(long transportId) {
-        Transport transport = getTransportById(transportId);
-        return transportDao.getReviewsForTransport(transport);
-    }
-
-    @Override
-    public List<TransportListingDto> getTransportsAvailableByFilters(String from, String to, Date date, int numPassengers) {
-        List<TransportRoute> transportAvailable = transportDao.getTransportsAvailableByFilters(from, to, date, numPassengers);
+    public List<TransportListingDto> getTransportsAvailableByFilters(String from, String to, Date date) {
+        List<TransportRoute> transportAvailable = transportDao.getTransportsAvailableByFilters(from, to, date);
         Map<TransportAvailible, List<TransportRoute>> transportsByTransporter = transportAvailable.stream().collect(Collectors.groupingBy(x -> x.getParentRoute()));
         List<TransportListingDto> transportList = transportsByTransporter.keySet().stream().toList().stream()
                 .map(x -> new TransportListingDto(
-                        x.getTransportAvailibleId(),
-                        x.getFrom(),
-                        x.getTo(),
-                        x.getDate(),
-                        x.getFreeSpace(),
-                        x.getTime(),
-                        transportsByTransporter.get(x).stream().mapToDouble(y -> y.getPrice()).min().getAsDouble(),
-                        x.getRoutes(),
-                        x.getTransport(),
-                        getReviewsForTransport(x.getTransport().getTransportID()),
-                        getReviewsForTransport(x.getTransport().getTransportID()).stream().mapToDouble(Reviews::getNumStar).average().orElse(0)
-                )).collect(Collectors.toList());
+                            x.getTransportAvailibleId(),
+                            x.getFrom(),
+                            x.getTo(),
+                            x.getDate(),
+                            x.getFreeSpace(),
+                            x.getTime(),
+                            transportsByTransporter.get(x).stream().mapToDouble(y -> y.getPrice()).min().getAsDouble(),
+                            x.getRoutes(),
+                            x.getTransport()
+                    )).collect(Collectors.toList());
         return transportList;
     }
@@ -219,110 +112,43 @@
 
     @Override
-    public void createTransportAvailable(TransportAvailible transportAvailible, Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour, Long transportId, Collection<TransportRoute> trRoutes) {
-        Transport t = getTransportById(transportId);
-        List<TransportRoute> routes = trRoutes.stream().toList();
-        routes.get(0).setDeparture(transportAvailible.getDate());
-        transportAvailible.setTime(routes.get(routes.size() - 1).getArrival());
-        routes.forEach(x -> x.setParentRoute(transportAvailible));
-        transportAvailible.setTransport(t);
-        TransportAvailible ta=new TransportAvailible(t,departureLocation,arrivalLocation,date,noSeats,departureHour);
-        transportDao.createTransportAvailable(ta);
-        routes.forEach(x -> {
-            TransportRoute tr = new TransportRoute(ta, x.getFrom(), x.getTo(), x.getPrice(), x.getDeparture(), x.getArrival(), x.getFreeSpace(), x.getOrder());
-            transportDao.createTransportRoute(tr);
-        });
+    public void createTransportAvailable(Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour, Collection<TransportRoute> routes) {
+        transportDao.createTransportAvailable(transport, departureLocation, arrivalLocation, date, noSeats, departureHour, routes);
+    }
+
+    @Override
+    public void editTransportReservation(Transport transport, long reservationID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, User user, Date departureHour) {
+        transportDao.editTransportReservation(transport, reservationID, departureLocation, arrivalLocation, date, noSeats, user, departureHour);
     }
 
     @Override
     public void editTransportAvailable(Transport transport, long availableID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour) {
-        TransportAvailible ta=findTransportAvailableByID(availableID);
-        ta.setTransport(transport);
-        ta.setFrom(departureLocation);
-        ta.setTo(arrivalLocation);
-        ta.setDate(date);
-        ta.setFreeSpace(noSeats);
-        ta.setTime(departureHour);
-        transportDao.editTransportAvailable(ta);
+        transportDao.editTransportAvailable(transport, availableID, departureLocation, arrivalLocation, date, noSeats, departureHour);
     }
 
     @Override
     public void deleteTransportReservation(long reservationID) {
-        TransportReservation tr=findTransportReservationByID(reservationID);
-        transportDao.deleteTransportReservation(tr);
+        transportDao.deleteTransportReservation(reservationID);
     }
 
     @Override
     public void deleteTransportAvailable(long availableID) {
-        TransportAvailible ta=findTransportAvailableByID(availableID);
-        transportDao.deleteTransportAvailable(ta);
+        transportDao.deleteTransportAvailable(availableID);
     }
 
     @Override
-    public void createTransportRoute(TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order) {
-        TransportRoute tr = new TransportRoute(parentRoute, from, to, price, departure, arrival, freeSpace, order);
-
-        transportDao.createTransportRoute(tr);
+    public void createTransportRoute(TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order){
+        transportDao.createTransportRoute(parentRoute, from, to, price, departure, arrival, freeSpace, order);
     }
 
     @Override
-    public void deleteTransportRoute(long transportRouteId) {
-        TransportRoute tr = transportDao.findTransportRouteById(transportRouteId);
-        transportDao.deleteTransportRoute(tr);
+    public void deleteTransportRoute(long transportRouteId){
+        transportDao.deleteTransportRoute(transportRouteId);
     }
 
     @Override
-    public void editTransportRoute(long transportRouteId, TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order) {
-        TransportRoute tr = transportDao.findTransportRouteById(transportRouteId);
-        tr.setParentRoute(parentRoute);
-        tr.setFrom(from);
-        tr.setTo(to);
-        tr.setPrice(price);
-        tr.setDeparture(departure);
-        tr.setArrival(arrival);
-        tr.setFreeSpace(freeSpace);
-        tr.setOrder(order);
-        transportDao.editTransportRoute(tr);
+    public void editTransportRoute(long transportRouteId, TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order){
+        transportDao.editTransportRoute(transportRouteId, parentRoute, from, to, price, departure, arrival, freeSpace, order);
     }
 
-    @Override
-    public List<TransportReservationUserDto> findValidTransportReservationsByUser(Long userId) {
-        User u = usersManager.findUserByID(userId);
-        List<TransportReservation> reservations = transportDao.findReservationByUser(u);
-        return reservations.stream().map(x -> new TransportReservationUserDto(
-                x.getReservationID(),
-                x.getUser(),
-                x.getTransportRoute(),
-                x.getTransportRoute().getParentRoute().getTransport().getTransportID(),
-                x.getNoSeats(),
-                x.getTransportRoute().getParentRoute().getTransport().getCarBrand(),
-                x.getTransportRoute().getParentRoute().getTransport().getCarType(),
-                x.getTransportRoute().getParentRoute().getTransport().getOwner(),
-                x.getReviewed()
-        )).toList();
-    }
-
-    @Override
-    public List<TransportReservationUserDto> findPastTransportReservationsByUser(Long userId) {
-        User u = usersManager.findUserByID(userId);
-        List<TransportReservation> reservations = transportDao.findPastReservationByUser(u);
-        return reservations.stream().map(x -> new TransportReservationUserDto(
-                x.getReservationID(),
-                x.getUser(),
-                x.getTransportRoute(),
-                x.getTransportRoute().getParentRoute().getTransport().getTransportID(),
-                x.getNoSeats(),
-                x.getTransportRoute().getParentRoute().getTransport().getCarBrand(),
-                x.getTransportRoute().getParentRoute().getTransport().getCarType(),
-                x.getTransportRoute().getParentRoute().getTransport().getOwner(),
-                x.getReviewed()
-        )).toList();
-    }
-
-    @Override
-    public void setReservationReviewed(Long reservationId) {
-        TransportReservation transportReservation = findTransportReservationByID(reservationId);
-        transportReservation.setReviewed(true);
-        transportDao.saveReservation(transportReservation);
-    }
 
 }
Index: src/main/java/com/tourMate/services/impl/UsersManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/UsersManagerImpl.java	(revision efaa05348a3e0dac884385ba4dd765baaeb47ec6)
+++ src/main/java/com/tourMate/services/impl/UsersManagerImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
@@ -2,14 +2,10 @@
 
 import com.tourMate.dao.UsersDao;
-import com.tourMate.dto.PrincipalInfo;
 import com.tourMate.entities.User;
-import com.tourMate.events.OnProfileEnabledEvent;
 import com.tourMate.services.UsersManager;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationEventPublisher;
 import org.springframework.security.core.userdetails.UserDetails;
 import org.springframework.security.core.userdetails.UserDetailsService;
 import org.springframework.security.core.userdetails.UsernameNotFoundException;
-import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.stereotype.Service;
 
@@ -22,8 +18,5 @@
     @Autowired
     UsersDao usersDao;
-    @Autowired
-    ApplicationEventPublisher eventPublisher;
-    @Autowired
-    PasswordEncoder passwordEncoder;
+
     @Override
     public void createUser(String name, String surname, String email, Date birthDate, String address, String contact) {
@@ -52,58 +45,4 @@
 
     @Override
-    public List<User> getUnapprovedUsers() {
-        return usersDao.getUnapprovedUsers();
-    }
-
-    @Override
-    public void approveUserProfile(long userId) {
-        User u = findUserByID(userId);
-        usersDao.approveUserProfile(u);
-    }
-
-    @Override
-    public void unlock(Long id) {
-        User u = findUserByID(id);
-        u.setLocked(!u.isLocked());
-        u.setEnabled(true);
-        usersDao.updateUser(u);
-    }
-
-    @Override
-    public List<User> getAdmins() {
-        return usersDao.getAdmins();
-    }
-
-    @Override
-    public void connectAccount(Long id, String username, String password) {
-        User u1 = findUserByID(id);
-        User u2 = (User) loadUserByUsername(username);
-        if(passwordEncoder.matches(password, u2.getPassword()))
-        {
-            u1.addConnectedUser(u2);
-        }
-        usersDao.updateUser(u1);
-    }
-
-    @Override
-    public List<User> findConnectedAccountsByUser(Long id) {
-        User u = findUserByID(id);
-        return usersDao.findConnectedAccountsByUser(u);
-    }
-
-    @Override
-    public PrincipalInfo getPrincipalInfo(Long userId) {
-        PrincipalInfo principalInfo = new PrincipalInfo();
-        User u = findUserByID(userId);
-        principalInfo.setUsername(u.getUsername());
-        principalInfo.setRole(u.getRole().getRoleName());
-        principalInfo.setId(userId);
-        principalInfo.setName(u.getName());
-        principalInfo.setEmail(u.getEmail());
-        principalInfo.setSurname(u.getSurname());
-        return principalInfo;
-    }
-
-    @Override
     public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
         return usersDao.findUserByUsername(username);
