Index: src/main/java/com/tourMate/ServletInitializer.java
===================================================================
--- src/main/java/com/tourMate/ServletInitializer.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/ServletInitializer.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,18 @@
+package com.tourMate;
+
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+public class ServletInitializer extends SpringBootServletInitializer {
+
+	@Override
+	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
+		return application.sources(TourMateApplication.class);
+	}
+
+}
+
Index: src/main/java/com/tourMate/TourMateApplication.java
===================================================================
--- src/main/java/com/tourMate/TourMateApplication.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/TourMateApplication.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,15 @@
+package com.tourMate;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+@SpringBootApplication
+@EnableTransactionManagement
+public class TourMateApplication {
+
+	public static void main(String[] args) {
+		SpringApplication.run(TourMateApplication.class, args);
+	}
+
+}
Index: src/main/java/com/tourMate/config/SecurityConfig.java
===================================================================
--- src/main/java/com/tourMate/config/SecurityConfig.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/config/SecurityConfig.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,109 @@
+package com.tourMate.config;
+
+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.UsernamePasswordAuthenticationFilter;
+import org.springframework.security.web.authentication.logout.HttpStatusReturningLogoutSuccessHandler;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+import org.springframework.web.filter.CorsFilter;
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
+import java.util.Arrays;
+
+import static org.springframework.security.config.Customizer.withDefaults;
+
+@Configuration
+@EnableWebSecurity
+public class SecurityConfig {
+
+    @Bean
+    public CorsConfiguration corsConfiguration() {
+        CorsConfiguration config = new CorsConfiguration();
+        config.setAllowCredentials(true);
+        config.addAllowedOrigin("http://localhost:3000");
+        config.addAllowedHeader("*");
+        config.setAllowedMethods(Arrays.asList(
+                HttpMethod.POST.name(),
+                HttpMethod.GET.name(),
+                HttpMethod.DELETE.name(),
+                HttpMethod.PUT.name()
+        ));
+        config.setMaxAge(3600L);
+        return config;
+    }
+
+
+    @Bean
+    public FilterRegistrationBean<CorsFilter> corsFilter() {
+        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+        source.registerCorsConfiguration("/**", corsConfiguration());
+        FilterRegistrationBean<CorsFilter> bean = new FilterRegistrationBean<>(new CorsFilter(source));
+        bean.setOrder(-102);
+        return bean;
+    }
+    @Bean
+    public PasswordEncoder passwordEncoder() {
+        return new BCryptPasswordEncoder();
+    }
+
+    @Bean
+    public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
+        http
+                .csrf().disable()
+                .authorizeHttpRequests((authz) -> {
+                            try {
+                                authz
+                                        .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/*")).hasAnyAuthority("SUPERADMIN")
+                                        .anyRequest().authenticated()
+                                        .and()
+                                        .formLogin()
+                                        .loginProcessingUrl("/api/login").usernameParameter("username").passwordParameter("password")
+                                        .successHandler((request, response, authentication) -> {
+                                            response.setStatus(HttpServletResponse.SC_OK);
+                                            response.setCharacterEncoding("UTF-8");
+                                            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.sendRedirect("/login");
+                                            response.getWriter().print("Neuspesna najava\n" + exception.getMessage());
+                                            response.getWriter().flush();
+                                        })
+                                        .permitAll()
+                                        .and()
+                                        .sessionManagement()
+                                        .sessionCreationPolicy(SessionCreationPolicy.ALWAYS)
+                                        .and()
+                                        .logout().logoutSuccessHandler((new HttpStatusReturningLogoutSuccessHandler(HttpStatus.OK)))
+                                        .permitAll();
+
+                            } catch (Exception e) {
+                                throw new RuntimeException(e);
+                            }
+                        }
+                ).httpBasic();
+        return http.build();
+    }
+}
Index: src/main/java/com/tourMate/controllers/HotelController.java
===================================================================
--- src/main/java/com/tourMate/controllers/HotelController.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/controllers/HotelController.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,240 @@
+package com.tourMate.controllers;
+
+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 org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+import java.util.List;
+
+@CrossOrigin(origins = "http://localhost:3000")
+@RestController
+public class HotelController {
+
+    @Autowired
+    HotelManager hotelManager;
+
+    //HOTEL CRUD
+    @PostMapping(path = "/hotel/add")
+    public void add(@RequestBody Hotels hotel, @RequestParam(name = "userId") long userId) {
+        hotelManager.createHotel(hotel, userId);
+    }
+
+
+    @GetMapping(path = "/hotel")
+    public ResponseEntity<List<com.tourMate.entities.Hotels>> showHotels() {
+        try {
+            List<Hotels> hoteli = hotelManager.getHotels();
+            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);
+        }
+    }
+
+    @GetMapping(path = "/hotel/user/{id}")
+    public ResponseEntity<List<Hotels>> getHotelsForUser (@PathVariable(name = "id") long userId)
+    {
+        try {
+
+            List<Hotels> hoteli = hotelManager.getHotelsForUser(userId);
+            return ResponseEntity.ok(hoteli);
+        } catch (Exception e) {
+            return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+        }
+    }
+
+    @GetMapping(path = "/hotel/list/{id}")
+    public ResponseEntity<Hotels> getHotelById (@PathVariable(name = "id") long hotelId)
+    {
+        try {
+
+            return ResponseEntity.ok(hotelManager.findHotelByID(hotelId));
+        } catch (Exception e) {
+            return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+        }
+    }
+
+
+    @PostMapping(path = "/hotel/edit")
+    public void edit(@RequestBody Hotels hotel)
+    {
+        hotelManager.editHotel(hotel.getHotelId(), hotel.getHotelName(), hotel.getHotelDescripiton(), hotel.getHotelLocation(), hotel.getHotelEDBS(), hotel.getParking(), hotel.getPetFriendly(), hotel.getInternetAvailable());
+    }
+
+    @GetMapping(path = "/hotel/delete")
+    public ResponseEntity remove(@RequestParam(name = "hotelId") long hotelId) {
+        try
+        {
+            hotelManager.deleteHotel(hotelId);
+            return new ResponseEntity(HttpStatus.OK);
+        }
+        catch (Exception exception)
+        {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+    }
+
+
+
+    @GetMapping(path = "/hotel/images/delete")
+    public ResponseEntity removeHotelImage(@RequestParam(name = "hotelId") long hotelId) {
+        try {
+            hotelManager.deleteHotelImage(hotelId);
+            return new ResponseEntity(HttpStatus.OK);
+        }
+        catch (Exception exception) {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+    }
+
+    @GetMapping(path = "/hotel/{id}/room")
+    public List<HotelRoom> getHotelRooms(@PathVariable(value = "id") long hotelId)
+    {
+        System.out.println("ovde so id: " + hotelId);
+        return hotelManager.getRoomsOfHotel(hotelId);
+    }
+
+
+    //HOTEL ROOM CRUD
+    @PostMapping(path = "/hotel/rooms/add")
+    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(), room.getNumOfBeds());
+    }
+
+    @PostMapping(path = "/hotel/rooms/edit")
+    public void editRoom(@RequestBody HotelRoom room) {
+        hotelManager.editRoom(room.getHotelRoomId(), room.getHotel(), room.getHotelRoomDescription(), room.getHotelRoomName(), room.getKitchenAvailable(), room.getAirConditioning(), room.getBalcony(), room.getPrice());
+    }
+
+    @GetMapping(path = "/hotel/rooms/delete")
+    public ResponseEntity removeRoom(@RequestParam(name = "hotelRoomId") long hotelRoomId) {
+        try
+        {
+            hotelManager.deleteRoom(hotelRoomId);
+            return new ResponseEntity(HttpStatus.OK);
+        }
+        catch (Exception exception)
+        {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+    }
+
+    //HOTEL RESERVATION CRUD
+
+    @PostMapping(path = "/hotel/rooms/reservation/edit")
+    public void editRoomReservation(@RequestBody HotelRoomReservations reservation) {
+        hotelManager.editReservation(reservation.getHotelRoomReservedId(), reservation.getUser(), reservation.getHotelRoom(), reservation.getDateFrom(), reservation.getDateTo(), reservation.getNumberOfBeds());
+    }
+
+    @GetMapping(path = "/hotel/rooms/reservation/delete")
+    public ResponseEntity removeReservation(@RequestParam(name = "hotelRoomReservationId") long hotelRoomReservationId) {
+        try
+        {
+            hotelManager.deleteReservation(hotelRoomReservationId);
+            return new ResponseEntity(HttpStatus.OK);
+        }
+        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)
+    {
+        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)
+    {
+        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
+        {
+            hotelManager.deleteRoomAvailible(hotelRoomAvailibleId);
+            return new ResponseEntity(HttpStatus.OK);
+        }
+        catch (Exception ex)
+        {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+    }
+
+    @GetMapping(path = "hotel/rooms/{id}/available")
+    public List<HotelRoomAvailable> getRoomAvailability(@PathVariable Long id)
+    {
+        return hotelManager.getRoomsAvailableById(id);
+    }
+
+    @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)
+    {
+        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,
+                                 @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){
+
+
+
+        hotelManager.createReservation(userId, hotelRoomId, hotelRoomAvailableId, from, to, numberOfBeds);
+    }
+
+    @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);
+    }
+}
Index: src/main/java/com/tourMate/controllers/ImageController.java
===================================================================
--- src/main/java/com/tourMate/controllers/ImageController.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/controllers/ImageController.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,54 @@
+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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/controllers/ImagesController.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/controllers/RestaurantController.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,173 @@
+package com.tourMate.controllers;
+
+import com.tourMate.dto.RestaurantDto;
+import com.tourMate.dto.RestaurantReservationUserDto;
+import com.tourMate.entities.*;
+import com.tourMate.services.RestaurantManager;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.http.ResponseEntity;
+
+
+import java.util.Date;
+import java.util.List;
+
+@CrossOrigin
+@RestController
+public class RestaurantController {
+
+    @Autowired
+    RestaurantManager restaurantManager;
+
+    @PostMapping(path = "/restaurant/add")
+    public List<Restaurant> add(@RequestBody Restaurant restaurant, @RequestParam(name = "userId") long userId) {
+
+        restaurantManager.createRestaurant(restaurant, userId);
+        return restaurantManager.getRestaurants();
+    }
+
+    @PostMapping(path = "/restaurant/{id}/menu/add")
+    public void addMenu(@PathVariable(name = "id") long restaurantId, @RequestBody Menu menu) {
+        restaurantManager.addMenuToRestaurant(restaurantId, menu);
+    }
+
+    @GetMapping(path = "/restaurant")
+    public List<Restaurant> showRestaurants() {
+        return restaurantManager.getRestaurants();
+    }
+
+    @GetMapping(path = "/restaurant/user/{id}")
+    public List<Restaurant> showRestaurantsForUser(@PathVariable(name = "id") long userId) {
+
+        return restaurantManager.getRestaurants();
+    }
+
+    @PostMapping(path = "/restaurant/edit")
+    public List<Restaurant> edit(@RequestBody Restaurant restaurant) {
+        restaurantManager.editRestaurant(restaurant.getRestaurantID(), restaurant.getRestaurantName(), restaurant.getRestaurantLocation(), restaurant.getCousineType(), restaurant.getRestaurantDescription(), restaurant.getRestaurantEdbs(), restaurant.getRestaurantOwner());
+        return restaurantManager.getRestaurants();
+    }
+
+    @GetMapping(path = "/restaurant/{id}")
+    public Restaurant getRestaurantById(@PathVariable(name = "id") long restaurantId) {
+        return restaurantManager.findRestaurantByID(restaurantId);
+    }
+
+    @GetMapping(path = "/restaurant/delete")
+    public ResponseEntity remove(@RequestParam(name = "restaurantId") long restaurantId) {
+        try {
+            restaurantManager.deleteRestaurant(restaurantId);
+            return new ResponseEntity(HttpStatus.OK);
+        } catch (Exception exception) {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+    }
+
+    // RESTAURANT IMAGE CRUD
+    @GetMapping(path = "/restaurant/images")
+    public List<RestaurantImages> getRestaurantImages(@RequestBody Restaurant restaurant) {
+        return restaurantManager.getRestaurantImages(restaurant.getRestaurantID());
+    }
+
+    @GetMapping(path = "/restaurant/images/add")
+    public void addRestaurantImages(@RequestParam(name = "restaurantId") long restaurantId, @RequestParam(name = "url") String url) {
+        Restaurant r = restaurantManager.findRestaurantByID(restaurantId);
+//        restaurantManager.
+    }
+
+    @GetMapping(path = "/restaurant/images/delete")
+    public ResponseEntity removeRestaurantImage(@RequestParam(name = "restaurantId") long restaurantId) {
+        try {
+            restaurantManager.removeRestaurantImage(restaurantId);
+            return new ResponseEntity(HttpStatus.OK);
+        } catch (Exception exception) {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+    }
+
+    // RESTAURANT TABLE CRUD
+    @PostMapping(path = "/restaurant/table/{id}/add")
+    public void addTable(@PathVariable Long id, @RequestParam Integer noSeats) {
+        restaurantManager.createTable(id, noSeats);
+    }
+
+    @PostMapping(path = "/restaurant/table/edit")
+    public void editTable(@RequestBody RestaurantsTable restaurantsTable) {
+        restaurantManager.editTable(restaurantsTable.getRestaurant(), restaurantsTable.getTableId(), restaurantsTable.getNoSeats());
+    }
+
+    @GetMapping(path = "/restaurant/table/delete")
+    public ResponseEntity removeTable(@RequestParam(name = "restaurantTableId") long restaurantTableId) {
+        try {
+            restaurantManager.deleteTable(restaurantTableId);
+            return new ResponseEntity(HttpStatus.OK);
+        } catch (Exception exception) {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+    }
+
+    @GetMapping(path = "/restaurant/table/{id}/availible")
+    public List<RestaurantsAvailible> addTable(@PathVariable Long id) {
+        return restaurantManager.getTablesAvailabilityById(id);
+    }
+
+
+    // 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/{id}/available/add")
+    public void addTableAvailable(@RequestBody RestaurantsAvailible restaurantsAvailible,
+                                  @PathVariable Long id) {
+        System.out.println(restaurantsAvailible.getHourFrom() + " " + restaurantsAvailible.getHourTo());
+        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) {
+        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]));
+        return restaurantManager.getTablesByDateAndLocation(restaurantLocation, dateFrom, dateTo, 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);
+    }
+}
+
Index: src/main/java/com/tourMate/controllers/ReviewController.java
===================================================================
--- src/main/java/com/tourMate/controllers/ReviewController.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/controllers/ReviewController.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,47 @@
+package com.tourMate.controllers;
+
+import com.tourMate.dao.ReviewManager;
+import com.tourMate.entities.Reviews;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@CrossOrigin
+public class ReviewController {
+    @Autowired
+    ReviewManager reviewManager;
+
+    @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 ) {
+        reviewManager.createReview(title, numStars, description, hotelId, restaurantId, transportId);
+    }
+
+    @PostMapping(path = "/review/edit")
+    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());
+    }
+
+    @GetMapping(path = "/review/delete")
+    public ResponseEntity remove(@RequestParam(name = "reviewId") long reviewId) {
+        try
+        {
+            reviewManager.deleteReview(reviewId);
+            return new ResponseEntity(HttpStatus.OK);
+        }
+        catch (Exception exception)
+        {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+    }
+
+
+}
Index: src/main/java/com/tourMate/controllers/TransportController.java
===================================================================
--- src/main/java/com/tourMate/controllers/TransportController.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/controllers/TransportController.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,153 @@
+package com.tourMate.controllers;
+
+import com.tourMate.dto.*;
+import com.tourMate.entities.*;
+import com.tourMate.services.TransportManager;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+import java.util.List;
+
+@CrossOrigin
+@RestController
+public class TransportController {
+    @Autowired
+    TransportManager transportManager;
+
+    // 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());
+
+    }
+
+    @GetMapping(path = "/transport")
+    public List<Transport> showTransports() {
+        return transportManager.getTransports();
+    }
+
+    @GetMapping(path = "/transport/user/{id}")
+    public List<TransportDto> showTransportsForUser(@PathVariable(name = "id") long userId) {
+        return transportManager.getTransportsByUser(userId);
+    }
+
+    @PostMapping(path = "/transport/edit")
+    public void edit(@RequestBody Transport transport) {
+        transportManager.editTransport(transport.getTransportID(), transport.getTransportName(), transport.getCarBrand(), transport.getCarType(), transport.getCarManufacturedYear(), transport.getNoPassengers(), transport.getNoBags(), transport.getEMBG(), transport.getOwner(), transport.getCarPlate());
+
+    }
+
+    @GetMapping(path = "/transport/{id}")
+    public TransportDto getTransport(@PathVariable(name = "id") long transportId)
+    {
+        return transportManager.findTransportById(transportId);
+    }
+
+    @GetMapping(path = "/transport/delete")
+    public ResponseEntity removeTransport(@RequestParam(name = "transportId") long transportId) {
+        try {
+            transportManager.deleteTransport(transportId);
+            return new ResponseEntity(HttpStatus.OK);
+        } catch (Exception exception) {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+    }
+
+    // TANSPORT RESERVATION CRUDE //
+
+    @GetMapping(path = "/transport/reservations")
+    public List<TransportReservation> showTransportReservations() {
+        return transportManager.getTransportReservations();
+    }
+
+    @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());
+    }
+
+    @GetMapping(path = "/transport/reservations/delete")
+    public ResponseEntity removeTransportReservation(@RequestParam(name = "transportReservationId") long transportReservationId) {
+        try {
+            transportManager.deleteTransportReservation(transportReservationId);
+            return new ResponseEntity(HttpStatus.OK);
+        } catch (Exception exception) {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+    }
+
+    // TRANSPORT AVAILABLE CRUDE
+    @PostMapping(path = "/transport/available/add")
+    public void add(@RequestBody TransportAvailible transportAvailable, @RequestParam(name = "transportId") long transportId) {
+        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);
+    }
+
+    @GetMapping(path = "/transport/available")
+    public List<TransportReservation> showTransportAvailable() {
+        return transportManager.getTransportReservations();
+    }
+
+    @GetMapping(path = "/transport/{id}/available")
+    public List<RouteListingDto> showRoutesForTransport(@PathVariable(name = "id") long transportId) {
+        List<RouteListingDto> bla = transportManager.getRoutesForTransport(transportId);
+        return bla;
+    }
+
+
+    @PostMapping(path = "/transport/available/edit")
+    public void edit(@RequestBody TransportAvailible transportAvailible) {
+        transportManager.editTransportAvailable(transportAvailible.getTransport(), transportAvailible.getTransportAvailibleId(), transportAvailible.getFrom(), transportAvailible.getTo(), transportAvailible.getDate(), transportAvailible.getFreeSpace(), transportAvailible.getTime());
+    }
+
+    @GetMapping(path = "/transport/available/delete")
+    public ResponseEntity removeTransportAvailable(@RequestParam(name = "transportAvailableId") long transportAvailableId)
+    {
+        try
+        {
+            transportManager.deleteTransportAvailable(transportAvailableId);
+            return new ResponseEntity(HttpStatus.OK);
+        }
+        catch (Exception exception)
+        {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+    }
+
+    @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);
+    }
+}
Index: src/main/java/com/tourMate/controllers/UsersController.java
===================================================================
--- src/main/java/com/tourMate/controllers/UsersController.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/controllers/UsersController.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,115 @@
+package com.tourMate.controllers;
+
+import com.tourMate.entities.Business;
+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.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.core.Authentication;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@CrossOrigin
+@RestController
+public class UsersController {
+    @Autowired
+    UsersManager usersManager;
+    @Autowired
+    BusinessManager businessManager;
+
+    @GetMapping(path = "/{id}/hasBusiness")
+    public boolean hasBusinessRegistered(@PathVariable(value = "id") long userId)
+    {
+        return businessManager.hasBusiness(userId);
+    }
+
+    @PostMapping(path = "/business/add")
+    public void addBusiness(@RequestBody Business business, @RequestParam(name = "userId") long userId)
+    {
+        System.out.println("userot e: " + userId);
+        businessManager.createBusiness(business, userId);
+    }
+
+    @GetMapping(path = "/business/{id}/unapproved")
+    public List<Business> getUnapprovedBusinesses(@PathVariable(name = "id") long userId)
+    {
+        return businessManager.getUnapprovedBusinessesOfUser(userId);
+    }
+
+    @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();
+    }
+
+    @GetMapping(path = "/user")
+    public List<User> showUsers() {
+        return usersManager.getCreatedUsers();
+    }
+
+    @GetMapping(value = "/username")
+    @ResponseBody
+    public String currentUserName(Authentication authentication) {
+        return authentication.getName();
+    }
+
+    @GetMapping(value = "/principal")
+    @ResponseBody
+    public User currentUser(Authentication authentication) {
+        return (User) authentication.getPrincipal();
+    }
+    @PostMapping(path = "/user/edit")
+    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) {
+        try
+        {
+            usersManager.deleteUser(userId);
+            return new ResponseEntity(HttpStatus.OK);
+        }
+        catch (Exception exception)
+        {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+    }
+}
+
Index: src/main/java/com/tourMate/controllers/UtilsController.java
===================================================================
--- src/main/java/com/tourMate/controllers/UtilsController.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/controllers/UtilsController.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,24 @@
+package com.tourMate.controllers;
+
+import org.springframework.http.ResponseEntity;
+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;
+
+@RestController
+public class UtilsController {
+    @GetMapping("/loo")
+    public ResponseEntity<?> testFnc(RedirectAttributes attributes) {
+        String redirectUrl = "https://example.com"; // Replace with your desired redirect URL
+
+        // Using UriComponentsBuilder to handle URL encoding
+        return ResponseEntity
+                .status(302) // 302 Found status code for redirect
+                .location(UriComponentsBuilder.fromUriString(redirectUrl).build().toUri())
+                .build();
+    }
+}
Index: src/main/java/com/tourMate/dao/BusinessDao.java
===================================================================
--- src/main/java/com/tourMate/dao/BusinessDao.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/BusinessDao.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,25 @@
+package com.tourMate.dao;
+
+import com.tourMate.entities.Business;
+import com.tourMate.entities.User;
+import jakarta.transaction.Transactional;
+
+import java.util.List;
+
+public interface BusinessDao {
+
+    @Transactional
+    void createBusiness(Business business, long userId);
+    List<Business> getUnapprovedBusinessesOfUser(long userId);
+    void deleteBusiness(long businessId);
+    List<Business> getCreatedBusinesses();
+    Business findBusinessById (long businessId);
+
+    @Transactional
+    void editBusiness(long businessId, String name, String phone, String address, String edbs, User user, boolean approved);
+    boolean hasBusiness(long userId);
+
+    List<Business> getUnapprovedBusinesses();
+
+    void approveBusiness(Business business);
+}
Index: src/main/java/com/tourMate/dao/HotelDao.java
===================================================================
--- src/main/java/com/tourMate/dao/HotelDao.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/HotelDao.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,55 @@
+package com.tourMate.dao;
+
+
+import com.tourMate.entities.*;
+import jakarta.transaction.Transactional;
+
+import java.util.Date;
+import java.util.List;
+
+public interface HotelDao {
+    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);
+
+    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);
+}
Index: src/main/java/com/tourMate/dao/MenuDao.java
===================================================================
--- src/main/java/com/tourMate/dao/MenuDao.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/MenuDao.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,13 @@
+package com.tourMate.dao;
+
+import com.tourMate.entities.Menu;
+
+import java.util.List;
+
+public interface MenuDao {
+    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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/RestaurantDao.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,56 @@
+package com.tourMate.dao;
+
+import com.tourMate.entities.*;
+import jakarta.transaction.Transactional;
+
+import java.util.Date;
+import java.util.List;
+
+public interface RestaurantDao {
+    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);
+}
Index: src/main/java/com/tourMate/dao/ReviewDao.java
===================================================================
--- src/main/java/com/tourMate/dao/ReviewDao.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/ReviewDao.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,27 @@
+package com.tourMate.dao;
+
+import com.tourMate.entities.Hotels;
+import com.tourMate.entities.Restaurant;
+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);
+
+    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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/TokenDao.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/TransportDao.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,64 @@
+package com.tourMate.dao;
+
+import com.tourMate.dto.RouteListingDto;
+import com.tourMate.dto.TransportDto;
+import com.tourMate.entities.*;
+
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
+public interface TransportDao {
+
+    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);
+}
Index: src/main/java/com/tourMate/dao/UsersDao.java
===================================================================
--- src/main/java/com/tourMate/dao/UsersDao.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/UsersDao.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,29 @@
+package com.tourMate.dao;
+
+import com.tourMate.entities.Role;
+import com.tourMate.entities.User;
+import org.springframework.security.core.userdetails.UserDetails;
+
+import java.util.Date;
+import java.util.List;
+
+public interface UsersDao {
+
+    public void createUser(String name, String surname, String email, Date birthDate, String address, String contact);
+
+    public void deleteUser(long userID);
+
+    public List<User> getCreatedUsers();
+
+    public List<Role> getRoles();
+
+    public User findUserByID(long userID);
+
+    public void editUser(long userID, String name, String surname, String email, Date birthDate, String address, String contact);
+
+    UserDetails findUserByUsername(String username);
+
+    List<User> getUnapprovedUsers();
+
+    void approveUserProfile(User u);
+}
Index: src/main/java/com/tourMate/dao/impl/BusinessDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/BusinessDaoImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/impl/BusinessDaoImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,83 @@
+package com.tourMate.dao.impl;
+
+import com.tourMate.dao.BusinessDao;
+import com.tourMate.entities.Business;
+import com.tourMate.entities.User;
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.PersistenceContext;
+import jakarta.transaction.Transactional;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class BusinessDaoImpl implements BusinessDao {
+
+    @PersistenceContext
+    EntityManager em;
+
+    @Transactional
+    @Override
+    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(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();
+    }
+
+    @Transactional
+    @Override
+    public void deleteBusiness(long businessId) {
+        Business business = findBusinessById(businessId);
+        em.remove(business);
+
+    }
+
+    @Override
+    public boolean hasBusiness(long userId)
+    {
+        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;
+    }
+
+    @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) {
+        b.setApproved(true);
+        em.persist(b);
+    }
+
+
+    @Override
+    public List<Business> getCreatedBusinesses() {
+        return em.createQuery("from Business order by businessId").getResultList();
+    }
+
+    @Override
+    public Business findBusinessById(long businessId) {
+        return em.find(Business.class, businessId);
+    }
+
+    @Transactional
+    @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);
+        em.persist(business);
+    }
+}
Index: src/main/java/com/tourMate/dao/impl/HotelDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/HotelDaoImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/impl/HotelDaoImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,262 @@
+package com.tourMate.dao.impl;
+
+import com.tourMate.dao.HotelDao;
+import com.tourMate.entities.*;
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.PersistenceContext;
+import jakarta.transaction.Transactional;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+@Service
+public class HotelDaoImpl implements HotelDao {
+
+    @PersistenceContext
+    EntityManager em;
+
+    @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();
+        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);
+    }
+
+    @Transactional
+    @Override
+    public void deleteHotel(long hotelId) {
+        Hotels h = findHotelByID(hotelId);
+        em.remove(h);
+    }
+
+    @Override
+    public Hotels findHotelByID(long hotelId) {
+        return em.find(Hotels.class, hotelId);
+    }
+
+    @Override
+    public List<HotelsImages> getHotelImages(Hotels hotel) {
+        return em.createQuery("select hi from HotelsImages hi where hi.hotel = :hotel").setParameter("hotel", hotel).getResultList();
+    }
+
+    @Override
+    @Transactional
+    public void addHotelImage(HotelsImages image) {
+        em.persist(image);
+    }
+
+    @Transactional
+    @Override
+    public void addRoomImage(HotelRoomImages x) {
+        em.persist(x);
+    }
+
+    @Override
+    @Transactional
+    public HotelsImages findHotelImageById(long hotelImageId) {
+        return em.find(HotelsImages.class, hotelImageId);
+    }
+
+    @Override
+    @Transactional
+    public void deleteHotelImage(long hotelImageId) {
+        HotelsImages hotelsImages = findHotelImageById(hotelImageId);
+        em.remove(hotelsImages);
+    }
+
+    @Override
+    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();
+    }
+
+    @Override
+    public List<HotelRoomAvailable> getRoomsAvailable(Long id) {
+        return em.createQuery("SELECT hra from HotelRoomAvailable hra WHERE hra.hotelRoom.id = :hotelRoomId").setParameter("hotelRoomId", id).getResultList();
+    }
+
+    @Override
+    public HotelRoom findRoomById(long hotelRoomId) {
+        return em.find(HotelRoom.class, hotelRoomId);
+    }
+
+    @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(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds) {
+        HotelRoom hotelRoom = new HotelRoom(hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price, numOfBeds);
+        em.persist(hotelRoom);
+    }
+
+    @Transactional
+    @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);
+        em.persist(hr);
+    }
+
+    @Transactional
+    @Override
+    public void deleteRoom(long hotelRoomId) {
+        HotelRoom hr = findRoomById(hotelRoomId);
+        em.remove(hr);
+    }
+
+    @Transactional
+    @Override
+    public void createRoomAvailible(HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds) {
+        HotelRoomAvailable hra = new HotelRoomAvailable(hotelRoom, dateFrom, dateTo, numberOfBeds);
+        em.persist(hra);
+    }
+
+    @Transactional
+    @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);
+        em.persist(hr);
+    }
+
+    @Transactional
+    @Override
+    public void deleteRoomAvailible(long hotelRoomAvailableId) {
+        HotelRoomAvailable hra = findAvailibleRoomById(hotelRoomAvailableId);
+        em.remove(hra);
+    }
+
+    @Override
+    public HotelRoomAvailable findAvailibleRoomById(long hotelRoomAvailableId) {
+        return em.find(HotelRoomAvailable.class, hotelRoomAvailableId);
+    }
+
+    @Override
+    public List<HotelRoomAvailable> getRoomsAvailibility() {
+        return em.createQuery("select hra from HotelRoomAvailable hra").getResultList();
+    }
+
+    @Override
+    public List<HotelRoomAvailable> getRoomsAvailibilityByHotel(Hotels hotel) {
+        return em.createQuery("select hr from HotelRoomAvailable hr where hr.hotelRoom.hotel = :hotel").setParameter("hotel", hotel).getResultList();
+    }
+
+    @Override
+    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.hotelRoom.numOfBeds >= :numBeds")
+                .setParameter("hotelLocation", hotelLocation)
+                .setParameter("dateFrom", dateFrom)
+                .setParameter("dateTo", dateTo)
+                .setParameter("numBeds", numberOfBeds)
+                .getResultList();
+    }
+
+    @Override
+    @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 and hr.dateTo >= now()")
+                .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.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();
+    }
+}
Index: src/main/java/com/tourMate/dao/impl/MenuDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/MenuDaoImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/impl/MenuDaoImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,52 @@
+package com.tourMate.dao.impl;
+
+import com.tourMate.dao.MenuDao;
+import com.tourMate.entities.Menu;
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.PersistenceContext;
+import jakarta.transaction.Transactional;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class MenuDaoImpl implements MenuDao {
+
+    @PersistenceContext
+    EntityManager em;
+
+    @Transactional
+    @Override
+    public void createMenu(String name, String ingredients, double price) {
+        Menu menu = new Menu(name, ingredients, price);
+        em.persist(menu);
+    }
+
+    @Transactional
+    @Override
+    public void deleteMenu(long menuId) {
+        Menu menu = findMenuById(menuId);
+        em.remove(menu);
+    }
+
+    @Override
+    public List<Menu> getCreatedMenus() {
+        return em.createQuery("from Menu order by menuId").getResultList();
+    }
+
+    @Override
+    public Menu findMenuById(long menuId) {
+        return em.find(Menu.class, menuId);
+    }
+
+    @Transactional
+    @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);
+        em.persist(menu);
+    }
+
+}
Index: src/main/java/com/tourMate/dao/impl/RestaurantDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/RestaurantDaoImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/impl/RestaurantDaoImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,261 @@
+package com.tourMate.dao.impl;
+
+import com.tourMate.dao.RestaurantDao;
+import com.tourMate.entities.*;
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.PersistenceContext;
+import jakarta.transaction.Transactional;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+@Service
+public class RestaurantDaoImpl implements RestaurantDao {
+    @PersistenceContext
+    EntityManager em;
+
+    @Override
+    @Transactional
+    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);
+    }
+
+    @Override
+    public List<RestaurantsAvailible> getTablesByDateAndLocation(String restaurantLocation, Date hourFrom, Date hourTo, int noSeats){
+        return em.createQuery("select hr from RestaurantsAvailible hr where hr.hourFrom <= :hourFrom and hr.hourTo >= :hourTo " +
+                        "and hr.restaurantTable.restaurant.restaurantLocation LIKE :restaurantLocation and hr.restaurantTable.noSeats >= :noSeats")
+                .setParameter("restaurantLocation", restaurantLocation)
+                .setParameter("hourFrom", hourFrom)
+                .setParameter("hourTo", hourTo)
+                .setParameter("noSeats", noSeats)
+                .getResultList();
+    }
+
+    @Transactional
+    @Override
+    public void addRestaurantImage(RestaurantImages restaurantImages){
+        em.persist(restaurantImages);
+    }
+
+    @Transactional
+    @Override
+    public void removeRestaurantImage(long restaurantImageId){
+        RestaurantImages restaurantImage = findRestaurantImageById(restaurantImageId);
+        em.remove(restaurantImage);
+    }
+
+    @Transactional
+    @Override
+    public RestaurantImages findRestaurantImageById(long restaurantImageId){
+        return em.find(RestaurantImages.class, restaurantImageId);
+    }
+
+    @Override
+    public void deleteRestaurant(long restaurantID) {
+        Restaurant r = findRestaurantByID(restaurantID);
+        em.remove(r);
+    }
+
+    @Override
+    public List<Restaurant> getRestaurants() {
+        return em.createQuery("select r from Restaurant r order by r.restaurantID").getResultList();
+    }
+
+    @Override
+    @Transactional
+    public void addMenuToRestaurant(long restaurantId, Menu menu) {
+        Restaurant r = findRestaurantByID(restaurantId);
+        menu.setRestaurant(r);
+        em.persist(menu);
+    }
+
+    @Override
+    public Restaurant findRestaurantByID(long restaurantID) {
+        return em.find(Restaurant.class, restaurantID);
+    }
+
+    @Override
+    public List<RestaurantImages> getRestaurantImages(long restaurantID) {
+        return em.createQuery("select ri from RestaurantImages ri where ri.restaurant.restaurantID = :restaurantID").setParameter("restaurantID", restaurantID).getResultList();
+    }
+
+    @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) {
+        List<RestaurantsTable> restaurantsTables = getRestaurantTables(restaurantID);
+        return restaurantsTables;
+    }
+
+    @Override
+    public RestaurantsTable findTableById(long tableId) {
+        return em.find(RestaurantsTable.class, tableId);
+    }
+
+    @Override
+    @Transactional
+    public void createTable(Restaurant restaurant, int noSeats) {
+        RestaurantsTable resTable = new RestaurantsTable(restaurant, noSeats);
+        em.persist(resTable);
+    }
+
+    @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(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);
+    }
+
+    @Override
+    public List<RestaurantsAvailible> getTablesAvailabilityById(Long id)
+    {
+        return em.createQuery("SELECT ra from RestaurantsAvailible ra WHERE ra.restaurantTable.id = :id").setParameter("id", id).getResultList();
+    }
+
+    @Override
+    @Transactional
+    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);
+    }
+
+    @Override
+    public List<RestaurantsAvailible> getTablesAvailability() {
+        return em.createQuery("SELECT a from RestaurantsAvailible a ORDER BY a.restaurantAvailibleId").getResultList();
+    }
+
+    @Override
+    @Transactional
+    public void createReservation(RestaurantReservations reservations) {
+        em.persist(reservations);
+    }
+
+    @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);
+    }
+
+    @Override
+    public RestaurantReservations findReservationByID(long tableId) {
+        return em.find(RestaurantReservations.class, tableId);
+    }
+
+    @Override
+    public RestaurantsAvailible findAvailableReservationByID(long availibleId) {
+        return em.find(RestaurantsAvailible.class, availibleId);
+    }
+
+    @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();
+    }
+
+    @Override
+    public List<RestaurantReservations> findReservationByRestaurant(Restaurant restaurant) {
+        return em.createQuery("select rr from RestaurantReservations rr where rr.table.restaurant = :rest").setParameter("rest", restaurant).getResultList();
+    }
+
+    @Override
+    public List<RestaurantReservations> getReservations() {
+        return em.createQuery("select r from Restaurant r order by r.restaurantName").getResultList();
+    }
+
+    @Override
+    public List<Restaurant> searchByRestaurantName(String restaurantName) {
+        return em.createQuery("select rt from RestaurantsTable rt where rt.restaurant.restaurantName = :restaurantName").setParameter("restaurantName", restaurantName).getResultList();
+    }
+
+    @Override
+    public List<Restaurant> searchByRestaurantLocation(String restaurantLocation) {
+
+        return em.createQuery("select rt from RestaurantsTable rt where rt.restaurant.restaurantLocation = :restaurantLocation").setParameter("restaurantLocation", restaurantLocation).getResultList();
+
+    }
+
+    @Override
+    public List<RestaurantsTable> searchByNoSeats(int noSeats) {
+        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();
+
+    }
+}
Index: src/main/java/com/tourMate/dao/impl/ReviewDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/ReviewDaoImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/impl/ReviewDaoImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,84 @@
+package com.tourMate.dao.impl;
+
+import com.tourMate.dao.ReviewDao;
+import com.tourMate.entities.Hotels;
+import com.tourMate.entities.Restaurant;
+import com.tourMate.entities.Reviews;
+import com.tourMate.entities.Transport;
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.PersistenceContext;
+import jakarta.transaction.Transactional;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+@Service
+public class ReviewDaoImpl implements ReviewDao {
+
+    @PersistenceContext
+    EntityManager em;
+    
+    @Override
+    @Transactional
+    public void createReview(Reviews review) {
+        em.persist(review);
+    }
+
+    @Override
+    public void deleteReview(long id) {
+        Reviews review = findReviewById(id);
+        em.remove(review);
+    }
+
+    @Override
+    public Reviews findReviewById(long id) {
+        return em.find(Reviews.class, id);
+    }
+
+    @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);
+        em.persist(review);
+    }
+
+    @Override
+    public List<Reviews> getAllReviews() {
+        return em.createQuery("select r from Reviews r order by reviewId").getResultList();
+    }
+
+    @Override
+    public List<Reviews> getHotelReviews() {
+        return em.createQuery("select r from Reviews r where r.hotel is not null").getResultList();
+    }
+
+    @Override
+    public List<Reviews> getTransportReviews() {
+        return em.createQuery("select r from Reviews r where r.transport is not null").getResultList();
+    }
+
+    @Override
+    public List<Reviews> getRestaurantReviews() {
+        return em.createQuery("select r from Reviews r where r.restaurant is not null").getResultList();
+    }
+
+    @Override
+    public List<Reviews> getHotelReviews(Hotels hotel) {
+        return null;
+    }
+
+    @Override
+    public List<Reviews> getRestaurantReviews(Restaurant restaurant) {
+        return null;
+    }
+
+    @Override
+    public List<Reviews> getTransportReviews(Transport transport) {
+        return null;
+    }
+
+}
Index: src/main/java/com/tourMate/dao/impl/TokenDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/TokenDaoImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/impl/TokenDaoImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/impl/TransportDaoImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,297 @@
+package com.tourMate.dao.impl;
+
+import com.tourMate.dao.TransportDao;
+import com.tourMate.dto.RouteListingDto;
+import com.tourMate.dto.TransportDto;
+import com.tourMate.entities.*;
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.PersistenceContext;
+import jakarta.transaction.Transactional;
+import org.springframework.stereotype.Service;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
+@Service
+public class TransportDaoImpl implements TransportDao {
+
+    @PersistenceContext
+    private EntityManager em;
+
+    @Override
+    @Transactional
+    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, Long userId, String carPlate) {
+        User u = em.find(User.class, userId);
+        Transport t=new Transport(transportName,carBrand,carType,carManufacturedYear,noPassengers,noBags,EMBG,u,carPlate);
+        em.persist(t);
+    }
+
+    @Override
+    @Transactional
+    public void deleteTransport(long transportId) {
+        Transport t=getTransportById(transportId);
+        em.remove(t);
+    }
+
+    @Override
+    public List<Transport> getTransports() {
+        return em.createQuery("from Transport order by transportID").getResultList();
+    }
+
+    @Override
+    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(),
+                        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();
+    }
+
+    @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.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();
+    }
+
+    @Override
+    public TransportDto findTransportById(long transportId) {
+        Transport x = em.find(Transport.class,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));
+    }
+
+    public Transport getTransportById(long transportId)
+    {
+        return em.find(Transport.class, transportId);
+    }
+
+    @Override
+    @Transactional
+    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);
+    }
+
+    @Override
+    @Transactional
+    public void createTransportReservation(TransportReservation transportReservation) {
+        em.persist(transportReservation);
+    }
+
+    @Override
+    public TransportReservation findTransportReservationByID(long reservationID) {
+        return em.find(TransportReservation.class,reservationID);
+    }
+
+    @Override
+    public List<TransportReservation> getTransportReservations() {
+        return em.createQuery("from TransportReservation order by reservationID").getResultList();
+    }
+
+    @Override
+    public TransportAvailible findTransportAvailableByID(long reservationID) {
+        return em.find(TransportAvailible.class,reservationID);
+    }
+
+    @Override
+    public List<TransportRoute> getTransportsAvailableByFilters(String fromL, String toL, Date date, int numPassengers) {
+        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();
+    }
+
+    @Override
+    public List<TransportReservation> getTransportsReservationsByUserID(long userID) {
+        return null;
+    }
+
+    @Override
+    public List<TransportAvailible> getTransportsAvailable() {
+        return em.createQuery("from TransportAvailible order by transportAvailibleId").getResultList();
+    }
+
+    @Override
+    @Transactional
+    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);
+        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);
+    }
+
+    @Override
+    public TransportRoute findTransportRouteById(long transportRouteId){
+        return em.find(TransportRoute.class, transportRouteId);
+    }
+
+    @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();
+
+    }
+
+    @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(long reservationID) {
+        TransportReservation tr=findTransportReservationByID(reservationID);
+        em.remove(tr);
+    }
+
+    @Override
+    @Transactional
+    public void deleteTransportAvailable(long availableID) {
+        TransportAvailible ta=findTransportAvailableByID(availableID);
+        em.remove(ta);
+    }
+
+    @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);
+        em.persist(tr);
+    }
+
+    @Override
+    public void deleteTransportRoute(long transportRouteId) {
+        TransportRoute tr = findTransportRouteById(transportRouteId);
+        em.remove(tr);
+    }
+
+    @Override
+    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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dao/impl/UsersDaoImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,89 @@
+package com.tourMate.dao.impl;
+
+import com.tourMate.dao.UsersDao;
+import com.tourMate.entities.Role;
+import com.tourMate.entities.User;
+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.security.core.userdetails.UserDetails;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+@Service
+public class UsersDaoImpl implements UsersDao {
+
+    @PersistenceContext
+    EntityManager em;
+
+    @Autowired
+    PasswordEncoder passwordEncoder;
+
+    @Transactional
+    @Override
+    public void createUser(String name, String surname, String email, Date birthDate, String address, String contact) {
+        Role r = em.find(Role.class, 1);
+        User user = new User(name, surname, email, passwordEncoder.encode("password"), birthDate, address, contact, r);
+        em.persist(user);
+    }
+
+    @Transactional
+    @Override
+    public void deleteUser(long userID) {
+        User u = findUserByID(userID);
+        em.remove(u);
+    }
+
+    @Override
+    public List<User> getCreatedUsers() {
+        return em.createQuery("from User order by userID").getResultList();
+    }
+
+    @Override
+    public List<Role> getRoles() {
+        return em.createQuery("SELECT r from Role r ORDER BY r.id").getResultList();
+    }
+
+    @Override
+    public User findUserByID(long userID) {
+        return em.find(User.class, userID);
+    }
+
+    @Transactional
+    @Override
+    public void editUser(long userID, String name, String surname, String email, Date birthDate, String address, String contact) {
+        User u = findUserByID(userID);
+        u.setName(name);
+        u.setSurname(surname);
+        u.setEmail(email);
+        u.setBirthDate(birthDate);
+        u.setAddress(address);
+        u.setContact(contact);
+        em.persist(u);
+    }
+
+    @Override
+    public UserDetails findUserByUsername(String username) {
+        List<User> useri  = em.createQuery("SELECT u FROM User u WHERE u.email = :username").setParameter("username", username).getResultList();
+        return (User) em.createQuery("SELECT u FROM User u WHERE u.email = :username").setParameter("username", username).getResultList().get(0);
+    }
+
+    @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);
+    }
+
+
+}
Index: src/main/java/com/tourMate/dto/HotelDto.java
===================================================================
--- src/main/java/com/tourMate/dto/HotelDto.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dto/HotelDto.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,134 @@
+package com.tourMate.dto;
+
+import com.tourMate.entities.*;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+public class HotelDto {
+    private long hotelId;
+    private String hotelName;
+    private String hotelDescripiton;
+    private String hotelLocation;
+    private String hotelEDBS;
+    private Boolean parking;
+    private Boolean petFriendly;
+    private Boolean internetAvailable;
+    private double totalPrice;
+    private List<HotelRoomAvailable> hotelRooms;
+    private List<Reviews> hotelReviews;
+    private double averageScore;
+    private List<HotelsImages> images;
+
+    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) {
+        this.hotelId = hotelId;
+        this.hotelName = hotelName;
+        this.hotelDescripiton = hotelDescripiton;
+        this.hotelLocation = hotelLocation;
+        this.hotelEDBS = hotelEDBS;
+        this.parking = parking;
+        this.petFriendly = petFriendly;
+        this.internetAvailable = internetAvailable;
+        this.totalPrice = totalPrice;
+        this.hotelRooms = hotelRooms;
+        this.hotelReviews = hotelReviews;
+        this.averageScore = averageScore;
+        this.images = images;
+    }
+
+    public long getHotelId() {
+        return hotelId;
+    }
+
+    public void setHotelId(long hotelId) {
+        this.hotelId = hotelId;
+    }
+
+    public String getHotelName() {
+        return hotelName;
+    }
+
+    public void setHotelName(String hotelName) {
+        this.hotelName = hotelName;
+    }
+
+    public String getHotelDescripiton() {
+        return hotelDescripiton;
+    }
+
+    public void setHotelDescripiton(String hotelDescripiton) {
+        this.hotelDescripiton = hotelDescripiton;
+    }
+
+    public String getHotelLocation() {
+        return hotelLocation;
+    }
+
+    public void setHotelLocation(String hotelLocation) {
+        this.hotelLocation = hotelLocation;
+    }
+
+    public String getHotelEDBS() {
+        return hotelEDBS;
+    }
+
+    public void setHotelEDBS(String hotelEDBS) {
+        this.hotelEDBS = hotelEDBS;
+    }
+
+    public Boolean getParking() {
+        return parking;
+    }
+
+    public void setParking(Boolean parking) {
+        this.parking = parking;
+    }
+
+    public Boolean getPetFriendly() {
+        return petFriendly;
+    }
+
+    public void setPetFriendly(Boolean petFriendly) {
+        this.petFriendly = petFriendly;
+    }
+
+    public Boolean getInternetAvailable() {
+        return internetAvailable;
+    }
+
+    public void setInternetAvailable(Boolean internetAvailable) {
+        this.internetAvailable = internetAvailable;
+    }
+
+    public double getTotalPrice() {
+        return totalPrice;
+    }
+
+    public void setTotalPrice(double totalPrice) {
+        this.totalPrice = totalPrice;
+    }
+
+    public List<HotelRoomAvailable> getHotelRooms() {
+        return hotelRooms;
+    }
+
+    public void setHotelRooms(List<HotelRoomAvailable> hotelRooms) {
+        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;
+    }
+}
Index: src/main/java/com/tourMate/dto/HotelReservationDto.java
===================================================================
--- src/main/java/com/tourMate/dto/HotelReservationDto.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dto/HotelReservationDto.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,42 @@
+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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dto/HotelReservationUserDto.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,73 @@
+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 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(User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numBeds, String hotelName, String hotelLocation, String hotelAddress, Long hotelId, Boolean reviewed) {
+        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 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/RestaurantDto.java
===================================================================
--- src/main/java/com/tourMate/dto/RestaurantDto.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dto/RestaurantDto.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,121 @@
+package com.tourMate.dto;
+
+import com.tourMate.entities.*;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+public class RestaurantDto {
+    private long restaurantID;
+    private String restaurantName;
+    private String restaurantLocation;
+    private String cousineType;
+    private String restaurantDescription;
+    private String restaurantEdbs;
+    private Collection<Menu> menus = new ArrayList<Menu>();
+    private Collection<RestaurantsAvailible> tables;
+    private Collection<Reviews> reviews;
+    private double averageScore;
+    private Collection<RestaurantImages> images;
+    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) {
+        this.restaurantID = restaurantID;
+        this.restaurantName = restaurantName;
+        this.restaurantLocation = restaurantLocation;
+        this.cousineType = cousineType;
+        this.restaurantDescription = restaurantDescription;
+        this.restaurantEdbs = restaurantEdbs;
+        this.menus = menus;
+        this.tables = tables;
+        this.reviews = reviews;
+        this.averageScore = averageScore;
+        this.images = images;
+    }
+
+    public long getRestaurantID() {
+        return restaurantID;
+    }
+
+    public void setRestaurantID(long restaurantID) {
+        this.restaurantID = restaurantID;
+    }
+
+    public String getRestaurantName() {
+        return restaurantName;
+    }
+
+    public void setRestaurantName(String restaurantName) {
+        this.restaurantName = restaurantName;
+    }
+
+    public String getRestaurantLocation() {
+        return restaurantLocation;
+    }
+
+    public void setRestaurantLocation(String restaurantLocation) {
+        this.restaurantLocation = restaurantLocation;
+    }
+
+    public String getCousineType() {
+        return cousineType;
+    }
+
+    public void setCousineType(String cousineType) {
+        this.cousineType = cousineType;
+    }
+
+    public String getRestaurantDescription() {
+        return restaurantDescription;
+    }
+
+    public void setRestaurantDescription(String restaurantDescription) {
+        this.restaurantDescription = restaurantDescription;
+    }
+
+    public String getRestaurantEdbs() {
+        return restaurantEdbs;
+    }
+
+    public void setRestaurantEdbs(String restaurantEdbs) {
+        this.restaurantEdbs = restaurantEdbs;
+    }
+
+    public Collection<Menu> getMenus() {
+        return menus;
+    }
+
+    public void setMenus(Collection<Menu> menus) {
+        this.menus = menus;
+    }
+
+    public Collection<RestaurantsAvailible> getTables() {
+        return tables;
+    }
+
+    public void setTables(Collection<RestaurantsAvailible> 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/RestaurantReservationUserDto.java
===================================================================
--- src/main/java/com/tourMate/dto/RestaurantReservationUserDto.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dto/RestaurantReservationUserDto.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,75 @@
+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 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(User user, RestaurantsTable restaurantsTable, Date dateFrom, Date dateTo, Integer numPeople, String restaurantName, String restaurantLocation, String restaurantAddress, Long restaurantId, Boolean reviewed) {
+        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 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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dto/RouteListingDto.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,92 @@
+package com.tourMate.dto;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.tourMate.entities.Transport;
+import com.tourMate.entities.TransportRoute;
+import jakarta.persistence.Temporal;
+import jakarta.persistence.TemporalType;
+
+import java.util.Collection;
+import java.util.Date;
+
+public class RouteListingDto {
+    private long transportAvailibleId;
+    private String from;
+    private String to;
+    private Date date;
+    private int freeSpace;
+    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) {
+        this.transportAvailibleId = transportAvailibleId;
+        this.from = from;
+        this.to = to;
+        this.date = date;
+        this.freeSpace = freeSpace;
+        this.time = time;
+        this.routes = routes.stream().map(x -> x.getFrom()).distinct().skip(1).toList();
+        this.maxPrice = maxPrice;
+    }
+
+    public long getTransportAvailibleId() {
+        return transportAvailibleId;
+    }
+
+    public void setTransportAvailibleId(long transportAvailibleId) {
+        this.transportAvailibleId = transportAvailibleId;
+    }
+
+    public String getFrom() {
+        return from;
+    }
+
+    public void setFrom(String from) {
+        this.from = from;
+    }
+
+    public String getTo() {
+        return to;
+    }
+
+    public void setTo(String to) {
+        this.to = to;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public int getFreeSpace() {
+        return freeSpace;
+    }
+
+    public void setFreeSpace(int freeSpace) {
+        this.freeSpace = freeSpace;
+    }
+
+    public Date getTime() {
+        return time;
+    }
+
+    public void setTime(Date time) {
+        this.time = time;
+    }
+
+    public Collection<String> getRoutes() {
+        return routes;
+    }
+
+    public void setRoutes(Collection<String> routes) {
+        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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dto/TransportDto.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,123 @@
+package com.tourMate.dto;
+
+import com.tourMate.entities.User;
+
+import java.util.Collection;
+
+public class TransportDto {
+    private long transportID;
+    private String transportName;
+    private String carBrand;
+    private String carType;
+    private int carManufacturedYear;
+    private int noPassengers;
+    private int noBags;
+    private long EMBG;
+    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) {
+        this.transportID = transportID;
+        this.transportName = transportName;
+        this.carBrand = carBrand;
+        this.carType = carType;
+        this.carManufacturedYear = carManufacturedYear;
+        this.noPassengers = noPassengers;
+        this.noBags = noBags;
+        this.EMBG = EMBG;
+        this.owner = owner;
+        this.carPlate = carPlate;
+        this.availableRoutes = availableRoutes;
+        this.maxPrice = maxPrice;
+    }
+
+    public long getTransportID() {
+        return transportID;
+    }
+
+    public void setTransportID(long transportID) {
+        this.transportID = transportID;
+    }
+
+    public String getTransportName() {
+        return transportName;
+    }
+
+    public void setTransportName(String transportName) {
+        this.transportName = transportName;
+    }
+
+    public String getCarBrand() {
+        return carBrand;
+    }
+
+    public void setCarBrand(String carBrand) {
+        this.carBrand = carBrand;
+    }
+
+    public String getCarType() {
+        return carType;
+    }
+
+    public void setCarType(String carType) {
+        this.carType = carType;
+    }
+
+    public int getCarManufacturedYear() {
+        return carManufacturedYear;
+    }
+
+    public void setCarManufacturedYear(int carManufacturedYear) {
+        this.carManufacturedYear = carManufacturedYear;
+    }
+
+    public int getNoPassengers() {
+        return noPassengers;
+    }
+
+    public void setNoPassengers(int noPassengers) {
+        this.noPassengers = noPassengers;
+    }
+
+    public int getNoBags() {
+        return noBags;
+    }
+
+    public void setNoBags(int noBags) {
+        this.noBags = noBags;
+    }
+
+    public long getEMBG() {
+        return EMBG;
+    }
+
+    public void setEMBG(long EMBG) {
+        this.EMBG = EMBG;
+    }
+
+    public User getOwner() {
+        return owner;
+    }
+
+    public void setOwner(User owner) {
+        this.owner = owner;
+    }
+
+    public String getCarPlate() {
+        return carPlate;
+    }
+
+    public void setCarPlate(String carPlate) {
+        this.carPlate = carPlate;
+    }
+
+    public Collection<RouteListingDto> getAvailableRoutes() {
+        return availableRoutes;
+    }
+
+    public void setAvailableRoutes(Collection<RouteListingDto> availableRoutes) {
+        this.availableRoutes = availableRoutes;
+    }
+}
Index: src/main/java/com/tourMate/dto/TransportListingDto.java
===================================================================
--- src/main/java/com/tourMate/dto/TransportListingDto.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dto/TransportListingDto.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,135 @@
+package com.tourMate.dto;
+
+import com.tourMate.entities.Reviews;
+import com.tourMate.entities.Transport;
+import com.tourMate.entities.TransportRoute;
+
+import java.util.Collection;
+import java.util.Date;
+
+public class TransportListingDto {
+    private long transportAvailibleId;
+    private String from;
+    private String to;
+    private Date date;
+    private int freeSpace;
+    private Date time;
+    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) {
+        this.transportAvailibleId = transportAvailibleId;
+        this.from = from;
+        this.to = to;
+        this.date = date;
+        this.freeSpace = freeSpace;
+        this.time = time;
+        this.price = price;
+        this.routes = routes.stream().map(x -> x.getFrom()).distinct().skip(1).toList();
+        this.times = routes.stream().map(x -> x.getArrival()).distinct().skip(1).toList();
+        this.transport = transport;
+        this.transportRoutes = routes;
+        this.reviews = reviews;
+        this.averageScore = averageScore;
+    }
+
+    public long getTransportAvailibleId() {
+        return transportAvailibleId;
+    }
+
+    public void setTransportAvailibleId(long transportAvailibleId) {
+        this.transportAvailibleId = transportAvailibleId;
+    }
+
+    public String getFrom() {
+        return from;
+    }
+
+    public void setFrom(String from) {
+        this.from = from;
+    }
+
+    public String getTo() {
+        return to;
+    }
+
+    public void setTo(String to) {
+        this.to = to;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public int getFreeSpace() {
+        return freeSpace;
+    }
+
+    public void setFreeSpace(int freeSpace) {
+        this.freeSpace = freeSpace;
+    }
+
+    public Date getTime() {
+        return time;
+    }
+
+    public void setTime(Date time) {
+        this.time = time;
+    }
+
+    public double getPrice() {
+        return price;
+    }
+
+    public void setPrice(double price) {
+        this.price = price;
+    }
+
+    public Collection<String> getRoutes() {
+        return routes;
+    }
+
+    public void setRoutes(Collection<String> routes) {
+        this.routes = routes;
+    }
+
+    public Transport getTransport() {
+        return transport;
+    }
+
+    public void setTransport(Transport transport) {
+        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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/dto/TransportReservationUserDto.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,63 @@
+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 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(User user, TransportRoute transportRoute, Long transportId, Integer numPeople, String carBrand, String carType, User owner, Boolean reviewed) {
+        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 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/HotelRoomAvailable.java
===================================================================
--- src/main/java/com/tourMate/entities/HotelRoomAvailable.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/HotelRoomAvailable.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,85 @@
+package com.tourMate.entities;
+
+import jakarta.persistence.*;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+
+@Entity
+@Table(name= "HotelRoomsAvailable", schema = "public")
+public class HotelRoomAvailable {
+    private long hotelRoomAvailableId;
+    private HotelRoom hotelRoom;
+    @Temporal(TemporalType.DATE)
+    private Date dateFrom;
+    @Temporal(TemporalType.DATE)
+    private Date dateTo;
+    private Integer numberOfBeds;
+
+    public HotelRoomAvailable(HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds) {
+        this.hotelRoom = hotelRoom;
+        this.dateFrom = dateFrom;
+        this.dateTo = dateTo;
+        this.numberOfBeds = numberOfBeds;
+    }
+
+    public HotelRoomAvailable(Date dateFrom, Date dateTo, Integer numberOfBeds) {
+        this.dateFrom = dateFrom;
+        this.dateTo = dateTo;
+        this.numberOfBeds = numberOfBeds;
+    }
+
+
+    public HotelRoomAvailable() {
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name="hotel_room_available_id", unique = true,nullable = false)
+    public long getHotelRoomAvailableId() {
+        return hotelRoomAvailableId;
+    }
+
+    public void setHotelRoomAvailableId(long hotelRoomAvailableId) {
+        this.hotelRoomAvailableId = hotelRoomAvailableId;
+    }
+
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name = "room_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_roomavailable_kon_room"))
+    public HotelRoom getHotelRoom() {
+        return hotelRoom;
+    }
+
+    public void setHotelRoom(HotelRoom hotelRoomId) {
+        this.hotelRoom = hotelRoomId;
+    }
+
+    @Column(name="date_from", unique = false, nullable = false)
+    @NotNull
+    public Date getDateFrom() {
+        return dateFrom;
+    }
+
+    public void setDateFrom(Date dateFrom) {
+        this.dateFrom = dateFrom;
+    }
+    @Column(name="date_to", unique = false, nullable = false)
+    @NotNull
+    public Date getDateTo() {
+        return dateTo;
+    }
+
+    public void setDateTo(Date dateTo) {
+        this.dateTo = dateTo;
+    }
+
+    @Column(name="number_of_beds", unique = false, nullable = false)
+    @NotNull
+    public Integer getNumberOfBeds() {
+        return numberOfBeds;
+    }
+
+    public void setNumberOfBeds(Integer numberOfBeds) {
+        this.numberOfBeds = numberOfBeds;
+    }
+}
Index: src/main/java/com/tourMate/entities/HotelRoomReservations.java
===================================================================
--- src/main/java/com/tourMate/entities/HotelRoomReservations.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/HotelRoomReservations.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,102 @@
+package com.tourMate.entities;
+
+import jakarta.persistence.*;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+
+@Entity
+@Table(name= "HotelRoomsReserved", schema = "public")
+public class HotelRoomReservations {
+    private long hotelRoomReservedId;
+    private User user;
+    private HotelRoom hotelRoom;
+    @Temporal(TemporalType.DATE)
+    private Date dateFrom;
+    @Temporal(TemporalType.DATE)
+    private Date dateTo;
+    private Integer numberOfBeds;
+    Boolean reviewed;
+
+    public HotelRoomReservations(User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds) {
+        this.user = user;
+        this.hotelRoom = hotelRoom;
+        this.dateFrom = dateFrom;
+        this.dateTo = dateTo;
+        this.numberOfBeds = numberOfBeds;
+        this.reviewed = false;
+    }
+
+    public HotelRoomReservations() {
+
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name="hotel_room_reserved_id", unique = true,nullable = false)
+    public long getHotelRoomReservedId() {
+        return hotelRoomReservedId;
+    }
+
+    public void setHotelRoomReservedId(long hotelRoomAvailableId) {
+        this.hotelRoomReservedId = hotelRoomAvailableId;
+    }
+
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name = "room_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_roomres_kon_room"))
+    public HotelRoom getHotelRoom() {
+        return hotelRoom;
+    }
+
+    public void setHotelRoom(HotelRoom hotelRoomId) {
+        this.hotelRoom = hotelRoomId;
+    }
+
+    @Column(name="date_from", unique = false, nullable = false)
+    @NotNull
+    public Date getDateFrom() {
+        return dateFrom;
+    }
+
+    @OneToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name = "user_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_roomres_kon_user"))
+    public User getUser() {
+        return user;
+    }
+
+    public void setUser(User user) {
+        this.user = user;
+    }
+
+    public void setDateFrom(Date dateFrom) {
+        this.dateFrom = dateFrom;
+    }
+    @Column(name="date_to", unique = false, nullable = false)
+    @NotNull
+    public Date getDateTo() {
+        return dateTo;
+    }
+
+    public void setDateTo(Date dateTo) {
+        this.dateTo = dateTo;
+    }
+
+    @Column(name="number_of_beds", unique = false, nullable = false)
+    @NotNull
+    public Integer getNumberOfBeds() {
+        return numberOfBeds;
+    }
+
+    public void setNumberOfBeds(Integer numberOfBeds) {
+        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/Hotels.java
===================================================================
--- src/main/java/com/tourMate/entities/Hotels.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/Hotels.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,130 @@
+package com.tourMate.entities;
+
+import jakarta.persistence.*;
+import javax.validation.constraints.NotNull;
+import java.util.ArrayList;
+import java.util.Collection;
+
+@Entity
+@Table(name = "hotels",schema = "public")
+public class Hotels {
+    private long hotelId;
+    private String hotelName;
+    private String hotelDescripiton;
+    private String hotelLocation;
+    private String hotelEDBS;
+    private Boolean parking;
+    private Boolean petFriendly;
+    private Boolean internetAvailable;
+    private User owner;
+    private Collection<HotelRoom> hotelRooms = new ArrayList<>();
+
+    public Hotels(String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable, User ownerId) {
+        this.hotelName = hotelName;
+        this.hotelDescripiton = hotelDescripiton;
+        this.hotelLocation = hotelLocation;
+        this.hotelEDBS = hotelEDBS;
+        this.parking = parking;
+        this.petFriendly = petFriendly;
+        this.internetAvailable = internetAvailable;
+        this.owner = ownerId;
+    }
+
+    public Hotels() {
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "hotel_id", unique = true, nullable = false)
+    public long getHotelId(){return hotelId;}
+
+    public void setHotelId(long hotelId){this.hotelId=hotelId;}
+
+    @Column(name="hotel_name",unique = false,nullable = false)
+    @NotNull
+    public String getHotelName() {
+        return hotelName;
+    }
+
+    public void setHotelName(String hotelName) {
+        this.hotelName = hotelName;
+    }
+
+    @Column(name="hotel_description",unique = false,nullable = false)
+    @NotNull
+    public String getHotelDescripiton() {
+        return hotelDescripiton;
+    }
+
+    public void setHotelDescripiton(String hotelDescripiton) {
+        this.hotelDescripiton = hotelDescripiton;
+    }
+
+    @Column(name="hotel_location",unique = false,nullable = false)
+    @NotNull
+    public String getHotelLocation() {
+        return hotelLocation;
+    }
+
+    public void setHotelLocation(String hotelLocation) {
+        this.hotelLocation = hotelLocation;
+    }
+
+    @Column(name="hotel_edbs",unique = true,nullable = false)
+    @NotNull
+    public String getHotelEDBS() {
+        return hotelEDBS;
+    }
+
+    public void setHotelEDBS(String hotelEDBS) {
+        this.hotelEDBS = hotelEDBS;
+    }
+
+    @Column(name="hotel_parking",unique = false,nullable = false)
+    @NotNull
+    public Boolean getParking() {
+        return parking;
+    }
+
+    public void setParking(Boolean parking) {
+        this.parking = parking;
+    }
+
+    @Column(name="hotel_petfriendly",unique = false,nullable = false)
+    @NotNull
+    public Boolean getPetFriendly() {
+        return petFriendly;
+    }
+
+    public void setPetFriendly(Boolean petFriendly) {
+        this.petFriendly = petFriendly;
+    }
+    @Column(name="hotel_internet",unique = false, nullable = false)
+    @NotNull
+    public Boolean getInternetAvailable() {
+        return internetAvailable;
+    }
+
+    public void setInternetAvailable(Boolean internetAvailable) {
+        this.internetAvailable = internetAvailable;
+    }
+
+    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "hotel")
+    public Collection<HotelRoom> getHotelRooms() {
+        return hotelRooms;
+    }
+
+    public void setHotelRooms(Collection<HotelRoom> hotelRooms) {
+        this.hotelRooms = hotelRooms;
+    }
+
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name = "owner_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_hotel_kon_user"))
+    public User getOwner() {
+        return owner;
+    }
+
+    public void setOwner(User ownerId) {
+        this.owner = ownerId;
+    }
+}
Index: src/main/java/com/tourMate/entities/HotelsImages.java
===================================================================
--- src/main/java/com/tourMate/entities/HotelsImages.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/HotelsImages.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,52 @@
+package com.tourMate.entities;
+
+import jakarta.persistence.*;
+import org.jetbrains.annotations.NotNull;
+
+@Entity
+@Table(name = "HotelsImages", schema = "public")
+
+public class HotelsImages {
+    private long hotelImageID;
+    private Hotels hotel;
+    private String url;
+
+    public HotelsImages(Hotels hotel, String url) {
+        this.hotel = hotel;
+        this.url = url;
+    }
+
+    public HotelsImages() {
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "image_id", unique = true, nullable = false)
+    public long getHotelImageID() {
+        return hotelImageID;
+    }
+
+    public void setHotelImageID(long hotelImageID) {
+        this.hotelImageID = hotelImageID;
+    }
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "hotel_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_hotelimg_kon_hotel"))
+    public Hotels getHotel() {
+        return hotel;
+    }
+
+    public void setHotel(Hotels hotel) {
+        this.hotel = hotel;
+    }
+
+    @Column(name="image_url",unique = false,nullable = false)
+    @NotNull
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+}
Index: src/main/java/com/tourMate/entities/Menu.java
===================================================================
--- src/main/java/com/tourMate/entities/Menu.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/Menu.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,77 @@
+package com.tourMate.entities;
+
+import jakarta.persistence.*;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.jetbrains.annotations.NotNull;
+
+@Entity
+@Table(name = "menu", schema = "public")
+public class Menu {
+    private long menuId;
+    private String name;
+    private String ingredients;
+    private double price;
+    @JsonIgnore
+    private Restaurant restaurant;
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "restaurant_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_menu_kon_restoran"))
+    public Restaurant getRestaurant() {
+        return restaurant;
+    }
+
+    public void setRestaurant(Restaurant restaurant) {
+        this.restaurant = restaurant;
+    }
+
+
+    public Menu(String name, String ingredients, double price) {
+        this.name = name;
+        this.ingredients = ingredients;
+        this.price = price;
+    }
+
+    public Menu(){
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "mmenu_id", unique = true, nullable = false)
+    public long getMenuId() {
+        return menuId;
+    }
+
+    public void setMenuId(long menuId) {
+        this.menuId = menuId;
+    }
+
+    @Column(name = "name", unique = false, nullable = false)
+    @NotNull
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Column(name = "ingredients", unique = false, nullable = false)
+    @NotNull
+    public String getIngredients() {
+        return ingredients;
+    }
+
+    public void setIngredients(String ingredients) {
+        this.ingredients = ingredients;
+    }
+
+    @Column(name = "price", unique = false, nullable = false)
+    @NotNull
+    public double getPrice() {
+        return price;
+    }
+
+    public void setPrice(double price) {
+        this.price = price;
+    }
+}
Index: src/main/java/com/tourMate/entities/RestaurantImages.java
===================================================================
--- src/main/java/com/tourMate/entities/RestaurantImages.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/RestaurantImages.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,51 @@
+package com.tourMate.entities;
+
+import jakarta.persistence.*;
+import org.jetbrains.annotations.NotNull;
+
+
+@Entity
+@Table(name="restaurant_images",schema = "public")
+public class RestaurantImages {
+    private long imageId;
+    private Restaurant restaurant;
+    private String url;
+
+    public RestaurantImages(Restaurant restaurant, String url) {
+        this.restaurant = restaurant;
+        this.url = url;
+    }
+
+    public RestaurantImages() {
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name="image_id",unique = true,nullable = false)
+    public long getImageId() {
+        return imageId;
+    }
+
+    public void setImageId(long imageId) {
+        this.imageId = imageId;
+    }
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name="restaurant_id",unique = false,nullable = false,foreignKey = @ForeignKey(name = "fk_ref_od_restimg_kon_restoran"))
+    public Restaurant getRestaurant() {
+        return restaurant;
+    }
+    public void setRestaurant(Restaurant restaurant) {
+        this.restaurant = restaurant;
+    }
+
+    @Column(name="image_url",unique = false,nullable = false)
+    @NotNull
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+}
Index: src/main/java/com/tourMate/entities/RestaurantReservations.java
===================================================================
--- src/main/java/com/tourMate/entities/RestaurantReservations.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/RestaurantReservations.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,102 @@
+package com.tourMate.entities;
+
+import jakarta.persistence.*;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+
+@Entity
+@Table(name = "restaurant_reservations", schema = "public")
+public class RestaurantReservations {
+    private long reservationId;
+    private RestaurantsTable table;
+    @Temporal(TemporalType.TIME)
+    private Date timeFrom;
+    @Temporal(TemporalType.TIME)
+    private Date timeTo;
+    private int noSeats;
+    private User user;
+    private Boolean reviewed;
+
+    public RestaurantReservations(RestaurantsTable table, Date timeFrom, Date timeTo, int noSeats, User user) {
+        this.table = table;
+        this.timeFrom = timeFrom;
+        this.timeTo = timeTo;
+        this.noSeats = noSeats;
+        this.user = user;
+        this.reviewed = false;
+    }
+
+    public RestaurantReservations() {
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "restaurant_id",unique = true,nullable = false)
+    public long getReservationId() {
+        return reservationId;
+    }
+
+    public void setReservationId(long reservationId) {
+        this.reservationId = reservationId;
+    }
+
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name = "table_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_rezervacija_kon_masa"))
+    public RestaurantsTable getTable() {
+        return table;
+    }
+
+    public void setTable(RestaurantsTable table) {
+        this.table = table;
+    }
+
+    @Column(name="time_from",unique = false,nullable = false)
+    @NotNull
+    public Date getTimeFrom() {
+        return timeFrom;
+    }
+
+    public void setTimeFrom(Date timeFrom) {
+        this.timeFrom = timeFrom;
+    }
+
+    @Column(name="time_to",unique = false,nullable = false)
+    @NotNull
+    public Date getTimeTo() {
+        return timeTo;
+    }
+
+    @Column(name = "no_seats", unique = false, nullable = false)
+    @NotNull
+    public int getNoSeats() {
+        return noSeats;
+    }
+
+    public void setNoSeats(int noSeats) {
+        this.noSeats = noSeats;
+    }
+
+    public void setTimeTo(Date timeTo) {
+        this.timeTo = timeTo;
+    }
+
+    @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() {
+        return user;
+    }
+
+    public void setUser(User user) {
+        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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/RestaurantsAvailible.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,87 @@
+package com.tourMate.entities;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import jakarta.persistence.*;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+
+@Entity
+@Table(name = "restaurants_availible", schema = "public")
+public class RestaurantsAvailible {
+    private long restaurantAvailibleId;
+    private RestaurantsTable restaurantTable;
+    @Temporal(TemporalType.TIME)
+    private Date hourFrom;
+    @Temporal(TemporalType.TIME)
+    private Date hourTo;
+    private int numTables;
+
+    public RestaurantsAvailible(RestaurantsTable restaurantTable, Date hourFrom, Date hourTo, int numTables) {
+        this.restaurantTable = restaurantTable;
+        this.hourFrom = hourFrom;
+        this.hourTo = hourTo;
+        this.numTables = numTables;
+    }
+
+    public RestaurantsAvailible(RestaurantsTable restaurantsTable, Date hourFrom, Date hourTo) {
+        this.restaurantTable = restaurantsTable;
+        this.hourFrom = hourFrom;
+        this.hourTo = hourTo;
+    }
+
+    public RestaurantsAvailible() {
+
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "restaurant_table_available_id", unique = true, nullable = false)
+    public long getRestaurantAvailibleId() {
+        return restaurantAvailibleId;
+    }
+
+    public void setRestaurantAvailibleId(long restaurantAvailibleId) {
+        this.restaurantAvailibleId = restaurantAvailibleId;
+    }
+
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name = "table_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_tableavailable_kon_table"))
+    public RestaurantsTable getRestaurantTable() {
+        return restaurantTable;
+    }
+
+    public void setRestaurantTable(RestaurantsTable restaurantTable) {
+        this.restaurantTable = restaurantTable;
+    }
+
+    @Column(name = "hour_from", unique = false, nullable = false)
+    @NotNull
+    public Date getHourFrom() {
+        return hourFrom;
+    }
+
+    public void setHourFrom(Date hourFrom) {
+        this.hourFrom = hourFrom;
+    }
+
+    @Column(name = "hour_to", unique = false, nullable = false)
+    @NotNull
+    public Date getHourTo() {
+        return hourTo;
+    }
+
+    public void setHourTo(Date hourTo) {
+        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/RestaurantsTable.java
===================================================================
--- src/main/java/com/tourMate/entities/RestaurantsTable.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/RestaurantsTable.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,55 @@
+package com.tourMate.entities;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import jakarta.persistence.*;
+
+import javax.validation.constraints.NotNull;
+
+@Entity
+@Table(name = "restaurant_tables", schema = "public")
+public class RestaurantsTable {
+    private long tableId;
+    @JsonIgnore
+    private Restaurant restaurant;
+    private int noSeats;
+
+    public RestaurantsTable(Restaurant restaurant, int noSeats) {
+        this.restaurant = restaurant;
+        this.noSeats = noSeats;
+    }
+
+    public RestaurantsTable() {
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "table_id",unique = true,nullable = false)
+    public long getTableId() {
+        return tableId;
+    }
+
+    public void setTableId(long tableId) {
+        this.tableId = tableId;
+    }
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "restaurant_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_masi_kon_restorani"))
+    public Restaurant getRestaurant() {
+        return restaurant;
+    }
+
+    public void setRestaurant(Restaurant restaurant) {
+        this.restaurant = restaurant;
+    }
+
+    @Column(name="no_seats",unique = false,nullable = false)
+    @NotNull
+    public int getNoSeats() {
+        return noSeats;
+    }
+
+    public void setNoSeats(int noSeats) {
+
+        this.noSeats = noSeats;
+    }
+}
Index: src/main/java/com/tourMate/entities/Reviews.java
===================================================================
--- src/main/java/com/tourMate/entities/Reviews.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/Reviews.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,105 @@
+package com.tourMate.entities;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import jakarta.persistence.*;
+
+import javax.validation.constraints.NotNull;
+
+@Entity
+@Table(name="reviews", schema = "public")
+public class Reviews {
+    private long reviewId;
+    private String title;
+    private int numStar;
+    private String description;
+    @JsonIgnore
+    private Hotels hotel;
+    @JsonIgnore
+    private Restaurant restaurant;
+    @JsonIgnore
+    private Transport transport;
+
+    public Reviews(String title, int numStar, String description, Hotels hotel, Restaurant restaurant, Transport transport) {
+        this.title = title;
+        this.numStar = numStar;
+        this.description = description;
+        this.hotel = hotel;
+        this.restaurant = restaurant;
+        this.transport = transport;
+    }
+
+    public Reviews() {
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "review_id", unique = true, nullable = false)
+    public long getReviewId() {
+        return reviewId;
+    }
+
+    public void setReviewId(long reviewId) {
+        this.reviewId = reviewId;
+    }
+
+
+    @Column(name = "title", unique = false, nullable = false)
+    @NotNull
+    public String getTitle () {
+        return title;
+    }
+
+    public void setTitle(String title){
+        this.title = title;
+    }
+
+    @Column(name = "num_stars", unique = false, nullable = false)
+    @NotNull
+    public int getNumStar () {
+        return numStar;
+    }
+
+    public void setNumStar ( int numStar){
+        this.numStar = numStar;
+    }
+
+    @Column(name = "description", unique = false, nullable = false)
+    @NotNull
+    public String getDescription () {
+        return description;
+    }
+
+    public void setDescription (String description){
+        this.description = description;
+    }
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "hotel_id", unique = false, nullable = true, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_hotel"))
+    public Hotels getHotel () {
+        return hotel;
+    }
+
+    public void setHotel (Hotels hotel){
+        this.hotel = hotel;
+    }
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "restaurant_id", unique = false, nullable = true, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_restorani"))
+    public Restaurant getRestaurant () {
+        return restaurant;
+    }
+
+    public void setRestaurant (Restaurant restaurant){
+        this.restaurant = restaurant;
+    }
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "transport_id", unique = false, nullable = true, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_transport"))
+    public Transport getTransport () {
+        return transport;
+    }
+
+    public void setTransport (Transport transport){
+        this.transport = transport;
+    }
+}
Index: src/main/java/com/tourMate/entities/Token.java
===================================================================
--- src/main/java/com/tourMate/entities/Token.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/Token.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,89 @@
+package com.tourMate.entities;
+
+import jakarta.persistence.*;
+
+import java.time.LocalDateTime;
+
+@Entity
+public class Token {
+    private Long id;
+    private String token;
+    private LocalDateTime createdAt;
+    private LocalDateTime expiresAt;
+
+    private LocalDateTime confirmedAt;
+    @ManyToOne(cascade = CascadeType.ALL)
+    @JoinColumn(name = "user_id", foreignKey = @ForeignKey(name = "fk_ref_od_token_kon_user"))
+    private User user;
+
+    public Token(String token, LocalDateTime createdAt, LocalDateTime expiresAt, User user) {
+        this.token = token;
+        this.createdAt = createdAt;
+        this.expiresAt = expiresAt;
+        this.user = user;
+    }
+
+    public Token() {
+
+    }
+
+    @SequenceGenerator(name = "confirmation_token_sequence",
+            sequenceName = "confirmation_token_sequence",
+            allocationSize = 1
+    )
+    @Id
+    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "confirmation_token_sequence")
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    @Column(name = "token", nullable = false)
+    public String getToken() {
+        return token;
+    }
+
+    public void setToken(String token) {
+        this.token = token;
+    }
+
+    @Column(name = "created_at", nullable = false)
+    public LocalDateTime getCreatedAt() {
+        return createdAt;
+    }
+
+    public void setCreatedAt(LocalDateTime createdAt) {
+        this.createdAt = createdAt;
+    }
+
+    @Column(name = "expires_at", nullable = false)
+    public LocalDateTime getExpiresAt() {
+        return expiresAt;
+    }
+
+    public void setExpiresAt(LocalDateTime expiresAt) {
+        this.expiresAt = expiresAt;
+    }
+
+    @Column(name = "confirmed_at", nullable = false)
+    public LocalDateTime getConfirmedAt() {
+        return confirmedAt;
+    }
+
+    public void setConfirmedAt(LocalDateTime confirmedAt) {
+        this.confirmedAt = confirmedAt;
+    }
+
+    @ManyToOne()
+    @JoinColumn(name = "user_id")
+    public User getUser() {
+        return user;
+    }
+
+    public void setUser(User user) {
+        this.user = user;
+    }
+}
Index: src/main/java/com/tourMate/entities/Transport.java
===================================================================
--- src/main/java/com/tourMate/entities/Transport.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/Transport.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,165 @@
+package com.tourMate.entities;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import jakarta.persistence.*;
+
+import javax.validation.constraints.NotNull;
+import java.util.Collection;
+
+@Entity
+@Table(name = "transport", schema = "public")
+public class Transport {
+    private long transportID;
+    private String transportName;
+    private String carBrand;
+    private String carType;
+    private int carManufacturedYear;
+    private int noPassengers;
+    private int noBags;
+    private long EMBG;
+    private User owner;
+    private String carPlate;
+
+    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "transport")
+    public Collection<TransportAvailible> getAvailableRoutes() {
+        return availableRoutes;
+    }
+
+    public void setAvailableRoutes(Collection<TransportAvailible> availableRoutes) {
+        this.availableRoutes = availableRoutes;
+    }
+
+    @JsonIgnore
+    private Collection<TransportAvailible> availableRoutes;
+
+    public Transport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long embg, User owner, String carPlate) {
+
+        this.transportName=transportName;
+        this.carBrand=carBrand;
+        this.carType=carType;
+        this.carManufacturedYear=carManufacturedYear;
+        this.noPassengers=noPassengers;
+        this.noBags=noBags;
+        this.EMBG=EMBG;
+        this.owner=owner;
+        this.carPlate=carPlate;
+    }
+
+    public Transport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long embg, String carPlate) {
+
+        this.transportName=transportName;
+        this.carBrand=carBrand;
+        this.carType=carType;
+        this.carManufacturedYear=carManufacturedYear;
+        this.noPassengers=noPassengers;
+        this.noBags=noBags;
+        this.EMBG=embg;
+        this.carPlate=carPlate;
+    }
+
+
+    public Transport() {
+
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "transport_id", unique = true, nullable = false)
+    public long getTransportID() {
+        return transportID;
+    }
+
+    public void setTransportID(long transportID) {
+        this.transportID = transportID;
+    }
+
+    @Column(name="transport_name",unique = false,nullable = false)
+    @NotNull
+    public String getTransportName() {
+        return transportName;
+    }
+
+    public void setTransportName(String transportName) {
+        this.transportName = transportName;
+    }
+
+    @Column(name = "car_brand", unique = false, nullable = false)
+    @NotNull
+    public String getCarBrand() {
+        return carBrand;
+    }
+
+    public void setCarBrand(String carBrand) {
+        this.carBrand = carBrand;
+    }
+    
+    @Column(name = "car_type", unique = false, nullable = false)
+    @NotNull
+    public String getCarType() {
+        return carType;
+    }
+
+    public void setCarType(String carType) {
+        this.carType = carType;
+    }
+
+    @Column(name = "car_manufactured_year", unique = false, nullable = false)
+    @NotNull
+    public int getCarManufacturedYear() {
+        return carManufacturedYear;
+    }
+
+    public void setCarManufacturedYear(int carManufacturedYear) {
+        this.carManufacturedYear = carManufacturedYear;
+    }
+
+    @Column(name = "no_passengers", unique = false, nullable = false)
+    @NotNull
+    public int getNoPassengers() {
+        return noPassengers;
+    }
+
+    public void setNoPassengers(int noPassengers) {
+        this.noPassengers = noPassengers;
+    }
+
+    @Column(name = "no_bags", unique = false, nullable = false)
+    @NotNull
+    public int getNoBags() {
+        return noBags;
+    }
+
+    public void setNoBags(int noBags) {
+        this.noBags = noBags;
+    }
+
+    @Column(name = "embg", unique = false, nullable = false)
+    @NotNull
+    public long getEMBG() {
+        return EMBG;
+    }
+
+    public void setEMBG(long EMBG) {
+        this.EMBG = EMBG;
+    }
+
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name = "owner_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_prevoz_kon_korisnik"))
+    public User getOwner() {
+        return owner;
+    }
+
+    public void setOwner(User owner) {
+        this.owner = owner;
+    }
+
+    @Column(name = "car_plate", unique = false, nullable = false)
+    @NotNull
+    public String getCarPlate() {
+        return carPlate;
+    }
+
+    public void setCarPlate(String carPlate) {
+        this.carPlate = carPlate;
+    }
+}
Index: src/main/java/com/tourMate/entities/TransportAvailible.java
===================================================================
--- src/main/java/com/tourMate/entities/TransportAvailible.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/TransportAvailible.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,129 @@
+package com.tourMate.entities;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import jakarta.persistence.*;
+
+import javax.validation.constraints.NotNull;
+import java.util.Collection;
+import java.util.Date;
+
+@Entity
+@Table(name = "transport_availible", schema = "public")
+public class TransportAvailible {
+    private long transportAvailibleId;
+    @JsonIgnore
+    private Transport transport;
+    private String from;
+    private String to;
+    @Temporal(TemporalType.DATE)
+    private Date date;
+    private int freeSpace;
+    @Temporal(TemporalType.TIME)
+    private Date time;
+    private Collection<TransportRoute> routes;
+
+    public TransportAvailible(Transport transport, String from, String to, Date date, int freeSpace, Date time, Collection<TransportRoute> routes) {
+        this.transport = transport;
+        this.from = from;
+        this.to = to;
+        this.date = date;
+        this.freeSpace = freeSpace;
+        this.time = time;
+        this.routes = routes;
+    }
+
+
+    public TransportAvailible(Transport transport, String from, String to, Date date, int freeSpace, Date time) {
+        this.transport = transport;
+        this.from = from;
+        this.to = to;
+        this.date = date;
+        this.freeSpace = freeSpace;
+        this.time = time;
+    }
+
+    public TransportAvailible() {
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name="transport_available_id", unique = true,nullable = false)
+    public long getTransportAvailibleId() {
+        return transportAvailibleId;
+    }
+
+    public void setTransportAvailibleId(long transportAvailibleId) {
+        this.transportAvailibleId = transportAvailibleId;
+    }
+
+    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "parentRoute")
+    public Collection<TransportRoute> getRoutes() {
+        return routes;
+    }
+
+    public void setRoutes(Collection<TransportRoute> routes) {
+        this.routes = routes;
+    }
+
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name = "transport_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_transportavailable_kon_transport"))
+    public Transport getTransport() {
+        return transport;
+    }
+
+    public void setTransport(Transport transport) {
+        this.transport = transport;
+    }
+
+    @Column(name="from_dest", unique = false, nullable = false)
+    @NotNull
+    public String getFrom() {
+        return from;
+    }
+
+    public void setFrom(String from) {
+        this.from = from;
+    }
+
+    @Column(name="to_dest", unique = false, nullable = false)
+    @NotNull
+    public String getTo() {
+        return to;
+    }
+
+    public void setTo(String to) {
+        this.to = to;
+    }
+
+
+    @Column(name="date", unique = false, nullable = false)
+    @NotNull
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    @Column(name="free_space", unique = false, nullable = false)
+    @NotNull
+    public int getFreeSpace() {
+        return freeSpace;
+    }
+
+    public void setFreeSpace(int freeSpace) {
+        this.freeSpace = freeSpace;
+    }
+
+    @Column(name="time", unique = false, nullable = false)
+    @NotNull
+    public Date getTime() {
+        return time;
+    }
+
+    public void setTime(Date time) {
+        this.time = time;
+    }
+}
Index: src/main/java/com/tourMate/entities/TransportReservation.java
===================================================================
--- src/main/java/com/tourMate/entities/TransportReservation.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/TransportReservation.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,80 @@
+package com.tourMate.entities;
+
+import jakarta.persistence.*;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.Date;
+
+@Entity
+@Table(name = "TransportReservation", schema = "public")
+public class TransportReservation {
+    private long reservationID;
+    private TransportRoute transportRoute;
+    private Integer noSeats;
+    private User user;
+    private Boolean reviewed;
+
+    public TransportReservation(TransportRoute transportRoute, Integer noSeats, User user) {
+        this.transportRoute = transportRoute;
+        this.noSeats = noSeats;
+        this.user = user;
+        this.reviewed = false;
+    }
+
+    public TransportReservation() {
+    }
+
+    @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;
+    }
+
+    public void setTransportRoute(TransportRoute transportRoute) {
+        this.transportRoute = transportRoute;
+    }
+
+    public void setNoSeats(Integer noSeats) {
+        this.noSeats = noSeats;
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "transport_reservation_id", unique = true, nullable = false)
+    public long getReservationID() {
+        return reservationID;
+    }
+
+    public void setReservationID(long reservationID) {
+        this.reservationID = reservationID;
+    }
+
+    @Column(name = "no_seats", unique = false, nullable = false)
+    @NotNull
+    public int getNoSeats() {
+        return noSeats;
+    }
+
+    public void setNoSeats(int noSeats) {
+        this.noSeats = noSeats;
+    }
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "user_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_rezervacii_prevoz_kon_korisnici"))
+    public User getUser() {
+        return user;
+    }
+
+    public void setUser(User user) {
+        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/TransportRoute.java
===================================================================
--- src/main/java/com/tourMate/entities/TransportRoute.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/TransportRoute.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,141 @@
+package com.tourMate.entities;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import jakarta.persistence.*;
+import org.jetbrains.annotations.NotNull;
+import org.springframework.boot.rsocket.server.RSocketServer;
+import org.springframework.core.SpringVersion;
+
+import java.util.Date;
+
+@Entity
+@Table(name = "transport_route", schema = "public")
+public class TransportRoute {
+    private long routeId;
+    @JsonIgnore
+    private TransportAvailible parentRoute;
+    private String from;
+    private String to;
+    private double price;
+    @Temporal(TemporalType.TIMESTAMP)
+    private Date departure;
+    @Temporal(TemporalType.TIMESTAMP)
+    private Date arrival;
+    private int freeSpace;
+    private int order;
+
+    public TransportRoute(TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order) {
+        this.parentRoute = parentRoute;
+        this.from = from;
+        this.to = to;
+        this.price = price;
+        this.departure = departure;
+        this.arrival = arrival;
+        this.freeSpace = freeSpace;
+        this.order = order;
+    }
+
+    public TransportRoute(String from, String to, double price, Date departure, Date arrival, int freeSpace, int order) {
+        this.from = from;
+        this.to = to;
+        this.price = price;
+        this.departure = departure;
+        this.arrival = arrival;
+        this.freeSpace = freeSpace;
+        this.order = order;
+    }
+
+    public TransportRoute(){
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name="transport_route_id", unique = true, nullable = false)
+    public long getRouteId() {
+        return routeId;
+    }
+
+    public void setRouteId(long routeId) {
+        this.routeId = routeId;
+    }
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "transport_available_Id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_popatni_ruti_kon_parent_ruti"))
+    public TransportAvailible getParentRoute() {
+        return parentRoute;
+    }
+
+    public void setParentRoute(TransportAvailible parentRoute) {
+        this.parentRoute = parentRoute;
+    }
+
+    @Column(name = "from_location", unique = false, nullable = false)
+    @NotNull
+    public String getFrom() {
+        return from;
+    }
+
+    public void setFrom(String from) {
+        this.from = from;
+    }
+
+    @Column(name = "toLocation", unique = false, nullable = false)
+    @NotNull
+    public String getTo() {
+        return to;
+    }
+
+    public void setTo(String to) {
+        this.to = to;
+    }
+
+    @Column(name = "price", unique = false, nullable = false)
+    @NotNull
+    public double getPrice() {
+        return price;
+    }
+
+    public void setPrice(double price) {
+        this.price = price;
+    }
+
+    @Column(name = "date_departure", unique = false, nullable = false)
+    @NotNull
+    public Date getDeparture() {
+        return departure;
+    }
+
+    public void setDeparture(Date departure) {
+        this.departure = departure;
+    }
+
+    @Column(name = "date_arrival", unique = false, nullable = false)
+    @NotNull
+    public Date getArrival() {
+        return arrival;
+    }
+
+    public void setArrival(Date arrival) {
+        this.arrival = arrival;
+    }
+
+    @Column(name = "num_free_seats", unique = false, nullable = false)
+    @NotNull
+    public int getFreeSpace() {
+        return freeSpace;
+    }
+
+    public void setFreeSpace(int freeSpace) {
+        this.freeSpace = freeSpace;
+    }
+
+    @Column(name = "city_order", unique = false, nullable = false)
+    @NotNull
+    public int getOrder() {
+        return order;
+    }
+
+    public void setOrder(int order) {
+        this.order = order;
+    }
+}
Index: src/main/java/com/tourMate/entities/User.java
===================================================================
--- src/main/java/com/tourMate/entities/User.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/entities/User.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,211 @@
+package com.tourMate.entities;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import jakarta.persistence.*;
+import org.jetbrains.annotations.NotNull;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
+//import org.springframework.security.core.GrantedAuthority;
+//import org.springframework.security.core.authority.SimpleGrantedAuthority;
+//import org.springframework.security.core.userdetails.UserDetails;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+
+@Entity
+@Table(name = "users", schema = "public")
+public class User implements UserDetails {
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "user_id", unique = true, nullable = false)
+    private long userID;
+
+    @Column(name = "name", unique = false, nullable = false)
+    @NotNull
+    private String name;
+
+    @Column(name = "surname", unique = false, nullable = false)
+    private String surname;
+
+    @Column(name = "email", unique = true, nullable = false)
+    @NotNull
+    private String email;
+
+    @Column(name = "password", unique = true, nullable = false)
+    @NotNull
+    private String password;
+
+    @Column(name = "birth_date", unique = false, nullable = false)
+    @NotNull
+    private Date birthDate;
+
+    @Column(name = "address", unique = false, nullable = false)
+    private String address;
+
+    @Column(name = "contact", unique = false, nullable = false)
+    private String contact;
+
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name = "role_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_user_kon_role"))
+    private Role role;
+    @Column(name = "locked", unique = false, nullable = false)
+    boolean locked = false;
+
+    @Column(name = "enabled", unique = false, nullable = false)
+    boolean enabled;
+
+
+    public User(@NotNull String name, String surname, @NotNull String email, @NotNull String password, @NotNull Date birthDate, String address, String contact, Role role) {
+        this.name = name;
+        this.surname = surname;
+        this.email = email;
+        this.password = password;
+        this.birthDate = birthDate;
+        this.address = address;
+        this.contact = contact;
+        this.role = role;
+    }
+
+    public User(@NotNull String name, String surname, @NotNull String email, @NotNull String password, @NotNull Date birthDate, String address, String contact) {
+        this.name = name;
+        this.surname = surname;
+        this.email = email;
+        this.password = password;
+        this.birthDate = birthDate;
+        this.address = address;
+        this.contact = contact;
+    }
+
+    public User(long userID, @NotNull String name, String surname, @NotNull String email, @NotNull String password, @NotNull Date birthDate, String address, String contact, Role role, boolean locked, boolean enabled) {
+        this.userID = userID;
+        this.name = name;
+        this.surname = surname;
+        this.email = email;
+        this.password = password;
+        this.birthDate = birthDate;
+        this.address = address;
+        this.contact = contact;
+        this.role = role;
+        this.locked = locked;
+        this.enabled = enabled;
+    }
+
+    public User() {
+    }
+
+
+    public long getUserID() {
+        return userID;
+    }
+
+    public void setUserID(long userID) {
+        this.userID = userID;
+    }
+
+    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;
+    }
+
+
+    public Role getRole() {
+        return role;
+    }
+
+    public boolean isEnabled() {
+        return enabled;
+    }
+
+    @Override
+    @JsonIgnore
+    public Collection<? extends GrantedAuthority> getAuthorities() {
+        SimpleGrantedAuthority authority = new SimpleGrantedAuthority(role.getRoleName());
+        return Collections.singleton(authority);
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    @Override
+    public String getUsername() {
+        return email;
+    }
+
+    @Override
+    public boolean isAccountNonExpired() {
+        return true;
+    }
+
+    @Override
+    public boolean isAccountNonLocked() {
+        return locked;
+    }
+
+    @Override
+    public boolean isCredentialsNonExpired() {
+        return true;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public Date getBirthDate() {
+        return birthDate;
+    }
+
+    public void setBirthDate(Date birthDate) {
+        this.birthDate = birthDate;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getContact() {
+        return contact;
+    }
+
+    public void setContact(String contact) {
+        this.contact = contact;
+    }
+
+    public void setRole(Role role) {
+        this.role = role;
+    }
+
+    public void setLocked(boolean locked) {
+        this.locked = locked;
+    }
+
+    public void setEnabled(boolean enabled) {
+        this.enabled = enabled;
+    }
+}
Index: src/main/java/com/tourMate/services/BusinessManager.java
===================================================================
--- src/main/java/com/tourMate/services/BusinessManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/BusinessManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,16 @@
+package com.tourMate.services;
+import com.tourMate.entities.Business;
+import com.tourMate.entities.User;
+
+import java.util.List;
+
+public interface BusinessManager {
+    public void createBusiness(Business business, long userId);
+    public List<Business> getUnapprovedBusinessesOfUser(long userId);
+    public void deleteBusiness(long businessId);
+    public List<Business> getUnapprovedBusinesses();
+    public void approveBusiness(Long businessId);
+    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);
+}
Index: src/main/java/com/tourMate/services/HotelManager.java
===================================================================
--- src/main/java/com/tourMate/services/HotelManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/HotelManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,55 @@
+package com.tourMate.services;
+
+import com.tourMate.dto.HotelDto;
+import com.tourMate.dto.HotelReservationDto;
+import com.tourMate.dto.HotelReservationUserDto;
+import com.tourMate.entities.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+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 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(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 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);
+    public void deleteRoomAvailible(long hotelRoomAvailableId);
+    public HotelRoomAvailable findAvailibleRoomById(long hotelRoomAvailableId);
+    public List<HotelRoomAvailable> getRoomsAvailibility();
+    public List<HotelRoomAvailable> getRoomsAvailableById(Long id);
+    public List<HotelRoomAvailable> getRoomsAvailibilityByHotel(Hotels hotel);
+    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);
+}
Index: src/main/java/com/tourMate/services/ImageManager.java
===================================================================
--- src/main/java/com/tourMate/services/ImageManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/ImageManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,9 @@
+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/MenuManager.java
===================================================================
--- src/main/java/com/tourMate/services/MenuManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/MenuManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,13 @@
+package com.tourMate.services;
+
+import com.tourMate.entities.Menu;
+
+import java.util.List;
+
+public interface MenuManager {
+    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/services/RestaurantManager.java
===================================================================
--- src/main/java/com/tourMate/services/RestaurantManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/RestaurantManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,63 @@
+package com.tourMate.services;
+
+import com.tourMate.dto.RestaurantDto;
+import com.tourMate.dto.RestaurantReservationUserDto;
+import com.tourMate.entities.*;
+
+import java.util.Date;
+import java.util.List;
+
+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);
+    void deleteHotel(long restaurantID);
+
+    public List<Restaurant> getRestaurants();
+    public Restaurant findRestaurantByID (long restaurantID);
+    public void addRestaurantImage(Long restaurant, List<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);
+    public List<RestaurantsTable> getRestaurantTables(long restaurantID);
+    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);
+
+    public void editTableAvailable(long tableId, Restaurant restaurant, int noSeats);
+    public void deleteTableAvailable(long tableId);
+    public List<RestaurantsTable> getTablesAvailability();
+    public List<RestaurantsAvailible> getTablesAvailabilityById(Long id);
+    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();
+
+    List<RestaurantReservations> findAvailableReservationByID(long reservationId);
+
+    public List<RestaurantReservations> findReservationByUser(User user);
+    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);
+}
Index: src/main/java/com/tourMate/services/ReviewManager.java
===================================================================
--- src/main/java/com/tourMate/services/ReviewManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/ReviewManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,23 @@
+package com.tourMate.dao;
+
+import com.tourMate.entities.Hotels;
+import com.tourMate.entities.Restaurant;
+import com.tourMate.entities.Reviews;
+import com.tourMate.entities.Transport;
+import java.util.List;
+
+public interface ReviewManager{
+
+    public void createReview(String title, int numStar, String description, Long hotel, Long restaurant, Long transport);
+    public void deleteReview(long id);
+    public Reviews findReviewById(long id);
+    public void editReview(long id, String title, String description, int numStar, Hotels hotel, Restaurant restaurant, Transport transport);
+    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/services/TokenManager.java
===================================================================
--- src/main/java/com/tourMate/services/TokenManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/TokenManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/TransportManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,66 @@
+package com.tourMate.services;
+
+import com.tourMate.dto.RouteListingDto;
+import com.tourMate.dto.TransportDto;
+import com.tourMate.dto.TransportListingDto;
+import com.tourMate.dto.TransportReservationUserDto;
+import com.tourMate.entities.*;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
+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 deleteTransport(long transportId);
+
+    public List<Transport> getTransports();
+    public List<TransportDto> getTransportsByUser(long userId);
+    public List<RouteListingDto> getRoutesForTransport(long transportId);
+
+    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 TransportReservation findTransportReservationByID(long reservationID);
+
+    public List<TransportReservation> getTransportReservations();
+
+    public TransportAvailible findTransportAvailableByID (long reservationID);
+    public Transport getTransportById(long transportId);
+
+    List<Reviews> getReviewsForTransport(long transportId);
+
+    public List<TransportListingDto> getTransportsAvailableByFilters (String from, String to, Date date, int numPassengers);
+
+    public List<TransportReservation> getTransportsReservationsByUserID(long userID);
+
+    public List<TransportAvailible> getTransportsAvailable();
+
+    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);
+
+    public void deleteTransportReservation(long reservationID);
+
+    public void deleteTransportAvailable(long availableID);
+
+    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);
+
+
+    List<TransportReservationUserDto> findValidTransportReservationsByUser(Long userId);
+
+    List<TransportReservationUserDto> findPastTransportReservationsByUser(Long userId);
+}
+
Index: src/main/java/com/tourMate/services/UsersManager.java
===================================================================
--- src/main/java/com/tourMate/services/UsersManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/UsersManager.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,20 @@
+package com.tourMate.services;
+
+import com.tourMate.entities.User;
+
+import java.util.Date;
+import java.util.List;
+
+public interface UsersManager {
+    public void createUser(String name, String surname, String email, Date birthDate, String address, String contact);
+
+    public void deleteUser(long userID);
+
+    public List<User> getCreatedUsers();
+
+    public User findUserByID(long userID);
+
+    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);
+}
Index: src/main/java/com/tourMate/services/impl/BusinessManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/BusinessManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/impl/BusinessManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,61 @@
+package com.tourMate.services.impl;
+
+import com.tourMate.dao.BusinessDao;
+import com.tourMate.entities.Business;
+import com.tourMate.entities.User;
+import com.tourMate.services.BusinessManager;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+import java.util.List;
+
+@Service
+public class BusinessManagerImpl implements BusinessManager {
+
+    @Autowired
+    BusinessDao businessDao;
+
+    @Override
+    public void createBusiness(Business business, long userId) {
+        businessDao.createBusiness(business, userId);
+    }
+
+    @Override
+    public List<Business> getUnapprovedBusinessesOfUser(long userId) {
+        return businessDao.getUnapprovedBusinessesOfUser(userId);
+    }
+
+    @Override
+    public void deleteBusiness(long businessId) {
+        businessDao.deleteBusiness(businessId);
+
+    }
+
+    @Override
+    public List<Business> getUnapprovedBusinesses() {
+        return businessDao.getUnapprovedBusinesses();
+    }
+
+    @Override
+    public void approveBusiness(Long businessId) {
+        Business b = findBusinessById(businessId);
+        businessDao.approveBusiness(b);
+    }
+
+    @Override
+    public boolean hasBusiness(long userId){
+        return businessDao.hasBusiness(userId);
+    }
+
+    @Override
+    public Business findBusinessById(long businessId) {
+        return businessDao.findBusinessById(businessId);
+    }
+
+    @Override
+    public void editBusiness(long businessId, String name, String phone, String address, String edbs, User user, boolean approved) {
+        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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/impl/HotelManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,295 @@
+package com.tourMate.services.impl;
+
+import com.tourMate.dao.HotelDao;
+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 org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.time.Duration;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@Service
+public class HotelManagerImpl implements HotelManager {
+
+    @Autowired
+    HotelDao hotelDao;
+    @Autowired
+    UsersDao usersDao;
+
+
+    @Override
+    public void createHotel(String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable) {
+
+    }
+
+    @Override
+    public void createHotel(Hotels hotels, long userId) {
+        hotelDao.createHotel(hotels, userId);
+    }
+
+
+    @Override
+    public List<Hotels> getHotels() {
+        List<Hotels> hoteli = hotelDao.getHotels();
+        return hotelDao.getHotels();
+    }
+
+    @Override
+    public List<Hotels> getHotelsForUser(long userId) {
+        return hotelDao.getHotelsForUser(userId);
+    }
+
+    @Override
+    public List<Hotels> getHotelsByLocation(String hotelLocation) {
+        return hotelDao.getHotelsByLocation(hotelLocation);
+    }
+
+    @Override
+    public void editHotel(long hotelId, String hotelName, String hotelDescripiton, String hotelLocation, String hotelEDBS, Boolean parking, Boolean petFriendly, Boolean internetAvailable) {
+        hotelDao.editHotel(hotelId, hotelName, hotelDescripiton, hotelLocation, hotelEDBS, parking, petFriendly, internetAvailable);
+    }
+
+    @Override
+    public void deleteHotel(long hotelId) {
+        hotelDao.deleteHotel(hotelId);
+    }
+
+    @Override
+    public Hotels findHotelByID(long hotelId) {
+      return hotelDao.findHotelByID(hotelId);
+    }
+
+    @Override
+    public List<HotelsImages> getHotelImages(Long hotelId) {
+        Hotels h = hotelDao.findHotelByID(hotelId);
+        return hotelDao.getHotelImages(h);
+    }
+
+    @Override
+    public List<HotelRoom> getRoomsOfHotel(long hotelId) {
+        return hotelDao.getRoomsOfHotel(hotelId);
+    }
+
+    @Override
+    public HotelRoom findRoomById(long hotelRoomId) {
+        return hotelDao.findRoomById(hotelRoomId);
+    }
+
+    @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)
+    {
+        Hotels h = findHotelByID(hotel);
+        url.stream().map(file -> new HotelsImages(h, file)).forEach(x -> hotelDao.addHotelImage(x));
+    }
+
+    @Override
+    public void deleteHotelImage(long hotelImageId){
+        hotelDao.deleteHotelImage(hotelImageId);
+    }
+
+    @Override
+    public HotelsImages findHotelImageById(long hotelImageId) {
+        return hotelDao.findHotelImageById(hotelImageId);
+    }
+
+    @Override
+    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds) {
+        hotelDao.createRoom(hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price, numOfBeds);
+    }
+
+    @Override
+    public void editRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
+        hotelDao.editRoom(hotelRoomId, hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price);
+    }
+
+    @Override
+    public void deleteRoom(long hotelRoomId) {
+        hotelDao.deleteRoom(hotelRoomId);
+    }
+
+
+    @Override
+    public List<HotelRoomAvailable> getRoomsAvailableById(Long id) {
+        return hotelDao.getRoomsAvailable(id);
+    }
+
+    @Override
+    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) {
+        hotelDao.editRoomAvailible(hotelRoomAvailableId, hotelRoom, dateFrom, dateTo, numberOfBeds);
+    }
+
+    @Override
+    public void editRoomAvailibleReservation(Long HotelRoomAvailableId, Long hotelRoomId, Date from, Date to, int numberOfBeds){
+        HotelRoomAvailable roomAvailable = hotelDao.findAvailibleRoomById(HotelRoomAvailableId);
+        roomAvailable.setNumberOfBeds(numberOfBeds-1);
+        HotelRoom room = hotelDao.findRoomById(hotelRoomId);
+        hotelDao.createRoomAvailible(room, roomAvailable.getDateFrom(), from, 1);
+        hotelDao.createRoomAvailible(room, to, roomAvailable.getDateTo(), 1);
+    }
+
+    @Override
+    public void deleteRoomAvailible(long hotelRoomAvailableId) {
+        hotelDao.deleteRoomAvailible(hotelRoomAvailableId);
+    }
+
+    @Override
+    public HotelRoomAvailable findAvailibleRoomById(long hotelRoomAvailableId) {
+        return hotelDao.findAvailibleRoomById(hotelRoomAvailableId);
+    }
+
+    @Override
+    public List<HotelRoomAvailable> getRoomsAvailibility() {
+        return hotelDao.getRoomsAvailibility();
+    }
+
+    @Override
+    public List<HotelRoomAvailable> getRoomsAvailibilityByHotel(Hotels hotel) {
+       return hotelDao.getRoomsAvailibilityByHotel(hotel);
+    }
+
+    @Override
+    public List<HotelDto> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds) {
+        long numberOfNights = Duration.between(dateFrom.toInstant(), dateTo.toInstant()).toDays();
+        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()
+                .map(x -> new HotelDto(
+                        x.getHotelId(),
+                        x.getHotelName(),
+                        x.getHotelDescripiton(),
+                        x.getHotelLocation(),
+                        x.getHotelEDBS(),
+                        x.getParking(),
+                        x.getPetFriendly(),
+                        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())
+                )).toList();
+        return hotelsList;
+        //return hotelDao.getRoomsAvailibilityByDateAndLocation(hotelLocation, dateFrom, dateTo, numberOfBeds);
+    }
+
+    @Override
+    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);
+        hotelDao.createReservation(user, room, dateFrom, dateTo, numberOfBeds);
+        editRoomAvailibleReservation(hotelRoomAvailableId, hotelRoomId, dateFrom, dateTo, numberOfBeds);
+    }
+
+    @Override
+    public void editReservation(long hotelRoomReservedId, User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds) {
+        hotelDao.editReservation(hotelRoomReservedId, user, hotelRoom, dateFrom, dateTo, numberOfBeds);
+    }
+
+    @Override
+    public void deleteReservation(long hotelRoomReservedId) {
+        hotelDao.deleteReservation(hotelRoomReservedId);
+    }
+
+    @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.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 HotelRoomReservations findReservationById(long hotelRoomReservedId) {
+        return hotelDao.findReservationById(hotelRoomReservedId);
+    }
+
+    @Override
+    public List<HotelRoomReservations> findReservationByUser(User user) {
+        return hotelDao.findReservationByUser(user);
+    }
+
+    @Override
+    public List<HotelRoomReservations> findReservationByHotel(Hotels hotel) {
+        return hotelDao.findReservationByHotel(hotel);
+    }
+
+    @Override
+    public List<HotelRoomReservations> getReservations() {
+        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.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));
+    }
+}
Index: src/main/java/com/tourMate/services/impl/ImageManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/ImageManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/impl/ImageManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,61 @@
+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);
+        }
+
+        return filesToAdd;
+    }
+}
Index: src/main/java/com/tourMate/services/impl/MenuManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/MenuManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/impl/MenuManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,41 @@
+package com.tourMate.services.impl;
+
+import com.tourMate.entities.Menu;
+import com.tourMate.services.MenuManager;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.tourMate.dao.MenuDao;
+
+import java.util.List;
+
+@Service
+public class MenuManagerImpl implements MenuManager {
+
+    @Autowired
+    MenuDao menuDao;
+
+    @Override
+    public void createMenu(String name, String ingredients, double price) {
+        menuDao.createMenu(name, ingredients, price);
+    }
+
+    @Override
+    public void deleteMenu(long menuId) {
+        menuDao.deleteMenu(menuId);
+    }
+
+    @Override
+    public List<Menu> getCreatedMenus() {
+        return menuDao.getCreatedMenus();
+    }
+
+    @Override
+    public Menu findMenuById(long menuId) {
+        return menuDao.findMenuById(menuId);
+    }
+
+    @Override
+    public void editMenu(long menuId, String name, String ingredients, double price) {
+        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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/impl/RestaurantManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,295 @@
+package com.tourMate.services.impl;
+
+import com.tourMate.dao.RestaurantDao;
+import com.tourMate.dto.RestaurantDto;
+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;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@Service
+public class RestaurantManagerImpl implements RestaurantManager {
+
+    @Autowired
+    RestaurantDao restaurantDao;
+    @Autowired
+    UsersManager usersManager;
+    @Override
+    public void createRestaurant(Restaurant restaurant, long userId) {
+        restaurantDao.createRestaurant(restaurant, userId);
+    }
+
+
+
+    @Override
+    public void deleteRestaurant(long restaurantID) {
+        restaurantDao.deleteRestaurant(restaurantID);
+    }
+
+    @Override
+    public void addMenuToRestaurant(long restaurantId, Menu menu) {
+        restaurantDao.addMenuToRestaurant(restaurantId, menu);
+    }
+
+    @Override
+    public List<Restaurant> getRestaurantsByUser(long userId) {
+        return restaurantDao.getRestaurantsByUser(userId);
+    }
+
+    @Override
+    public void deleteHotel(long restaurantID) {
+        restaurantDao.deleteRestaurant(restaurantID);
+    }
+
+    @Override
+    public List<Restaurant> getRestaurants() {
+        return restaurantDao.getRestaurants();
+    }
+
+    @Override
+    public Restaurant findRestaurantByID(long restaurantID) {
+        return restaurantDao.findRestaurantByID(restaurantID);
+    }
+
+    @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));
+    }
+
+    @Override
+    public void removeRestaurantImage(long restaurantImageId) {
+        restaurantDao.removeRestaurantImage(restaurantImageId);
+    }
+
+    @Override
+    public RestaurantImages findRestaurantImageById(long restaurantImageId) {
+        return restaurantDao.findRestaurantImageById(restaurantImageId);
+    }
+
+    @Override
+    public List<RestaurantImages> getRestaurantImages(long restaurantID) {
+        return restaurantDao.getRestaurantImages(restaurantID);
+    }
+
+    @Override
+    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>> 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())
+                )).toList();
+        return restaurantsList;
+    }
+
+    @Override
+    public void editRestaurant(long restaurantID, String restaurantName, String restaurantLocation, String cousineType, String restaurantDescription, String restaurantEdbs, User restaurantOwner) {
+        restaurantDao.editRestaurant(restaurantID, restaurantName, restaurantLocation, cousineType, restaurantDescription, restaurantEdbs, restaurantOwner);
+    }
+
+    @Override
+    public List<RestaurantsTable> getRestaurantTables(long restaurantID) {
+        return restaurantDao.getRestaurantTables(restaurantID);
+    }
+
+    @Override
+    public RestaurantsTable findTableById(long tableId) {
+        return restaurantDao.findTableById(tableId);
+    }
+
+    @Override
+    public void createTable(Long restaurantId, int noSeats) {
+        Restaurant r = restaurantDao.findRestaurantByID(restaurantId);
+        restaurantDao.createTable(r, noSeats);
+    }
+
+    @Override
+    public void editTable(Restaurant restaurant, long tableId, int noSeats) {
+        restaurantDao.editTable(restaurant, tableId, noSeats);
+    }
+
+    @Override
+    public void deleteTable(long tableId) {
+        restaurantDao.deleteTable(tableId);
+    }
+
+    @Override
+    public void createTableAvailable(Long rt, Date hourFrom, Date hourTo) {
+        RestaurantsTable rtabl = findTableById(rt);
+        restaurantDao.createTableAvailable(rtabl, hourFrom, hourTo);
+    }
+
+    @Override
+    public List<RestaurantsAvailible> getTablesAvailabilityById(Long id)
+    {
+        return restaurantDao.getTablesAvailabilityById(id);
+    }
+
+    @Override
+    public void editTableAvailable(long tableId, Restaurant restaurant, int noSeats) {
+        restaurantDao.editTableAvailable(tableId, restaurant, noSeats);
+    }
+
+    @Override
+    public void deleteTableAvailable(long 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);
+    }
+
+    @Override
+    public void editReservation(long tableId, Restaurant restaurant, int noSeats) {
+        //restaurantDao.editReservation(tableId, restaurant, noSeats);
+    }
+
+    @Override
+    public void deleteReservation(long tableId) {
+        restaurantDao.deleteReservation(tableId);
+    }
+
+    @Override
+    public RestaurantReservations findReservationByID(long tableId) {
+        //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);
+    }
+
+    @Override
+    public List<RestaurantReservations> findReservationByUser(User user) {
+        return restaurantDao.findReservationByUser(user);
+    }
+
+    @Override
+    public List<RestaurantReservations> findReservationByRestaurant(Restaurant restaurant) {
+        return restaurantDao.findReservationByRestaurant(restaurant);
+    }
+
+    @Override
+    public List<RestaurantReservations> getReservations() {
+        return restaurantDao.getReservations();
+    }
+
+    @Override
+    public List<Restaurant> searchByRestaurantName(String restaurantName) {
+        return restaurantDao.searchByRestaurantName(restaurantName);
+    }
+
+    @Override
+    public List<Restaurant> searchByRestaurantLocation(String restaurantLocation) {
+        return restaurantDao.searchByRestaurantLocation(restaurantLocation);
+    }
+
+    @Override
+    public List<RestaurantsTable> searchByNoSeats(int noSeats) {
+        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);
+        restaurantDao.createTableAvailable(table, restaurantsAvailible.getHourFrom(), dateFrom, 1);
+        restaurantDao.createTableAvailable(table, dateTo, restaurantsAvailible.getHourTo(), 1);
+    }
+
+    @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.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.getUser(),
+                x.getTable(),
+                x.getTimeFrom(),
+                x.getTimeTo(),
+                x.getNoSeats(),
+                x.getTable().getRestaurant().getRestaurantName(),
+                x.getTable().getRestaurant().getRestaurantLocation(),
+                "",
+                x.getTable().getRestaurant().getRestaurantID(),
+                x.getReviewed()
+        )).toList();
+    }
+}
Index: src/main/java/com/tourMate/services/impl/ReviewManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/ReviewManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/impl/ReviewManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,100 @@
+package com.tourMate.services.impl;
+
+import com.tourMate.dao.ReviewDao;
+import com.tourMate.dao.ReviewManager;
+import com.tourMate.entities.Hotels;
+import com.tourMate.entities.Restaurant;
+import com.tourMate.entities.Reviews;
+import com.tourMate.entities.Transport;
+import com.tourMate.services.HotelManager;
+import com.tourMate.services.RestaurantManager;
+import com.tourMate.services.TransportManager;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class ReviewManagerImpl implements ReviewManager {
+
+    @Autowired
+    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) {
+        Hotels h = null;
+        Restaurant r = null;
+        Transport t = null;
+        if(hotel != null)
+        {
+            h = hotelManager.findHotelByID(hotel);
+        }
+        if(restaurant != null)
+        {
+            r = restaurantManager.findRestaurantByID(restaurant);
+        }
+        if(transport != null)
+        {
+            t = transportManager.getTransportById(transport);
+        }
+        Reviews review = new Reviews (title, numStar, description, h, r, t);
+        reviewDao.createReview(review);
+    }
+
+    @Override
+    public void deleteReview(long id) {
+        reviewDao.deleteReview(id);
+    }
+
+    @Override
+    public Reviews findReviewById(long id) {
+        return reviewDao.findReviewById(id);
+    }
+
+    @Override
+    public void editReview(long id, String title, String description, int numStar, Hotels hotel, Restaurant restaurant, Transport transport) {
+        reviewDao.editReview(id, title, description, numStar, hotel, restaurant, transport);
+    }
+
+    @Override
+    public List<Reviews> getAllReviews() {
+        return reviewDao.getAllReviews();
+    }
+
+    @Override
+    public List<Reviews> getHotelReviews() {
+        return reviewDao.getHotelReviews();
+    }
+
+    @Override
+    public List<Reviews> getTransportReviews() {
+        return reviewDao.getTransportReviews();
+    }
+
+    @Override
+    public List<Reviews> getRestaurantReviews() {
+        return reviewDao.getRestaurantReviews();
+    }
+
+    @Override
+    public List<Reviews> getHotelReviews(Hotels hotel) {
+        return reviewDao.getHotelReviews(hotel);
+    }
+
+    @Override
+    public List<Reviews> getRestaurantReviews(Restaurant restaurant) {
+        return reviewDao.getRestaurantReviews(restaurant);
+    }
+
+    @Override
+    public List<Reviews> getTransportReviews(Transport transport) {
+        return reviewDao.getTransportReviews(transport);
+    }
+}
Index: src/main/java/com/tourMate/services/impl/TokenManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/TokenManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/impl/TokenManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -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 e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/impl/TransportManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,205 @@
+package com.tourMate.services.impl;
+
+
+import com.tourMate.dao.TransportDao;
+import com.tourMate.dto.*;
+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;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@Service
+public class TransportManagerImpl implements TransportManager {
+    @Autowired
+    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) {
+        transportDao.createTransport(transportName, carBrand, carType, carManufacturedYear, noPassengers, noBags, EMBG, userId, carPlate);
+    }
+
+    @Override
+    public void deleteTransport(long transportId) {
+        transportDao.deleteTransport(transportId);
+    }
+
+    @Override
+    public List<Transport> getTransports() {
+        return transportDao.getTransports();
+    }
+
+    @Override
+    public List<TransportDto> getTransportsByUser(long userId) {
+        return transportDao.getTransportsByUser(userId);
+    }
+
+    @Override
+    public List<RouteListingDto> getRoutesForTransport(long transportId) {
+        return transportDao.getRoutesForTransport(transportId);
+    }
+
+    @Override
+    public TransportDto findTransportById(long transportId) {
+        return transportDao.findTransportById(transportId);
+    }
+
+    @Override
+    public Transport getTransportById(Long transportId) {
+        return transportDao.getTransportById(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) {
+        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);
+    }
+
+    @Override
+    public TransportReservation findTransportReservationByID(long reservationID) {
+        return transportDao.findTransportReservationByID(reservationID);
+    }
+
+    @Override
+    public List<TransportReservation> getTransportReservations() {
+        return transportDao.getTransportReservations();
+    }
+
+    @Override
+    public TransportAvailible findTransportAvailableByID(long reservationID) {
+        return transportDao.findTransportAvailableByID(reservationID);
+    }
+
+    @Override
+    public Transport getTransportById(long transportId) {
+        return transportDao.getTransportById(transportId);
+    }
+
+    @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);
+        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());
+        return transportList;
+    }
+
+    @Override
+    public List<TransportReservation> getTransportsReservationsByUserID(long userID) {
+        return transportDao.getTransportsReservationsByUserID(userID);
+    }
+
+    @Override
+    public List<TransportAvailible> getTransportsAvailable() {
+        return transportDao.getTransportsAvailable();
+    }
+
+    @Override
+    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) {
+        transportDao.editTransportAvailable(transport, availableID, departureLocation, arrivalLocation, date, noSeats, departureHour);
+    }
+
+    @Override
+    public void deleteTransportReservation(long reservationID) {
+        transportDao.deleteTransportReservation(reservationID);
+    }
+
+    @Override
+    public void deleteTransportAvailable(long availableID) {
+        transportDao.deleteTransportAvailable(availableID);
+    }
+
+    @Override
+    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) {
+        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) {
+        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.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.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();
+    }
+
+}
+
+
Index: src/main/java/com/tourMate/services/impl/UsersManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/UsersManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/java/com/tourMate/services/impl/UsersManagerImpl.java	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,61 @@
+package com.tourMate.services.impl;
+
+import com.tourMate.dao.UsersDao;
+import com.tourMate.entities.User;
+import com.tourMate.services.UsersManager;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+@Service
+public class UsersManagerImpl implements UsersManager, UserDetailsService {
+
+    @Autowired
+    UsersDao usersDao;
+
+    @Override
+    public void createUser(String name, String surname, String email, Date birthDate, String address, String contact) {
+        usersDao.createUser(name, surname, email, birthDate, address, contact);
+    }
+
+    @Override
+    public void deleteUser(long userID) {
+        usersDao.deleteUser(userID);
+    }
+
+    @Override
+    public List<User> getCreatedUsers() {
+        return usersDao.getCreatedUsers();
+    }
+
+    @Override
+    public User findUserByID(long userID) {
+        return usersDao.findUserByID(userID);
+    }
+
+    @Override
+    public void editUser(long userID, String name, String surname, String email, Date birthDate, String address, String contact) {
+        usersDao.editUser(userID, name, surname, email, birthDate, address, contact);
+    }
+
+    @Override
+    public List<User> getUnapprovedUsers() {
+        return usersDao.getUnapprovedUsers();
+    }
+
+    @Override
+    public void approveUserProfile(long userId) {
+        User u = findUserByID(userId);
+        usersDao.approveUserProfile(u);
+    }
+
+    @Override
+    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
+        return usersDao.findUserByUsername(username);
+    }
+}
Index: src/main/resources/application.properties
===================================================================
--- src/main/resources/application.properties	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ src/main/resources/application.properties	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,19 @@
+server.port=8080
+## PostgreSQL
+spring.datasource.driver-class-name=org.postgresql.Driver
+spring.datasource.url=jdbc:postgresql://localhost:5432/tourmate
+spring.datasource.username=postgres
+spring.datasource.password=admin
+
+spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
+spring.jpa.hibernate.ddl-auto=update
+spring.jpa.show_sql=true
+spring.jpg.hibernate.format_sql=false
+
+spring.datasource.type=com.zaxxer.hikari.HikariDataSource
+spring.datasource.hikari.maximumPoolSize=5
+
+spring.jpa.generate-ddl=true
+logging.level.org.springframework.security=DEBUG
+
+
