Index: my-react-app/src/App.js
===================================================================
--- my-react-app/src/App.js	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ my-react-app/src/App.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -1,9 +1,6 @@
 import {BrowserRouter as Router, Navigate, Route, Routes, useNavigate} from 'react-router-dom';
 
-import Customers from './components/Customers';
 import Layout from "./components/Layout";
 import React, {useContext, useEffect, useState} from 'react';
-import CustomerFormContainer from "./components/CustomerFormContainer";
-import CustomerDetails from "./components/CustomerDetails";
 import ErrorPage from "./components/ErrorPage";
 import Restaurants from "./components/Restaurants";
@@ -41,8 +38,4 @@
                 <Routes>
                     <Route path="/" element={<Home />} />
-                    <Route path="/customers" element={<ProtectedRoute isAuthenticated={isAuthenticated} element={<Customers />} />} />
-                    <Route path="/customers/add" element={<ProtectedRoute isAuthenticated={isAuthenticated} element={<CustomerFormContainer />} />} />
-                    <Route path="/customers/:id" element={<ProtectedRoute isAuthenticated={isAuthenticated} element={<CustomerDetails />} />} />
-                    <Route path="/customers/edit/:id" element={<ProtectedRoute isAuthenticated={isAuthenticated} element={<CustomerFormContainer />} />} />
                     <Route path="/restaurants" element={<ProtectedRoute isAuthenticated={isAuthenticated} element={<Restaurants />} />} />
                     <Route path="/restaurants/:id" element={<ProtectedRoute isAuthenticated={isAuthenticated} element={<RestaurantDetails />} />} />
Index: -react-app/src/components/CustomerContext.js
===================================================================
--- my-react-app/src/components/CustomerContext.js	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ 	(revision )
@@ -1,26 +1,0 @@
-import React, { createContext, useState, useEffect } from 'react';
-import axios from 'axios';
-
-export const CustomerContext = createContext();
-
-export const CustomerProvider = ({children}) => {
-    const[customers, setCustomers] = useState([]);
-
-    useEffect(() => {
-        const fetchCustomers = async () => {
-            try {
-                const response = await axios.get("http://localhost:8081/api/customers");
-                setCustomers(response.data)
-            } catch (error) {
-                console.log("Error fetching customers: ", error);
-            }
-        }
-        fetchCustomers()
-    }, []);
-
-    return(
-        <CustomerContext.Provider value={{customers}}>
-            {children}
-        </CustomerContext.Provider>
-    )
-}
Index: -react-app/src/components/CustomerDetails.js
===================================================================
--- my-react-app/src/components/CustomerDetails.js	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ 	(revision )
@@ -1,40 +1,0 @@
-import React, { useEffect, useState } from 'react';
-import axios from 'axios';
-import { useParams } from 'react-router-dom';
-
-const CustomerDetails = () => {
-    const { id } = useParams();
-    const [customer, setCustomer] = useState(null);
-
-    useEffect(() => {
-        const fetchCustomer = async () => {
-            try {
-                const response = await axios.get(`http://localhost:8081/api/customers/${id}`);
-                setCustomer(response.data);
-            } catch (error) {
-                console.error('Error fetching customer:', error);
-            }
-        };
-
-        fetchCustomer();
-    }, [id]);
-
-    if (!customer) {
-        return <div>Loading...</div>;
-    }
-
-    return (
-        <div>
-            <h2>Customer Details</h2>
-            <p className="card-text"><strong>Email:</strong> {customer.email}</p>
-            <p className="card-text"><strong>Phone:</strong> {customer.phone}</p>
-            <p className="card-text"><strong>Address:</strong> {customer.address}</p>
-            <p className="card-text"><strong>Membership
-                Level:</strong> {customer.membershipLevel}</p>
-            <p className="card-text"><strong>Registration
-                Date:</strong> {new Date(customer.registrationDate).toLocaleString()}</p>
-        </div>
-    );
-}
-
-export default CustomerDetails;
Index: -react-app/src/components/CustomerFormContainer.js
===================================================================
--- my-react-app/src/components/CustomerFormContainer.js	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ 	(revision )
@@ -1,77 +1,0 @@
-// CustomerFormContainer.js
-import React, { useState, useEffect } from 'react';
-import axios from 'axios';
-import CustomerForm from './CustomersForm';
-import MembershipsEnum from "./MembershipsEnum";
-import {useNavigate, useParams} from "react-router-dom";
-
-const CustomerFormContainer = () => {
-    const navigate = useNavigate();
-    const [formData, setFormData] = useState({
-        firstName: '',
-        lastName: '',
-        email: '',
-        password: '',
-        phone: '',
-        address: '',
-        membershipLevel: MembershipsEnum()[0]
-    });
-
-    const { id } = useParams();
-    const [customer, setCustomer] = useState(null);
-
-    useEffect(() => {
-        if (id) {
-            // Fetch customer data only if in edit mode
-            const fetchCustomer = async () => {
-                try {
-                    const response = await axios.get(`http://localhost:8081/api/customers/${id}`);
-                    const customerData = response.data;
-                    setFormData({
-                        firstName: customerData.firstName || '',
-                        lastName: customerData.lastName || '',
-                        email: customerData.email || '',
-                        password: '', // For security reasons, the password field should not be pre-filled
-                        phone: customerData.phone || '',
-                        address: customerData.address || '',
-                        membershipLevel: customerData.membershipLevel || MembershipsEnum()[0]
-                    });
-                } catch (error) {
-                    console.error('Error fetching customer:', error);
-                }
-            };
-
-            fetchCustomer();
-        }
-    }, [id]);
-
-    const handleChange = (e) => {
-        setFormData({ ...formData, [e.target.name]: e.target.value });
-    };
-
-    const handleSubmit = async (e) => {
-        e.preventDefault();
-        try {
-            if (customer) {
-                await axios.put(`http://localhost:8081/api/customers/edit/${customer.id}`, formData);
-            } else {
-                await axios.post("http://localhost:8081/api/customers", formData);
-            }
-            navigate("/customers");
-        } catch (error) {
-            navigate("/error");
-        }
-    };
-
-    return (
-        <CustomerForm
-            formData={formData}
-            handleChange={handleChange}
-            handleSubmit={handleSubmit}
-            membershipOptions={MembershipsEnum()}
-            isEdit={!!customer} // Pass a boolean indicating whether it's an update
-        />
-    );
-};
-
-export default CustomerFormContainer;
Index: -react-app/src/components/Customers.js
===================================================================
--- my-react-app/src/components/Customers.js	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ 	(revision )
@@ -1,66 +1,0 @@
-import 'bootstrap/dist/css/bootstrap.min.css';
-import React, {useContext, useEffect, useState} from "react";
-import axios from "axios";
-import { Link } from 'react-router-dom';
-import { useNavigate } from 'react-router-dom';
-import {CustomerContext} from "./CustomerContext";
-
-
-const Customers = () => {
-    const [customers, setCustomers] = useState([]);
-    const navigate = useNavigate();
-    const customersContext = useContext(CustomerContext);
-
-    useEffect(() => {
-        setCustomers(customersContext.customers)
-    }, [customersContext]);
-
-    const handleDetailClick = (customerId) => {
-        navigate(`/customers/${customerId}`);
-    }
-
-    const handleEditClick = (customerId) => {
-        navigate(`/customers/edit/${customerId}`);
-    }
-
-    const handleDeleteClick = async (customerId) => {
-        try {
-            await axios.delete(`http://localhost:8081/api/customers/delete/${customerId}`);
-            setCustomers(customers.filter(customer => customer.customerID !== customerId));
-            window.location.reload();
-        } catch (error) {
-            console.error("Error + " + error);
-        }
-    }
-
-    return (
-        <div className="container mt-4">
-            <h1 className="mb-4">Customer List</h1>
-            <div className="row row-cols-1 row-cols-md-3 g-4">
-                {customers
-                    .filter(customer => customer.role !== 'admin')
-                    .map((customer) => (
-                        <div className="col" key={customer.customerId}>
-                            <div className="card h-100">
-                                <div className="card-body">
-                                    <h5 className="card-title">{customer.firstName + " " + customer.lastName}</h5>
-                                    <p className="card-text"><strong>Email:</strong> {customer.email}</p>
-                                    <p className="card-text"><strong>Phone:</strong> {customer.phone}</p>
-                                    <p className="card-text"><strong>Address:</strong> {customer.address}</p>
-                                    <p className="card-text"><strong>Membership Level:</strong> {customer.membershipLevel}</p>
-                                    {/*<p className="card-text"><strong>Registration*/}
-                                    {/*    Date:</strong> {new Date(customer.registrationDate).toLocaleString()}</p>*/}
-                                </div>
-                                <button onClick={() => handleDetailClick(customer.customerId)}>View Details</button>
-                                <button onClick={() => handleEditClick(customer.customerId)}>Edit</button>
-                                <button onClick={() => handleDeleteClick(customer.customerId)}>DELETE</button>
-                            </div>
-                        </div>
-                    ))}
-            </div>
-        </div>
-    );
-
-}
-
-export default Customers;
Index: -react-app/src/components/CustomersForm.js
===================================================================
--- my-react-app/src/components/CustomersForm.js	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ 	(revision )
@@ -1,110 +1,0 @@
-import React from 'react';
-import MembershipsEnum from "./MembershipsEnum";
-
-const CustomersForm = ({ formData, handleChange, handleSubmit, membershipOptions, isEdit}) => {
-    return (
-        <div>
-            <form onSubmit={handleSubmit} method="post">
-                <div>
-                    <label htmlFor="firstName">First Name</label>
-                    <div>
-                        <input
-                            type="text"
-                            id="firstName"
-                            name="firstName"
-                            value={formData.firstName}
-                            onChange={handleChange}
-                            required
-                        />
-                    </div>
-                </div>
-                <div>
-                    <label htmlFor="lastName">Last Name</label>
-                    <div>
-                        <input
-                            type="text"
-                            id="lastName"
-                            name="lastName"
-                            value={formData.lastName}
-                            onChange={handleChange}
-                            required
-                        />
-                    </div>
-                </div>
-                <div>
-                    <label htmlFor="email">Email</label>
-                    <div>
-                        <input
-                            type="email"
-                            id="email"
-                            name="email"
-                            value={formData.email}
-                            onChange={handleChange}
-                            required
-                        />
-                    </div>
-                </div>
-                <div>
-                    <label htmlFor="password">Password</label>
-                    <div>
-                        <input
-                            type="password"
-                            id="password"
-                            name="password"
-                            value={formData.password}
-                            onChange={handleChange}
-                            required
-                        />
-                    </div>
-                </div>
-                <div>
-                    <label htmlFor="phone">Phone</label>
-                    <div>
-                        <input
-                            type="text"
-                            id="phone"
-                            name="phone"
-                            value={formData.phone}
-                            onChange={handleChange}
-                            required
-                        />
-                    </div>
-                </div>
-                <div>
-                    <label htmlFor="address">Address</label>
-                    <div>
-                        <input
-                            type="text"
-                            id="address"
-                            name="address"
-                            value={formData.address}
-                            onChange={handleChange}
-                            required
-                        />
-                    </div>
-                </div>
-                <div>
-                    <label htmlFor="membershipLevel">Membership Type</label>
-                    <div>
-                        <select
-                            id="membershipLevel"
-                            name="membershipLevel"
-                            value={formData.membershipLevel}
-                            onChange={handleChange}
-                            required
-                        >
-                            {MembershipsEnum().map((membership, index) => (
-                                <option key={index} value={membership}>
-                                    {membership}
-                                </option>
-                            ))}
-                        </select>
-                    </div>
-                </div>
-                <button type="submit">{isEdit ? 'Update' : 'Register'}</button>
-            </form>
-        </div>
-    );
-};
-
-export default CustomersForm;
Index: my-react-app/src/components/MenuList.js
===================================================================
--- my-react-app/src/components/MenuList.js	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ my-react-app/src/components/MenuList.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -15,7 +15,7 @@
             const exists = prevItems.find(i => i.id === item.id);
             if (exists) {
-                return prevItems.filter(i => i.id !== item.id); // remove
+                return prevItems.filter(i => i.id !== item.id);
             } else {
-                return [...prevItems, item]; // add
+                return [...prevItems, item];
             }
         });
Index: my-react-app/src/components/ReservationConfirmation.js
===================================================================
--- my-react-app/src/components/ReservationConfirmation.js	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ my-react-app/src/components/ReservationConfirmation.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -27,5 +27,5 @@
                 const tableResponse = await axios.get(`http://localhost:8081/api/tables/${tableNumber}`);
                 setTable(tableResponse.data);
-
+                console.log(tableResponse.data)
                 const restaurantResponse = await axios.get(`http://localhost:8081/api/restaurants/${restaurantId}`);
                 setRestaurant(restaurantResponse.data);
@@ -63,14 +63,12 @@
             paymentStatus: 'Pending',
             preOrderedItems: preOrderedItems.map(item => ({
-                name: item.itemName,
+                preorderedItemName: item.itemName,
                 quantity: item.quantity,
                 price: item.price
             }))
         };
-        console.log(payload)
 
 
         try {
-            console.log(payload)
             const response = await axios.post('http://localhost:8081/api/reservations', payload, {
                 headers: {
Index: my-react-app/src/components/Reservations.js
===================================================================
--- my-react-app/src/components/Reservations.js	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ my-react-app/src/components/Reservations.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -101,5 +101,5 @@
                                                 {reservation.preOrderedItems.map((item, index) => (
                                                     <li key={index} className="list-group-item d-flex justify-content-between align-items-center">
-                                                        <span><strong>{item.name}</strong> × {item.quantity}</span>
+                                                        <span><strong>{item?.preorderedItemName}</strong> × {item.quantity}</span>
                                                         <span className="badge bg-success rounded-pill">${(item.price * item.quantity).toFixed(2)}</span>
                                                     </li>
Index: my-react-app/src/components/RestaurantDetails.js
===================================================================
--- my-react-app/src/components/RestaurantDetails.js	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ my-react-app/src/components/RestaurantDetails.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -112,4 +112,5 @@
     };
 
+    console.log(preOrderedItems)
 
     const roundToNext15Minutes = (date) => {
Index: my-react-app/src/index.js
===================================================================
--- my-react-app/src/index.js	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ my-react-app/src/index.js	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -5,5 +5,4 @@
 import { CuisineProvider } from './components/CuisineContext';
 import {RestaurantProvider} from "./components/RestaurantContext";
-import {CustomerProvider} from "./components/CustomerContext";
 
 const root = ReactDOM.createRoot(document.getElementById('root'));
@@ -12,7 +11,5 @@
         <CuisineProvider>
             <RestaurantProvider>
-                <CustomerProvider>
                     <App />
-                </CustomerProvider>
             </RestaurantProvider>
         </CuisineProvider>
Index: src/main/java/com/example/rezevirajmasa/demo/config/ModelMapperConfig.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/config/ModelMapperConfig.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/config/ModelMapperConfig.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -17,16 +17,16 @@
         ModelMapper modelMapper = new ModelMapper();
 
-        // Map Restaurant to RestaurantDTO
         modelMapper.typeMap(Restaurant.class, RestaurantDTO.class).addMappings(mapper -> {
             mapper.map(Restaurant::getTablesList, RestaurantDTO::setTablesList);
         });
 
-        // Map TableEntity to TableDTO
         modelMapper.typeMap(TableEntity.class, TableDTO.class).addMappings(mapper -> {
             mapper.map(TableEntity::getReservations, TableDTO::setReservations);
         });
 
-        // Map Reservation to ReservationDTO
-        modelMapper.typeMap(Reservation.class, ReservationDTO.class);
+        modelMapper.typeMap(Reservation.class, ReservationDTO.class).addMappings(mapper -> {
+            mapper.map(Reservation::getReservationStatus, ReservationDTO::setReservationStatus);
+            mapper.map(Reservation::getPaymentStatus, ReservationDTO::setPaymentStatus);
+        });
 
         return modelMapper;
Index: src/main/java/com/example/rezevirajmasa/demo/dto/ReservationDTO.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/dto/ReservationDTO.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/dto/ReservationDTO.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -18,5 +18,5 @@
     private Long restaurantId;
     private int partySize;
-    private String status;
+    private String reservationStatus;
     private String specialRequests;
     private String paymentStatus;
@@ -26,5 +26,8 @@
     }
 
-    public ReservationDTO(Long reservationID, String userEmail, BigDecimal rating, Long tableNumber, LocalDateTime reservationDateTime, LocalDateTime checkInTime, Long restaurantId, int partySize, String status, String specialRequests, String paymentStatus, List<PreorderedItem> preOrderedItems) {
+    public ReservationDTO(Long reservationID, String userEmail, BigDecimal rating, Long tableNumber,
+                          LocalDateTime reservationDateTime, LocalDateTime checkInTime, Long restaurantId,
+                          int partySize, String reservationStatus, String specialRequests,
+                          String paymentStatus, List<PreorderedItem> preOrderedItems) {
         this.reservationID = reservationID;
         this.userEmail = userEmail;
@@ -33,7 +36,7 @@
         this.reservationDateTime = reservationDateTime;
         this.checkInTime = checkInTime;
-        this.reservationID = restaurantId;
+        this.restaurantId = restaurantId;
         this.partySize = partySize;
-        this.status = status;
+        this.reservationStatus = reservationStatus;
         this.specialRequests = specialRequests;
         this.paymentStatus = paymentStatus;
@@ -50,5 +53,5 @@
         this.restaurantId = reservation.getRestaurant().getRestaurantId();
         this.partySize = reservation.getPartySize();
-        this.status = reservation.getStatus();
+        this.reservationStatus = reservation.getReservationStatus();
         this.specialRequests = reservation.getSpecialRequests();
         this.paymentStatus = reservation.getPaymentStatus();
@@ -121,9 +124,9 @@
 
     public String getStatus() {
-        return status;
+        return reservationStatus;
     }
 
-    public void setStatus(String status) {
-        this.status = status;
+    public void setReservationStatus(String reservationStatus) {
+        this.reservationStatus = reservationStatus;
     }
 
Index: src/main/java/com/example/rezevirajmasa/demo/dto/TableDTO.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/dto/TableDTO.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/dto/TableDTO.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -23,5 +23,4 @@
     }
 
-    // Getters and setters
     public Long getId() {
         return id;
Index: src/main/java/com/example/rezevirajmasa/demo/mappers/UserMapperImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/mappers/UserMapperImpl.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/mappers/UserMapperImpl.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -19,5 +19,5 @@
 
         UserDto userDto = new UserDto();
-        userDto.setId(user.getId());
+        userDto.setId(user.getUserId());
         userDto.setFirstName(user.getFirstName());
         userDto.setLastName(user.getLastName());
@@ -37,5 +37,5 @@
         user.setFirstName(userDto.getFirstName());
         user.setLastName(userDto.getLastName());
-        user.setPassword(Arrays.toString(userDto.getPassword())); // Assuming password is a char[] or string array.
+        user.setPassword(Arrays.toString(userDto.getPassword()));
 
         return user;
@@ -53,7 +53,5 @@
         signUpDto.setLastName(userDto.getLastName());
 
-        // Since SignUpDto has password field, you may set it if needed.
-        // Assuming a default value or handling empty password as required.
-        signUpDto.setPassword(new char[0]); // Empty password for now or assign actual value if required.
+        signUpDto.setPassword(new char[0]);
 
         return signUpDto;
@@ -73,5 +71,5 @@
         user.setAddress(userDto.getAddress());
         user.setEmail(userDto.getEmail());
-        user.setId(userDto.getId());
+        user.setUserId(userDto.getId());
 
         return user;
Index: c/main/java/com/example/rezevirajmasa/demo/model/Customer.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/Customer.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ 	(revision )
@@ -1,156 +1,0 @@
-package com.example.rezevirajmasa.demo.model;
-
-import jakarta.persistence.*;
-
-import java.util.Date;
-
-@Entity
-@Table(name = "customers")
-public class Customer {
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "CustomerID")
-    private Long customerId;
-
-    @Column(name = "FirstName", length = 50)
-    private String firstName;
-
-    @Column(name = "LastName", length = 50)
-    private String lastName;
-
-    @Column(name = "Email", length = 100, unique = true)
-    private String email;
-
-    @Column(name = "Password", length = 100)
-    private String password;
-
-    @Enumerated(EnumType.STRING)
-    private Role role;
-
-    @Column(name = "Phone", length = 20)
-    private String phone;
-
-    @Column(name = "Address", columnDefinition = "TEXT")
-    private String address;
-
-    @Enumerated(EnumType.STRING)
-    @Column(name = "MembershipLevel", length = 20)
-    private MembershipLevel membershipLevel;
-
-    @Column(name = "RegistrationDate", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
-    @Temporal(TemporalType.TIMESTAMP)
-    private Date registrationDate;
-
-    public Customer(Long customerId, String firstName, String lastName, String email, String phone, String address, MembershipLevel membershipLevel, Date registrationDate, Role role) {
-        this.setCustomerId(customerId);
-        this.setFirstName(firstName);
-        this.setLastName(lastName);
-        this.setEmail(email);
-        this.setPhone(phone);
-        this.setAddress(address);
-        this.setMembershipLevel(membershipLevel);
-        this.setRegistrationDate(registrationDate);
-        this.setRole(Role.ROLE_USER);
-    }
-
-    public Customer() {
-
-    }
-
-    public Role getRole() {
-        return role;
-    }
-
-    public void setRole(Role role) {
-        this.role = role;
-    }
-
-    public String getFullName() {
-        return firstName + " " + lastName;
-    }
-    public Long getCustomerId() {
-        return customerId;
-    }
-
-    public void setCustomerId(Long customerId) {
-        this.customerId = customerId;
-    }
-
-    public String getFirstName() {
-        return firstName;
-    }
-
-    public void setFirstName(String firstName) {
-        this.firstName = firstName;
-    }
-
-    public String getLastName() {
-        return lastName;
-    }
-
-    public void setLastName(String lastName) {
-        this.lastName = lastName;
-    }
-
-    public String getEmail() {
-        return email;
-    }
-
-    public void setEmail(String email) {
-        this.email = email;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public String getPhone() {
-        return phone;
-    }
-
-    public void setPhone(String phone) {
-        this.phone = phone;
-    }
-
-    public String getAddress() {
-        return address;
-    }
-
-    public void setAddress(String address) {
-        this.address = address;
-    }
-
-    public Date getRegistrationDate() {
-        return registrationDate;
-    }
-    public MembershipLevel getMembershipLevel() {
-        return membershipLevel;
-    }
-
-    public void setMembershipLevel(MembershipLevel membershipLevel) {
-        this.membershipLevel = membershipLevel;
-    }
-    public void setRegistrationDate(Date registrationDate) {
-        this.registrationDate = registrationDate;
-    }
-
-    @Override
-    public String toString() {
-        return "Customer{" +
-                "customerId=" + customerId +
-                ", firstName='" + firstName + '\'' +
-                ", lastName='" + lastName + '\'' +
-                ", email='" + email + '\'' +
-                ", phone='" + phone + '\'' +
-                ", address='" + address + '\'' +
-                ", membershipLevel=" + membershipLevel +
-                ", registrationDate=" + registrationDate +
-                '}';
-    }
-
-}
Index: src/main/java/com/example/rezevirajmasa/demo/model/Menu.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/Menu.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/model/Menu.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -26,6 +26,6 @@
     private String itemName;
 
-    @Column(name = "category", length = 50)
-    private String category;
+    @Column(name = "menuCategory", length = 50)
+    private String menuCategory;
 
     @Column(name = "price", precision = 8, scale = 2)
@@ -45,5 +45,5 @@
         this.restaurant = restaurant;
         this.itemName = itemName;
-        this.category = category;
+        this.menuCategory = category;
         this.price = price;
         this.description = description;
Index: src/main/java/com/example/rezevirajmasa/demo/model/MenuTag.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/MenuTag.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/model/MenuTag.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -11,5 +11,5 @@
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
-    private Long id;
+    private Long menuTagId;
 
     @ManyToOne(fetch = FetchType.LAZY)
Index: src/main/java/com/example/rezevirajmasa/demo/model/PreorderedItem.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/PreorderedItem.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/model/PreorderedItem.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -20,7 +20,7 @@
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
-    private Long id;
+    private Long preorderedItemId;
 
-    private String name;
+    private String preorderedItemName;
 
     private Integer quantity;
Index: src/main/java/com/example/rezevirajmasa/demo/model/Reservation.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/Reservation.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/model/Reservation.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -48,5 +48,5 @@
 
     @Column(name = "Status", length = 20, nullable = false)
-    private String status;
+    private String reservationStatus;
 
     @Column(name = "CheckInTime")
@@ -57,9 +57,5 @@
     private LocalDateTime checkOutTime;
 
-//    @ElementCollection
-//    @CollectionTable(name = "reservation_preordered_items", joinColumns = @JoinColumn(name = "reservation_id"))
-//    @Column(name = "item")
-//    private List<String> preOrderedItems = new ArrayList<>();
-    @OneToMany(mappedBy = "reservation", cascade = CascadeType.ALL, orphanRemoval = true)
+    @OneToMany(mappedBy = "reservation", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
     private List<PreorderedItem> preOrderedItems = new ArrayList<>();
 
@@ -73,6 +69,6 @@
     @PrePersist
     private void prePersist() {
-        if (status == null) {
-            status = "Pending";
+        if (reservationStatus == null) {
+            reservationStatus = "Pending";
         }
         if (paymentStatus == null) {
@@ -88,5 +84,5 @@
         this.partySize = partySize;
         this.specialRequests = specialRequests;
-        this.status = status;
+        this.reservationStatus = status;
         this.checkInTime = checkInTime;
         this.checkOutTime = checkOutTime;
@@ -105,5 +101,5 @@
                 ", partySize=" + partySize +
                 ", specialRequests='" + specialRequests + '\'' +
-                ", status='" + status + '\'' +
+                ", status='" + reservationStatus + '\'' +
                 ", checkInTime=" + checkInTime +
                 ", checkOutTime=" + checkOutTime +
Index: src/main/java/com/example/rezevirajmasa/demo/model/Restaurant.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/Restaurant.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/model/Restaurant.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -146,5 +146,5 @@
         @Id
         @GeneratedValue(strategy = GenerationType.IDENTITY)
-        private Long id;
+        private Long reservationHistoryId;
 
         @ManyToOne
@@ -170,5 +170,5 @@
 
         @Column(name = "status")
-        private String status;
+        private String reservationStatus;
 
         @Column(name = "cancellation_reason")
@@ -185,5 +185,5 @@
             this.partySize = partySize;
             this.specialRequests = specialRequests;
-            this.status = status;
+            this.reservationStatus = status;
             this.cancellationReason = cancellationReason;
             this.checkInDate = checkInDate;
@@ -194,9 +194,9 @@
 
         public Long getId() {
-            return id;
+            return reservationHistoryId;
         }
 
         public void setId(Long id) {
-            this.id = id;
+            this.reservationHistoryId = id;
         }
 
@@ -242,9 +242,9 @@
 
         public String getStatus() {
-            return status;
+            return reservationStatus;
         }
 
         public void setStatus(String status) {
-            this.status = status;
+            this.reservationStatus = status;
         }
 
@@ -276,5 +276,5 @@
         public String toString() {
             return "ReservationHistory{" +
-                    "id=" + id +
+                    "id=" + reservationHistoryId +
                     ", user=" + user +
                     ", table=" + table +
@@ -283,5 +283,5 @@
                     ", partySize=" + partySize +
                     ", specialRequests='" + specialRequests + '\'' +
-                    ", status='" + status + '\'' +
+                    ", status='" + reservationStatus + '\'' +
                     ", cancellationReason='" + cancellationReason + '\'' +
                     ", checkInDate=" + checkInDate +
Index: src/main/java/com/example/rezevirajmasa/demo/model/TableEntity.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/TableEntity.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/model/TableEntity.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -36,6 +36,6 @@
     private int capacity;
 
-    @Column(name = "Location")
-    private String location;
+    @Column(name = "tableLocation")
+    private String tableLocation;
 
     @Column(name = "IsSmokingArea")
@@ -95,5 +95,5 @@
         this.restaurant = restaurant;
         this.capacity = capacity;
-        this.location = location;
+        this.tableLocation = location;
         this.isSmokingArea = isSmokingArea;
         this.description = description;
Index: src/main/java/com/example/rezevirajmasa/demo/model/User.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/User.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/model/User.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -21,5 +21,5 @@
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
-    private Long id;
+    private Long userId;
 
     @Column(name = "first_name")
Index: c/main/java/com/example/rezevirajmasa/demo/repository/CustomerRepository.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/repository/CustomerRepository.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ 	(revision )
@@ -1,8 +1,0 @@
-package com.example.rezevirajmasa.demo.repository;
-
-import com.example.rezevirajmasa.demo.model.Customer;
-import org.springframework.data.jpa.repository.JpaRepository;
-
-public interface CustomerRepository extends JpaRepository<Customer, Long> {
-    Customer findByEmail(String email);
-}
Index: src/main/java/com/example/rezevirajmasa/demo/repository/ReservationHistoryRepository.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/repository/ReservationHistoryRepository.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/repository/ReservationHistoryRepository.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -1,9 +1,6 @@
 package com.example.rezevirajmasa.demo.repository;
 
-import com.example.rezevirajmasa.demo.model.Customer;
-import com.example.rezevirajmasa.demo.model.Reservation;
 import com.example.rezevirajmasa.demo.model.Restaurant;
 import com.example.rezevirajmasa.demo.model.User;
-import org.springframework.cglib.core.Local;
 import org.springframework.data.jpa.repository.JpaRepository;
 
@@ -13,5 +10,4 @@
 public interface ReservationHistoryRepository extends JpaRepository<Restaurant.ReservationHistory, Long> {
     List<Restaurant.ReservationHistory> findALlByUser(User user);
-    List<Restaurant.ReservationHistory> findByCheckInDateBeforeAndStatus(LocalDateTime currentTime, String scheduled);
     List<Restaurant.ReservationHistory> findAllByCheckInDateBefore(LocalDateTime currentTime);
 }
Index: c/main/java/com/example/rezevirajmasa/demo/service/CustomerService.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/CustomerService.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ 	(revision )
@@ -1,23 +1,0 @@
-package com.example.rezevirajmasa.demo.service;
-
-import ch.qos.logback.core.net.server.Client;
-import com.example.rezevirajmasa.demo.dto.CustomerDTO;
-import com.example.rezevirajmasa.demo.model.Customer;
-import com.example.rezevirajmasa.demo.model.MembershipLevel;
-import com.example.rezevirajmasa.demo.model.Reservation;
-import com.example.rezevirajmasa.demo.model.Role;
-
-import java.util.Date;
-import java.util.List;
-
-
-public interface CustomerService {
-    Customer registration(String firstName, String lastName, String email, String password, String phone, String address, MembershipLevel membershipLevel, Role role);
-    List<Customer> listAll();
-    Customer findByEmail(String email);
-    Customer findById(Long id);
-    Customer updateCustomer(Long id, String firstName, String lastName, String email, String password, String phone, String address, MembershipLevel membershipLevel);
-    Customer registration(Customer customer);
-    boolean deleteById(Long customerId);
-    public CustomerDTO mapCustomerToDTO(Customer customer);
-}
Index: src/main/java/com/example/rezevirajmasa/demo/service/ReservationHistoryService.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/ReservationHistoryService.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/service/ReservationHistoryService.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -1,5 +1,4 @@
 package com.example.rezevirajmasa.demo.service;
 
-import com.example.rezevirajmasa.demo.model.Customer;
 import com.example.rezevirajmasa.demo.model.Reservation;
 import com.example.rezevirajmasa.demo.model.Restaurant;
Index: c/main/java/com/example/rezevirajmasa/demo/service/impl/CustomerServiceImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/impl/CustomerServiceImpl.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ 	(revision )
@@ -1,120 +1,0 @@
-package com.example.rezevirajmasa.demo.service.impl;
-
-import com.example.rezevirajmasa.demo.dto.CustomerDTO;
-import com.example.rezevirajmasa.demo.model.Customer;
-import com.example.rezevirajmasa.demo.model.MembershipLevel;
-import com.example.rezevirajmasa.demo.model.Reservation;
-import com.example.rezevirajmasa.demo.model.Role;
-import com.example.rezevirajmasa.demo.model.exceptions.InvalidCustomerIdException;
-import com.example.rezevirajmasa.demo.repository.CustomerRepository;
-import com.example.rezevirajmasa.demo.service.CustomerService;
-import org.springframework.security.core.parameters.P;
-import org.springframework.security.core.userdetails.User;
-import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.security.core.userdetails.UserDetailsService;
-import org.springframework.security.core.userdetails.UsernameNotFoundException;
-import org.springframework.security.crypto.password.PasswordEncoder;
-import org.springframework.stereotype.Service;
-
-import javax.swing.text.html.Option;
-import java.time.Instant;
-import java.time.LocalDateTime;
-import java.util.*;
-
-@Service
-public class CustomerServiceImpl implements CustomerService, UserDetailsService {
-    private final CustomerRepository customerRepository;
-
-    private final PasswordEncoder passwordEncoder;
-    public CustomerServiceImpl(CustomerRepository customerRepository, PasswordEncoder passwordEncoder) {
-        this.customerRepository = customerRepository;
-        this.passwordEncoder = passwordEncoder;
-    }
-
-    @Override
-    public Customer registration(String firstName, String lastName, String email, String password, String phone, String address, MembershipLevel membershipLevel, Role role) {
-        Customer customer = new Customer();
-        customer.setFirstName(firstName);
-        customer.setLastName(lastName);
-        customer.setEmail(email);
-        customer.setPassword(passwordEncoder.encode(password));
-        customer.setAddress(address);
-        customer.setPhone(phone);
-        customer.setMembershipLevel(membershipLevel);
-        customer.setRole(role);
-        customer.setRegistrationDate(Date.from(Instant.now()));
-        return customerRepository.save(customer);
-    }
-
-    @Override
-    public List<Customer> listAll() {
-        return customerRepository.findAll();
-    }
-
-    @Override
-    public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {
-        Customer customer = customerRepository.findByEmail(email);
-        if (customer == null) {
-            throw new UsernameNotFoundException("User not found with email: " + email);
-        }
-        return new org.springframework.security.core.userdetails.User(
-                customer.getEmail(),
-                customer.getPassword(),
-                Collections.singletonList(customer.getRole())
-        );
-    }
-
-    @Override
-    public Customer updateCustomer(Long id, String firstName, String lastName, String email, String password, String phone, String address, MembershipLevel membershipLevel) {
-        Customer customer = findById(id);
-        customer.setFirstName(firstName);
-        customer.setLastName(lastName);
-        customer.setEmail(email);
-        customer.setPassword(passwordEncoder.encode(password));
-        customer.setPhone(phone);
-        customer.setMembershipLevel(membershipLevel);
-        customer.setAddress(address);
-        return customerRepository.save(customer);
-    }
-
-    @Override
-    public Customer findByEmail(String email) {
-        return customerRepository.findByEmail(email);
-    }
-
-    @Override
-    public Customer findById(Long id) {
-        return customerRepository.findById(id).orElseThrow(InvalidCustomerIdException::new);
-    }
-
-    @Override
-    public Customer registration(Customer customer) {
-        return customerRepository.save(customer);
-    }
-
-    @Override
-    public boolean deleteById(Long customerId) {
-        Optional<Customer> optionalCustomer = customerRepository.findById(customerId);
-        if(optionalCustomer.isPresent()) {
-            Customer customer = optionalCustomer.get();
-            customerRepository.delete(customer);
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    @Override
-    public CustomerDTO mapCustomerToDTO(Customer customer) {
-        CustomerDTO dto = new CustomerDTO();
-        dto.setCustomerId(customer.getCustomerId());
-        dto.setFirstName(customer.getFirstName());
-        dto.setLastName(customer.getLastName());
-        dto.setAddress(customer.getAddress());
-        dto.setEmail(customer.getEmail());
-        dto.setPhone(customer.getPhone());
-        dto.setMembershipLevel(customer.getMembershipLevel());
-
-        return dto;
-    }
-}
Index: src/main/java/com/example/rezevirajmasa/demo/service/impl/ReservationHistoryServiceImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/impl/ReservationHistoryServiceImpl.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/service/impl/ReservationHistoryServiceImpl.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -1,5 +1,4 @@
 package com.example.rezevirajmasa.demo.service.impl;
 
-import com.example.rezevirajmasa.demo.model.Customer;
 import com.example.rezevirajmasa.demo.model.Reservation;
 import com.example.rezevirajmasa.demo.model.Restaurant;
Index: src/main/java/com/example/rezevirajmasa/demo/service/impl/ReservationImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/impl/ReservationImpl.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/service/impl/ReservationImpl.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -2,32 +2,17 @@
 
 import com.example.rezevirajmasa.demo.dto.ReservationDTO;
-import com.example.rezevirajmasa.demo.dto.RestaurantDTO;
-import com.example.rezevirajmasa.demo.dto.UserDto;
 import com.example.rezevirajmasa.demo.mappers.UserMapper;
 import com.example.rezevirajmasa.demo.model.*;
 import com.example.rezevirajmasa.demo.model.exceptions.InvalidReservationException;
 import com.example.rezevirajmasa.demo.model.exceptions.InvalidReservationIdException;
-import com.example.rezevirajmasa.demo.repository.CustomerRepository;
 import com.example.rezevirajmasa.demo.repository.ReservationRepository;
-import com.example.rezevirajmasa.demo.repository.RestaurantRepository;
 import com.example.rezevirajmasa.demo.repository.TableRepository;
 import com.example.rezevirajmasa.demo.service.ReservationHistoryService;
 import com.example.rezevirajmasa.demo.service.ReservationService;
-import com.example.rezevirajmasa.demo.service.RestaurantService;
 import com.example.rezevirajmasa.demo.service.UserService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cglib.core.Local;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.annotation.AuthenticationPrincipal;
-import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.security.core.userdetails.UserDetails;
 import org.springframework.stereotype.Service;
-import org.springframework.web.bind.annotation.RequestBody;
-
-import javax.swing.text.html.Option;
-import java.math.BigDecimal;
+
 import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.List;
@@ -91,5 +76,5 @@
             reservation.setSpecialRequests(reservationDTO.getSpecialRequests());
             reservation.setPartySize(reservationDTO.getPartySize());
-            reservation.setStatus(reservationDTO.getStatus() != null ? reservationDTO.getStatus() : "Pending");
+            reservation.setReservationStatus(reservationDTO.getStatus() != null ? reservationDTO.getStatus() : "Pending");
             reservation.setPaymentStatus(reservationDTO.getPaymentStatus() != null ? reservationDTO.getPaymentStatus() : "Unpaid");
             reservation.setUser(user);
@@ -99,5 +84,5 @@
             for (PreorderedItem dtoItem : reservationDTO.getPreOrderedItems()) {
                 PreorderedItem item = new PreorderedItem();
-                item.setName(dtoItem.getName());
+                item.setPreorderedItemName(dtoItem.getPreorderedItemName());
                 item.setQuantity(dtoItem.getQuantity());
                 item.setPrice(dtoItem.getPrice());
@@ -144,5 +129,5 @@
         existingReservation.setPartySize(reservationDTO.getPartySize());
         existingReservation.setSpecialRequests(reservationDTO.getSpecialRequests());
-        existingReservation.setStatus(reservationDTO.getStatus() != null ? reservationDTO.getStatus() : existingReservation.getStatus());
+        existingReservation.setReservationStatus(reservationDTO.getStatus() != null ? reservationDTO.getStatus() : existingReservation.getReservationStatus());
         existingReservation.setPaymentStatus(reservationDTO.getPaymentStatus() != null ? reservationDTO.getPaymentStatus() : existingReservation.getPaymentStatus());
 
Index: src/main/java/com/example/rezevirajmasa/demo/service/impl/RestaurantServiceImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/impl/RestaurantServiceImpl.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/service/impl/RestaurantServiceImpl.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -104,5 +104,5 @@
                 TableEntity table = new TableEntity();
                 table.setCapacity(tableCapacities.get(i));
-                table.setLocation(tableLocations.get(i));
+                table.setTableLocation(tableLocations.get(i));
                 table.setSmokingArea(tableSmokingAreas.get(i).equalsIgnoreCase("on"));
                 table.setDescription(tableDescriptions.get(i));
Index: src/main/java/com/example/rezevirajmasa/demo/service/impl/TableServiceImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/impl/TableServiceImpl.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/service/impl/TableServiceImpl.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -76,5 +76,5 @@
             TableEntity table = new TableEntity();
             table.setCapacity(tableCapacities.get(i));
-            table.setLocation(tableLocations.get(i));
+            table.setTableLocation(tableLocations.get(i));
             table.setSmokingArea(Boolean.valueOf(tableSmokingAreas.get(i)));
             table.setDescription(tableDescriptions.get(i));
Index: src/main/java/com/example/rezevirajmasa/demo/service/impl/UserServiceImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/impl/UserServiceImpl.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/service/impl/UserServiceImpl.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -16,4 +16,7 @@
 import org.openqa.selenium.InvalidArgumentException;
 import org.springframework.http.HttpStatus;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
 import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.stereotype.Service;
@@ -25,5 +28,5 @@
 @RequiredArgsConstructor
 @Service
-public class UserServiceImpl implements UserService {
+public class UserServiceImpl implements UserService, UserDetailsService {
     private final UserRepository userRepository;
     private final UserMapperImpl userMapper;
@@ -78,3 +81,14 @@
         return userRepository.findById(userId).orElseThrow(()->new InvalidArgumentException("Invalid user Id"));
     }
+
+    @Override
+    public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {
+        User user = userRepository.findByEmail(email)
+                .orElseThrow(()-> new UsernameNotFoundException("User not found"));
+        return org.springframework.security.core.userdetails.User
+                .withUsername(user.getEmail())
+                .password(user.getPassword())
+                .authorities(user.getRole().name()) // adjust if needed
+                .build();
+    }
 }
Index: c/main/java/com/example/rezevirajmasa/demo/web/controller/CustomerController.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/web/controller/CustomerController.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ 	(revision )
@@ -1,47 +1,0 @@
-package com.example.rezevirajmasa.demo.web.controller;
-
-import com.example.rezevirajmasa.demo.model.MembershipLevel;
-import com.example.rezevirajmasa.demo.model.Role;
-import com.example.rezevirajmasa.demo.service.CustomerService;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-@Controller
-public class CustomerController {
-    private final CustomerService customerService;
-
-    public CustomerController(CustomerService customerService) {
-        this.customerService = customerService;
-    }
-
-    @GetMapping("/customers")
-    public String showCustomers(Model model) {
-        model.addAttribute("bodyContent", "customers");
-        model.addAttribute("customers", customerService.listAll());
-        model.addAttribute("memberships", MembershipLevel.values());
-        model.addAttribute("roles", Role.values());
-        return "index";
-    }
-    @GetMapping("/customers/add")
-    public String showAddForm(Model model) {
-        model.addAttribute("bodyContent", "CustomersForm");
-        model.addAttribute("memberships", MembershipLevel.values());
-        model.addAttribute("roles", Role.values());
-        return "index";
-    }
-    @PostMapping("/customers/add")
-    public String createCustomer(@RequestParam String firstName,
-                                 @RequestParam String lastName,
-                                 @RequestParam String email,
-                                 @RequestParam String password,
-                                 @RequestParam String phone,
-                                 @RequestParam String address,
-                                 @RequestParam MembershipLevel membershipLevel,
-                                 @RequestParam Role role) {
-        customerService.registration(firstName, lastName, email, password, phone, address, membershipLevel, role);
-        return "redirect:/customers";
-    }
-}
Index: src/main/java/com/example/rezevirajmasa/demo/web/controller/ReservationHistoryController.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/web/controller/ReservationHistoryController.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/web/controller/ReservationHistoryController.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -4,9 +4,6 @@
 import com.example.rezevirajmasa.demo.dto.UserDto;
 import com.example.rezevirajmasa.demo.mappers.UserMapper;
-import com.example.rezevirajmasa.demo.model.Customer;
 import com.example.rezevirajmasa.demo.model.Restaurant;
-import com.example.rezevirajmasa.demo.model.Role;
 import com.example.rezevirajmasa.demo.model.User;
-import com.example.rezevirajmasa.demo.service.CustomerService;
 import com.example.rezevirajmasa.demo.service.ReservationHistoryService;
 import com.example.rezevirajmasa.demo.service.UserService;
Index: src/main/java/com/example/rezevirajmasa/demo/web/rest/AuthController.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/web/rest/AuthController.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/web/rest/AuthController.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -5,17 +5,7 @@
 import com.example.rezevirajmasa.demo.dto.SignUpDto;
 import com.example.rezevirajmasa.demo.dto.UserDto;
-import com.example.rezevirajmasa.demo.model.Customer;
-import com.example.rezevirajmasa.demo.service.CustomerService;
 import com.example.rezevirajmasa.demo.service.UserService;
 import lombok.RequiredArgsConstructor;
-import org.apache.coyote.Response;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
-import org.springframework.security.authentication.AuthenticationManager;
-import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.crypto.password.PasswordEncoder;
-import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
Index: src/main/java/com/example/rezevirajmasa/demo/web/rest/testController.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/web/rest/testController.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/main/java/com/example/rezevirajmasa/demo/web/rest/testController.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -32,5 +32,4 @@
 public class testController {
     private final RestaurantService restaurantService;
-    private final CustomerService customerService;
     private final UserService userService;
     private final ReservationService reservationService;
@@ -40,7 +39,6 @@
     private final UserMapper userMapper;
     private final TokenService tokenService;
-    public testController(RestaurantService restaurantService, CustomerService customerService, UserService userService, ReservationService reservationService, ReservationHistoryService reservationHistoryService, TableService tableService, MenuService menuService, UserMapper userMapper, TokenService tokenService) {
+    public testController(RestaurantService restaurantService, UserService userService, ReservationService reservationService, ReservationHistoryService reservationHistoryService, TableService tableService, MenuService menuService, UserMapper userMapper, TokenService tokenService) {
         this.restaurantService = restaurantService;
-        this.customerService = customerService;
         this.userService = userService;
         this.reservationService = reservationService;
@@ -115,49 +113,4 @@
     }
 
-//    Customer CALLS
-
-    @GetMapping("/api/customers")
-    public ResponseEntity<List<CustomerDTO>> getAllCustomers() {
-        List<Customer> customers = customerService.listAll();
-        List<CustomerDTO> dtos = new ArrayList<>();
-        for(Customer customer : customers) {
-            CustomerDTO dto = customerService.mapCustomerToDTO(customer);
-            dtos.add(dto);
-        }
-        return new ResponseEntity<List<CustomerDTO>>(dtos, HttpStatus.OK);
-    }
-
-    @GetMapping("/api/customers/{id}")
-    public ResponseEntity<Customer> getCustomerById(@PathVariable Long id) {
-        return new ResponseEntity<Customer>(customerService.findById(id), HttpStatus.OK);
-    }
-    @PutMapping("/api/customers/edit/{id}")
-    public ResponseEntity<Customer> editCustomerById(@PathVariable Long id, @RequestBody Customer customer) {
-        return new ResponseEntity<Customer>(
-                customerService.updateCustomer(id, customer.getFirstName(), customer.getLastName(), customer.getEmail(), customer.getPassword(), customer.getPhone(), customer.getAddress(), customer.getMembershipLevel()),
-                HttpStatus.OK
-        );
-    }
-
-    @PostMapping("/api/customers")
-    public ResponseEntity<Customer> saveCustomer(@RequestBody Customer customer) {
-        // Ensure that the role is set to ROLE_USER by default
-        customer.setRole(Role.ROLE_USER);
-        return new ResponseEntity<Customer>(
-                customerService.registration(customer),
-                HttpStatus.OK
-        );
-    }
-
-    @DeleteMapping("/api/customers/delete/{customerId}")
-    public ResponseEntity<Response> deleteCustomer(@PathVariable Long customerId) {
-        boolean deleted = customerService.deleteById(customerId);
-        if(deleted) {
-            return ResponseEntity.ok().build();
-        } else {
-            return ResponseEntity.notFound().build();
-        }
-    }
-
 //    Reservation Calls
 
Index: src/test/java/com/example/rezevirajmasa/demo/CustomerRepositoryTests.java
===================================================================
--- src/test/java/com/example/rezevirajmasa/demo/CustomerRepositoryTests.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/test/java/com/example/rezevirajmasa/demo/CustomerRepositoryTests.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -1,8 +1,6 @@
 package com.example.rezevirajmasa.demo;
 
-import com.example.rezevirajmasa.demo.model.Customer;
 import com.example.rezevirajmasa.demo.model.MembershipLevel;
 import com.example.rezevirajmasa.demo.model.exceptions.InvalidCustomerIdException;
-import com.example.rezevirajmasa.demo.repository.CustomerRepository;
 
 import org.assertj.core.api.Assertions;
Index: src/test/java/com/example/rezevirajmasa/demo/TableRepositoryTests.java
===================================================================
--- src/test/java/com/example/rezevirajmasa/demo/TableRepositoryTests.java	(revision 142c0f8187ceb8951505669639e95855fbe3be9e)
+++ src/test/java/com/example/rezevirajmasa/demo/TableRepositoryTests.java	(revision b67dfd3bdf1aa1bd3175c999b9eabd3c15eb7ea0)
@@ -22,5 +22,5 @@
         tableEntity.setDescription("Romantic spot");
         tableEntity.setSmokingArea(true);
-        tableEntity.setLocation("Big blue");
+        tableEntity.setTableLocation("Big blue");
 
         TableEntity savedTable = tableRepository.save(tableEntity);
