Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/Images.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/Images.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ 	(revision )
@@ -1,33 +1,0 @@
-package finki.diplomska.tripplanner.models;
-
-import com.fasterxml.jackson.annotation.JsonBackReference;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-import net.minidev.json.annotate.JsonIgnore;
-
-import javax.persistence.*;
-
-@Entity
-@Table(name = "images")
-@NoArgsConstructor
-@AllArgsConstructor
-@Getter
-@Setter
-public class Images {
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "id_image")
-    private Long id;
-
-    @Lob
-    @JsonIgnore
-    private byte[] content;
-
-    @ManyToOne
-    @JsonBackReference
-    @JoinColumn(name = "id_location", nullable = true)
-    private Location location;
-}
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/Location.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/Location.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/models/Location.java	(revision 6a3a178323fd905112b5392bd9d3cb83b66ef2d3)
@@ -2,5 +2,4 @@
 
 import com.fasterxml.jackson.annotation.JsonBackReference;
-import com.fasterxml.jackson.annotation.JsonManagedReference;
 import lombok.AllArgsConstructor;
 import lombok.Getter;
@@ -14,4 +13,5 @@
 @Entity
 @Table(name = "locations")
+@NoArgsConstructor
 @AllArgsConstructor
 @Getter
@@ -34,6 +34,4 @@
 
     private int duration;
-
-    private String trivia;
 
     @Lob
@@ -64,8 +62,4 @@
     private List<Planner> plannerList;
 
-    @ManyToOne
-    @JsonBackReference
-    @JoinColumn(name = "id_user")
-    private User user;
 
     @ManyToMany
@@ -77,22 +71,4 @@
     private List<Category> categoryList;
 
-    @OneToMany(mappedBy = "location", cascade = CascadeType.REMOVE, orphanRemoval = true)
-    @JsonManagedReference
-    private List<Images> imagesList;
 
-    public Location(String name, String description, String address, String priority, int duration, String trivia, byte[] photo, Region region, City city, User user) {
-        this.name = name;
-        this.description = description;
-        this.address = address;
-        this.priority = priority;
-        this.duration = duration;
-        this.trivia = trivia;
-        this.photo = photo;
-        this.region = region;
-        this.city = city;
-        this.user = user;
-    }
-
-    public Location() {
-    }
 }
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/Period.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/Period.java	(revision 6a3a178323fd905112b5392bd9d3cb83b66ef2d3)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/models/Period.java	(revision 6a3a178323fd905112b5392bd9d3cb83b66ef2d3)
@@ -0,0 +1,8 @@
+package finki.diplomska.tripplanner.models;
+
+import javax.persistence.Embeddable;
+
+@Embeddable
+public class Period {
+    private String period;
+}
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/Planner.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/Planner.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/models/Planner.java	(revision 6a3a178323fd905112b5392bd9d3cb83b66ef2d3)
@@ -1,5 +1,4 @@
 package finki.diplomska.tripplanner.models;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
 import lombok.*;
 
@@ -10,4 +9,5 @@
 @Data
 @Table(name = "planners")
+@NoArgsConstructor
 @AllArgsConstructor
 @Getter
@@ -26,5 +26,5 @@
     private String description;
 
-    @ManyToMany()
+    @ManyToMany
     @JoinTable(
             name = "planners_contain",
@@ -33,15 +33,9 @@
     private List<Location> locationList;
 
-    @ManyToOne(fetch = FetchType.EAGER)
-    private User user;
 
-    public Planner(){
-    }
-
-    public Planner(String name, String description, List<Location> locationList, User user){
+    public Planner(String name, String description, List<Location> locationList){
             this.name = name;
             this.description = description;
             this.locationList = locationList;
-            this.user = user;
     }
 
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/User.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/User.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ 	(revision )
@@ -1,100 +1,0 @@
-package finki.diplomska.tripplanner.models;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonManagedReference;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-import lombok.Setter;
-import org.springframework.security.core.GrantedAuthority;
-import org.springframework.security.core.userdetails.UserDetails;
-
-import javax.persistence.*;
-import javax.validation.constraints.Email;
-import javax.validation.constraints.NotBlank;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-
-@Entity
-@Table(name = "users")
-@AllArgsConstructor
-@Getter
-@Setter
-public class User implements UserDetails {
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    private Long id;
-
-    @Email(message = "Username needs to be an email")
-    @NotBlank(message = "username is required")
-    @Column(unique = true)
-    private String username;
-    @NotBlank(message = "Please enter your full name")
-    private String fullName;
-    @NotBlank(message = "Password field is required")
-    private String password;
-    @Transient
-    private String confirmPassword;
-    private Date create_At;
-    private Date update_At;
-
-    //OneToMany with Planners
-    @OneToMany(cascade = CascadeType.REFRESH, fetch = FetchType.EAGER, mappedBy = "user", orphanRemoval = true)
-    @JsonIgnore
-    private List<Planner> planners = new ArrayList<>();
-
-    @OneToMany(cascade = CascadeType.REFRESH, mappedBy = "user", orphanRemoval = true)
-    @JsonIgnore
-    private List<Location> locationList = new ArrayList<>();;
-
-    public User() {
-    }
-
-    public User(String username, String fullName, String password, String confirmPassword) {
-        this.username = username;
-        this.fullName = fullName;
-        this.password = password;
-        this.confirmPassword = confirmPassword;
-    }
-
-    @PrePersist
-    protected void onCreate(){
-        this.create_At = new Date();
-    }
-    @PreUpdate
-    protected void onUpdate(){
-        this.update_At = new Date();
-    }
-
-    @Override
-    @JsonIgnore
-    public Collection<? extends GrantedAuthority> getAuthorities() {
-        return null;
-    }
-
-    @Override
-    @JsonIgnore
-    public boolean isAccountNonExpired() {
-        return true;
-    }
-
-    @Override
-    @JsonIgnore
-    public boolean isAccountNonLocked() {
-        return true;
-    }
-
-    @Override
-    @JsonIgnore
-    public boolean isCredentialsNonExpired() {
-        return true;
-    }
-
-    @Override
-    @JsonIgnore
-    public boolean isEnabled() {
-        return true;
-    }
-}
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/dto/LocationDto.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/dto/LocationDto.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ 	(revision )
@@ -1,52 +1,0 @@
-package finki.diplomska.tripplanner.models.dto;
-
-import finki.diplomska.tripplanner.models.*;
-import lombok.Data;
-
-import java.util.List;
-
-@Data
-public class LocationDto {
-
-    private String name;
-
-    private String description;
-
-    private String address;
-
-    private String priority;
-
-    private int duration;
-
-    private String trivia;
-
-    private byte[] photo;
-
-    private Long region;
-
-    private Long city;
-
-    private String user;
-
-    private List<Long> companions;
-
-    private List<Long> categories;
-
-
-    public LocationDto(String name, String description, String address, String priority, int duration, String trivia, byte[] photo, Long region, Long city, String user ) {
-        this.name = name;
-        this.description = description;
-        this.address = address;
-        this.priority = priority;
-        this.duration = duration;
-        this.trivia = trivia;
-        this.photo = photo;
-        this.region = region;
-        this.city = city;
-        this.user = user;
-        this.companions = companions;
-        this.categories = categories;
-    }
-    public LocationDto() {
-    }
-}
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/dto/PlannerDto.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/dto/PlannerDto.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/models/dto/PlannerDto.java	(revision 6a3a178323fd905112b5392bd9d3cb83b66ef2d3)
@@ -1,6 +1,8 @@
 package finki.diplomska.tripplanner.models.dto;
 
+import finki.diplomska.tripplanner.models.Location;
 import lombok.Data;
 
+import java.util.List;
 
 @Data
@@ -9,10 +11,10 @@
     private String name;
     private String description;
-    private String user;
+    private List<Long> locationList;
 
-    public PlannerDto(String name, String description, String user) {
+    public PlannerDto(String name, String description, List<Long> locationList) {
         this.name = name;
         this.description = description;
-        this.user = user;
+        this.locationList = locationList;
     }
 }
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/dto/PlannerLocationDto.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/dto/PlannerLocationDto.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ 	(revision )
@@ -1,17 +1,0 @@
-package finki.diplomska.tripplanner.models.dto;
-
-import lombok.Data;
-
-@Data
-public class PlannerLocationDto {
-    private Long locationId;
-    private Long plannerId;
-
-    public PlannerLocationDto() {
-    }
-
-    public PlannerLocationDto(Long locationId, Long plannerId) {
-        this.locationId = locationId;
-        this.plannerId = plannerId;
-    }
-}
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/dto/UserDto.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/dto/UserDto.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ 	(revision )
@@ -1,29 +1,0 @@
-package finki.diplomska.tripplanner.models.dto;
-
-
-import lombok.Data;
-
-import java.util.Date;
-
-@Data
-public class UserDto {
-    private String username;
-
-    private String fullName;
-
-    private String password;
-
-    private String confirmPassword;
-
-    private Date create_At;
-
-    private Date update_At;
-
-    public UserDto(String username, String fullName, String password, String confirmPassword) {
-        this.username = username;
-        this.fullName = fullName;
-        this.password = password;
-        this.confirmPassword = confirmPassword;
-
-    }
-}
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/exceptions/CityNotFoundException.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/exceptions/CityNotFoundException.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ 	(revision )
@@ -1,10 +1,0 @@
-package finki.diplomska.tripplanner.models.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-@ResponseStatus(HttpStatus.NOT_FOUND)
-public class CityNotFoundException extends RuntimeException{
-    public CityNotFoundException(Long id) {super(String.format("City with id %d is not found", id));}
-
-}
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/exceptions/CompanionNotFoundException.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/exceptions/CompanionNotFoundException.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ 	(revision )
@@ -1,10 +1,0 @@
-package finki.diplomska.tripplanner.models.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-@ResponseStatus(HttpStatus.NOT_FOUND)
-public class CompanionNotFoundException extends RuntimeException{
-    public CompanionNotFoundException(Long id) {super(String.format("Companion with id %d is not found", id));}
-
-}
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/exceptions/CustomResponseEntityExceptionHandler.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/exceptions/CustomResponseEntityExceptionHandler.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ 	(revision )
@@ -1,18 +1,0 @@
-package finki.diplomska.tripplanner.models.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.ControllerAdvice;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.context.request.WebRequest;
-
-@ControllerAdvice
-@RestController
-public class CustomResponseEntityExceptionHandler {
-    @ExceptionHandler
-    public final ResponseEntity<Object> handleUsernameAlreadyExists(UsernameAlreadyExistsException ex, WebRequest request){
-        UsernameAlreadyExistsResponse exceptionResponse = new UsernameAlreadyExistsResponse(ex.getMessage());
-        return new ResponseEntity(exceptionResponse, HttpStatus.BAD_REQUEST);
-    }
-}
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/exceptions/InvalidLoginResponse.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/exceptions/InvalidLoginResponse.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ 	(revision )
@@ -1,27 +1,0 @@
-package finki.diplomska.tripplanner.models.exceptions;
-
-public class InvalidLoginResponse {
-    private String username;
-    private String password;
-
-    public InvalidLoginResponse() {
-        this.username = "Invalid username";
-        this.password = "Invalid password";
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-}
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/exceptions/RegionNotFoundException.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/exceptions/RegionNotFoundException.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ 	(revision )
@@ -1,9 +1,0 @@
-package finki.diplomska.tripplanner.models.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-@ResponseStatus(HttpStatus.NOT_FOUND)
-public class RegionNotFoundException extends RuntimeException{
-    public RegionNotFoundException(Long id){super(String.format("Region with id %d is not found", id));}
-}
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/exceptions/UsernameAlreadyExistsException.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/exceptions/UsernameAlreadyExistsException.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ 	(revision )
@@ -1,12 +1,0 @@
-package finki.diplomska.tripplanner.models.exceptions;
-
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-@ResponseStatus(HttpStatus.BAD_REQUEST)
-public class UsernameAlreadyExistsException extends RuntimeException{
-
-    public UsernameAlreadyExistsException (String message){
-        super(message);
-    }
-}
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/models/exceptions/UsernameAlreadyExistsResponse.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/models/exceptions/UsernameAlreadyExistsResponse.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ 	(revision )
@@ -1,17 +1,0 @@
-package finki.diplomska.tripplanner.models.exceptions;
-
-public class UsernameAlreadyExistsResponse {
-    private String username;
-
-    public UsernameAlreadyExistsResponse(String username) {
-        this.username = username;
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-}
