Index: sources/app/src/main/java/parkup/entities/ParkingSession.java
===================================================================
--- sources/app/src/main/java/parkup/entities/ParkingSession.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ sources/app/src/main/java/parkup/entities/ParkingSession.java	(revision f6bc52d991e03ece15d64dc62eaeb0f2aed0805b)
@@ -1,3 +1,5 @@
 package parkup.entities;
+
+import parkup.data.Tablicka;
 
 import javax.persistence.*;
@@ -9,8 +11,8 @@
     @Column(name = "parking_session_id")
     @SequenceGenerator(
-            name="parking_session_generator",
+            name="parking_session_sequence_generator",
             sequenceName = "parking_session_sequence",
             allocationSize = 1,
-            initialValue = 700
+            initialValue = 800
     )
     @GeneratedValue(    //za postgres treba sequence da se namesti i ime na generator mi ga davamo kako od gore sto e
@@ -26,15 +28,21 @@
     private String timeEnd;
 
+    @OneToOne(cascade = {CascadeType.ALL})
+    @JoinColumn(name = "reg_tablicka", nullable = false)
+    private Tablicka tablica;
+
     public ParkingSession() {}
 
-    public ParkingSession(int pssId, String timeStart, String timeEnd) {
+    public ParkingSession(int pssId, String timeStart, String timeEnd, Tablicka tablica) {
         this.pssId = pssId;
         this.timeStart = timeStart;
         this.timeEnd = timeEnd;
+        this.tablica = tablica;
     }
 
-    public ParkingSession(String timeStart, String timeEnd) {
+    public ParkingSession(String timeStart, String timeEnd, Tablicka tablica) {
         this.timeStart = timeStart;
         this.timeEnd = timeEnd;
+        this.tablica = tablica;
     }
 
@@ -62,3 +70,11 @@
         this.timeEnd = timeEnd;
     }
+
+    public Tablicka getTablica() {
+        return tablica;
+    }
+
+    public void setTablica(Tablicka tablica) {
+        this.tablica = tablica;
+    }
 }
Index: sources/app/src/main/java/parkup/entities/ParkingSpace.java
===================================================================
--- sources/app/src/main/java/parkup/entities/ParkingSpace.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ sources/app/src/main/java/parkup/entities/ParkingSpace.java	(revision f6bc52d991e03ece15d64dc62eaeb0f2aed0805b)
@@ -9,8 +9,8 @@
     @Column(name = "parking_space_id")
     @SequenceGenerator(
-            name="parking_space_generator",
+            name="parking_space_sequence_generator",
             sequenceName = "parking_space_sequence",
             allocationSize = 1,
-            initialValue = 600
+            initialValue = 700
     )
     @GeneratedValue(    //za postgres treba sequence da se namesti i ime na generator mi ga davamo kako od gore sto e
@@ -29,17 +29,31 @@
     private boolean isHandicaped;
 
+    @Column(name = "latitude")
+    private float lat;
+
+    @Column(name = "longitude")
+    private float lng;
+
+    @OneToOne(cascade = {CascadeType.ALL})
+    @JoinColumn(name = "parking_zona")
+    private ParkingZone parkingZone;
+
     public ParkingSpace() {}
 
-    public ParkingSpace(int psId, String psName, boolean isTaken, boolean isHandicaped) {
+    public ParkingSpace(int psId, String psName, boolean isTaken, boolean isHandicaped, float lat, float lng) {
         this.psId = psId;
         this.psName = psName;
         this.isTaken = isTaken;
         this.isHandicaped = isHandicaped;
+        this.lat = lat;
+        this.lng = lng;
     }
 
-    public ParkingSpace(String psName, boolean isTaken, boolean isHandicaped) {
+    public ParkingSpace(String psName, boolean isTaken, boolean isHandicaped, float lat, float lng) {
         this.psName = psName;
         this.isTaken = isTaken;
         this.isHandicaped = isHandicaped;
+        this.lat = lat;
+        this.lng = lng;
     }
 
@@ -75,4 +89,20 @@
         this.isHandicaped = isHandicaped;
     }
+
+    public float getLat() {
+        return lat;
+    }
+
+    public void setLat(float lat) {
+        this.lat = lat;
+    }
+
+    public float getLng() {
+        return lng;
+    }
+
+    public void setLng(float lng) {
+        this.lng = lng;
+    }
 }
 
Index: sources/app/src/main/java/parkup/entities/ParkingZone.java
===================================================================
--- sources/app/src/main/java/parkup/entities/ParkingZone.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ sources/app/src/main/java/parkup/entities/ParkingZone.java	(revision f6bc52d991e03ece15d64dc62eaeb0f2aed0805b)
@@ -1,3 +1,5 @@
 package parkup.entities;
+
+import parkup.data.ParkingZoneLocation;
 
 import javax.persistence.*;
@@ -10,8 +12,8 @@
     @Id
     @SequenceGenerator(
-            name="parking_zone_generator",
+            name="parking_zone_sequence_generator",
             sequenceName = "parking_zone_sequence",
             allocationSize = 1,
-            initialValue = 500
+            initialValue = 600
     )
     @GeneratedValue(    //za postgres treba sequence da se namesti i ime na generator mi ga davamo kako od gore sto e
@@ -31,8 +33,11 @@
     private int capacity;
 
-    @Column(name = "work_hours")
-    private String workHours;
+    @Column(name = "vreme_od")  //za rabotni casovi od:
+    private int from;
 
-    @Column(name = "location")
+    @Column(name = "vreme_do")    //za rabotni casovi do:
+    private int to;
+
+    @Column(name = "lokacija")
     private String location;
 
@@ -40,32 +45,51 @@
     private int zafateniMesta;
 
+    @Column(name = "color")
+    private String color;
+
+    @ManyToMany(cascade = {CascadeType.ALL})
+    @JoinColumn(name="odgovorniLica",nullable = true)
+    private List<Vraboten> odgovorniLica;
+
     @OneToMany(cascade = {CascadeType.ALL})
-    @JoinColumn(name = "parkingSpaces", nullable = false)
     private List<ParkingSpace> parkingSpaces;
 
-    public ParkingZone() {
+    @OneToOne(cascade = {CascadeType.ALL})
+    private ParkingZoneLocation parkingZoneLocation;
+
+   public ParkingZone() {
+       this.zafateniMesta = 0;
+       this.parkingSpaces = new ArrayList<ParkingSpace>();
+   }
+
+    public ParkingZone(String pzName) {
+        this.pzName = pzName;
         this.zafateniMesta = 0;
         this.parkingSpaces = new ArrayList<ParkingSpace>();
     }
 
-    public ParkingZone(int pzId, String pzName, int price, int capacity, String workHours, String location, List<ParkingSpace> parkingSpaces) {
+    public ParkingZone(int pzId, String pzName, int price, int capacity, String location, List<ParkingSpace> parkingSpaces, String color, int from, int to) {
         this.pzId = pzId;
         this.pzName = pzName;
         this.price = price;
         this.capacity = capacity;
-        this.workHours = workHours;
         this.location = location;
         this.zafateniMesta = 0;
         this.parkingSpaces = parkingSpaces;
+        this.color = color;
+        this.from = from;
+        this.to = to;
     }
 
-    public ParkingZone(String pzName, int price, int capacity, String workHours, String location, List<ParkingSpace> parkingSpaces) {
+    public ParkingZone(String pzName, int price, int capacity, String location, List<ParkingSpace> parkingSpaces, String color, int from, int to) {
         this.pzName = pzName;
         this.price = price;
         this.capacity = capacity;
-        this.workHours = workHours;
         this.location = location;
         this.zafateniMesta = 0;
         this.parkingSpaces = parkingSpaces;
+        this.color = color;
+        this.from = from;
+        this.to = to;
     }
 
@@ -102,12 +126,4 @@
     }
 
-    public String getWorkHours() {
-        return this.workHours;
-    }
-
-    public void setWorkHours(String workHours) {
-        this.workHours = workHours;
-    }
-
     public String getLocation() {
         return this.location;
@@ -125,3 +141,43 @@
 
     public void setParkingSpaces(List<ParkingSpace> parkingSpaces) {this.parkingSpaces = parkingSpaces;}
+
+    public String getColor() {
+        return color;
+    }
+
+    public void setColor(String color) {
+        this.color = color;
+    }
+
+    public int getFrom() {
+        return from;
+    }
+
+    public void setFrom(int from) {
+        this.from = from;
+    }
+
+    public int getTo() {
+        return to;
+    }
+
+    public void setTo(int to) {
+        this.to = to;
+    }
+
+    public ParkingZoneLocation getParkingZoneLocation() {
+        return parkingZoneLocation;
+    }
+
+    public void setParkingZoneLocation(ParkingZoneLocation parkingZoneLocation) {
+        this.parkingZoneLocation = parkingZoneLocation;
+    }
+
+    public List<Vraboten> getOdgovorniLica() {
+        return odgovorniLica;
+    }
+
+    public void setOdgovorniLica(List<Vraboten> odgovorniLica) {
+        this.odgovorniLica = odgovorniLica;
+    }
 }
Index: sources/app/src/main/java/parkup/entities/RegistriranParkirac.java
===================================================================
--- sources/app/src/main/java/parkup/entities/RegistriranParkirac.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ sources/app/src/main/java/parkup/entities/RegistriranParkirac.java	(revision f6bc52d991e03ece15d64dc62eaeb0f2aed0805b)
@@ -2,12 +2,17 @@
 
 import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
 import java.util.List;
 import javax.persistence.*;
 
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
 import parkup.data.Tablicka;
 
 @Entity
 @Table(name = "registriranParkirac")
-public class RegistriranParkirac {
+public class RegistriranParkirac implements UserDetails {
     @Id
     @SequenceGenerator(
@@ -33,5 +38,5 @@
     private String password;
 
-    @OneToMany
+    @OneToMany(cascade ={CascadeType.ALL})
     @Column(name = "regTablicki")
     private List<Tablicka> regTablicki;
@@ -46,8 +51,11 @@
     private String role;
 
+    private boolean locked;
+
+    private boolean enabled;
+
     public RegistriranParkirac() {
-
         this.regTablicki = new ArrayList<Tablicka>();
-        this.role = "ROLE_REGISTIRAN_PARKIRAC";
+        this.role = "ROLE_REGISTRIRAN_PARKIRAC";
     }
 
@@ -60,5 +68,5 @@
         this.email = email;
         this.mobile = mobile;
-        this.role = "ROLE_REGISTIRAN_PARKIRAC";
+        this.role = "ROLE_REGISTRIRAN_PARKIRAC";
     }
 
@@ -70,5 +78,14 @@
         this.email = email;
         this.mobile = mobile;
-        this.role = "ROLE_REGISTIRAN_PARKIRAC";
+        this.role = "ROLE_REGISTRIRAN_PARKIRAC";
+    }
+
+    public RegistriranParkirac(String name, String surname, String email, String password, String mobile) {
+        this.name = name;
+        this.surname = surname;
+        this.password = password;
+        this.email = email;
+        this.mobile = mobile;
+        this.role = "ROLE_REGISTRIRAN_PARKIRAC";
     }
 
@@ -95,12 +112,4 @@
     public void setSurname(String surname) {
         this.surname = surname;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
     }
 
@@ -132,4 +141,43 @@
 
     public void setRole(String role) {this.role = role;}
+
+    @Override
+    public Collection<? extends GrantedAuthority> getAuthorities() {
+        SimpleGrantedAuthority authority = new SimpleGrantedAuthority(role);
+        return Collections.singleton(authority);
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = 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;
+    }
+
+    @Override
+    public boolean isEnabled() {
+        return enabled;
+    }
 }
 
Index: sources/app/src/main/java/parkup/entities/Vraboten.java
===================================================================
--- sources/app/src/main/java/parkup/entities/Vraboten.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ sources/app/src/main/java/parkup/entities/Vraboten.java	(revision f6bc52d991e03ece15d64dc62eaeb0f2aed0805b)
@@ -1,13 +1,16 @@
 package parkup.entities;
 
-import parkup.data.Tablicka;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
+import parkup.data.VrabotenDemo;
 
 import javax.persistence.*;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 
 @Entity
 @Table(name = "vraboten")
-public class Vraboten {
+public class Vraboten implements UserDetails {
     @Id
     @SequenceGenerator(
@@ -49,11 +52,15 @@
     private String status;
 
-    @Column(name = "account")
-    private boolean account;
+    @Column(name="locked")
+    private boolean locked;
+
+    @Column(name = "enabled")
+    private boolean enabled;
+
 
     public Vraboten() {
         this.role = "ROLE_VRABOTEN";
         this.parkingZones = new ArrayList<ParkingZone>();
-        this.account = true;
+        this.enabled = false;
         this.status = "neRaboti";
     }
@@ -68,5 +75,5 @@
         this.parkingZones = parkingZones;
         this.role = "ROLE_VRABOTEN";
-        this.account = true;
+        this.enabled = false;
         this.status = "neRaboti";
     }
@@ -80,6 +87,18 @@
         this.parkingZones = parkingZones;
         this.role = "ROLE_VRABOTEN";
-        this.account = true;
+        this.enabled = false;
         this.status = "neRaboti";
+    }
+
+    public Vraboten(String firstName, String lastName, String email, String password, String mobile) {
+        this.firstName=firstName;
+        this.lastName=lastName;
+        this.email=email;
+        this.password=password;
+        this.mobile=mobile;
+        this.parkingZones=new ArrayList<>();
+        this.enabled=false;
+        this.status="neRaboti";
+        this.role="ROLE_VRABOTEN";
     }
 
@@ -116,8 +135,42 @@
     }
 
+    @Override
+    public Collection<? extends GrantedAuthority> getAuthorities() {
+        return null;
+    }
+
     public String getPassword() {
         return password;
     }
 
+    @Override
+    public String getUsername() {
+        return email;
+    }
+
+    @Override
+    public boolean isAccountNonExpired() {
+        return true;
+    }
+
+    @Override
+    public boolean isAccountNonLocked() {
+        return !locked;
+    }
+
+    public void lockVraboten(){
+        this.locked = !locked;
+    }
+
+    @Override
+    public boolean isCredentialsNonExpired() {
+        return true;
+    }
+
+    @Override
+    public boolean isEnabled() {
+        return enabled;
+    }
+
     public void setPassword(String password) {
         this.password = password;
@@ -144,6 +197,6 @@
     public void setStatus(String status) {this.status = status;}
 
-    public boolean isAccount() {return account;}
-
-    public void setAccount(boolean account) {this.account = account;}
+    public boolean isAccount() {return enabled;}
+
+    public void setAccount(boolean account) {this.enabled = account;}
 }
