Index: sources/app/src/main/java/parkup/entities/Administrator.java
===================================================================
--- sources/app/src/main/java/parkup/entities/Administrator.java	(revision 9ff45d65e1d0058eb0c79395ba62a726630c2daa)
+++ sources/app/src/main/java/parkup/entities/Administrator.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
@@ -4,4 +4,5 @@
 import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.security.core.userdetails.UserDetails;
+import parkup.data.enumarations.UserRole;
 
 import javax.persistence.*;
@@ -41,6 +42,7 @@
     private String mobile;
 
+    @Enumerated
     @Column(name = "role")
-    private String role;
+    private UserRole role;
 
     private boolean locked;
@@ -49,5 +51,6 @@
 
     public Administrator(){
-        this.role = "ROLE_ADMINISTRATOR";
+        this.role = UserRole.ADMIN;
+        this.enabled=true;
     }
 
@@ -59,5 +62,6 @@
         this.password = password;
         this.mobile = mobile;
-        this.role = "ROLE_ADMINISTRATOR";
+        this.enabled=true;
+        this.role = UserRole.ADMIN;
     }
 
@@ -68,5 +72,6 @@
         this.password = password;
         this.mobile = mobile;
-        this.role = "ROLE_ADMINISTRATOR";
+        this.role = UserRole.ADMIN;
+        this.enabled=true;
     }
 
@@ -77,5 +82,6 @@
         this.password = password;
         this.mobile = mobile;
-        this.role = "ROLE_ADMINISTRATOR";
+        this.role = UserRole.ADMIN;
+        this.enabled=true;
     }
 
@@ -124,11 +130,11 @@
     }
 
-    public String getRole() {return role;}
+    public UserRole getRole() {return role;}
 
-    public void setRole(String role) {this.role = role;}
+    public void setRole(UserRole role) {this.role = role;}
 
     @Override
     public Collection<? extends GrantedAuthority> getAuthorities() {
-        SimpleGrantedAuthority authority = new SimpleGrantedAuthority(role);
+        SimpleGrantedAuthority authority = new SimpleGrantedAuthority(role.getAuthority());
         return Collections.singleton(authority);
     }
Index: sources/app/src/main/java/parkup/entities/Guest.java
===================================================================
--- sources/app/src/main/java/parkup/entities/Guest.java	(revision 9ff45d65e1d0058eb0c79395ba62a726630c2daa)
+++ sources/app/src/main/java/parkup/entities/Guest.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
@@ -3,9 +3,16 @@
 import javax.persistence.*;
 
-import parkup.data.Tablicka;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
+import parkup.data.Plate;
+import parkup.data.enumarations.UserRole;
+
+import java.util.Collection;
+import java.util.Collections;
 
 @Entity
 @Table(name = "guest")
-public class Guest {
+public class Guest implements UserDetails {
     @Id
     @SequenceGenerator(
@@ -25,5 +32,5 @@
     @OneToOne
     @JoinColumn(name = "tablickaId", nullable = false)
-    private Tablicka tablicka;
+    private Plate plate;
 
     @Column(name = "email")
@@ -36,17 +43,23 @@
     private ParkingSession session;
 
-    public Guest() {}
+    @Enumerated
+    private UserRole role;
 
-    public Guest(int guestId, Tablicka tablicka, String email, String mobile) {
+
+    public Guest() {this.role=UserRole.GUEST;}
+
+    public Guest(int guestId, Plate plate, String email, String mobile) {
         this.guestId = guestId;
-        this.tablicka = tablicka;
+        this.plate = plate;
         this.email = email;
         this.mobile = mobile;
+        this.role=UserRole.GUEST;
     }
 
-    public Guest(Tablicka tablicka, String email, String mobile) {
-        this.tablicka = tablicka;
+    public Guest(Plate plate, String email, String mobile) {
+        this.plate = plate;
         this.email = email;
         this.mobile = mobile;
+        this.role=UserRole.GUEST;
     }
 
@@ -59,10 +72,10 @@
     }
 
-    public Tablicka getTablicka() {
-        return tablicka;
+    public Plate getTablicka() {
+        return plate;
     }
 
-    public void setTablicka(Tablicka tablicka) {
-        this.tablicka = tablicka;
+    public void setTablicka(Plate plate) {
+        this.plate = plate;
     }
 
@@ -75,4 +88,20 @@
     }
 
+    public ParkingSession getSession() {
+        return session;
+    }
+
+    public void setSession(ParkingSession session) {
+        this.session = session;
+    }
+
+    public UserRole getRole() {
+        return role;
+    }
+
+    public void setRole(UserRole role) {
+        this.role = role;
+    }
+
     public String getMobile() {
         return mobile;
@@ -82,3 +111,39 @@
         this.mobile = mobile;
     }
+
+    @Override
+    public Collection<? extends GrantedAuthority> getAuthorities() {
+        SimpleGrantedAuthority authority = new SimpleGrantedAuthority(role.name());
+        return Collections.singleton(authority);
+    }
+
+    @Override
+    public String getPassword() {
+        return null;
+    }
+
+    @Override
+    public String getUsername() {
+        return Integer.toString(guestId);
+    }
+
+    @Override
+    public boolean isAccountNonExpired() {
+        return false;
+    }
+
+    @Override
+    public boolean isAccountNonLocked() {
+        return false;
+    }
+
+    @Override
+    public boolean isCredentialsNonExpired() {
+        return false;
+    }
+
+    @Override
+    public boolean isEnabled() {
+        return false;
+    }
 }
Index: sources/app/src/main/java/parkup/entities/ParkingSession.java
===================================================================
--- sources/app/src/main/java/parkup/entities/ParkingSession.java	(revision 9ff45d65e1d0058eb0c79395ba62a726630c2daa)
+++ sources/app/src/main/java/parkup/entities/ParkingSession.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
@@ -2,5 +2,5 @@
 
 import org.springframework.format.annotation.DateTimeFormat;
-import parkup.data.Tablicka;
+import parkup.data.Plate;
 import parkup.data.enumarations.SessionStatus;
 
@@ -34,6 +34,6 @@
 
     @OneToOne(cascade = {CascadeType.ALL})
-    @JoinColumn(name = "reg_tablicka", nullable = false)
-    private Tablicka tablica;
+    @JoinColumn(name = "plate", nullable = false)
+    private Plate plate;
 
     @Column(name="session_status")
@@ -60,8 +60,8 @@
     }
 
-    public ParkingSession(Tablicka tablica){
+    public ParkingSession(Plate plate){
         this.timeStart= LocalDateTime.now();
         this.timeEnd=null;
-        this.tablica=tablica;
+        this.plate=plate;
         this.status=SessionStatus.STARTED_UNVERIFIED;
     }
@@ -92,10 +92,10 @@
     }
 
-    public Tablicka getTablica() {
-        return tablica;
+    public Plate getPlate() {
+        return plate;
     }
 
-    public void setTablica(Tablicka tablica) {
-        this.tablica = tablica;
+    public void setPlate(Plate plate) {
+        this.plate = plate;
     }
 
Index: sources/app/src/main/java/parkup/entities/ParkingZone.java
===================================================================
--- sources/app/src/main/java/parkup/entities/ParkingZone.java	(revision 9ff45d65e1d0058eb0c79395ba62a726630c2daa)
+++ sources/app/src/main/java/parkup/entities/ParkingZone.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
@@ -43,5 +43,5 @@
 
     @Transient
-    @Column(name = "zafateniMesta")
+    @Column(name = "takenSpaces")
     private int takenSpaces;
 
@@ -52,5 +52,5 @@
 //    private List<Vraboten> odgovorniLica;
 
-    @OneToMany(cascade = {CascadeType.MERGE})
+    @OneToMany(cascade = {CascadeType.ALL})
     private List<ParkingSpace> parkingSpaces;
 
Index: sources/app/src/main/java/parkup/entities/RegisteredUser.java
===================================================================
--- sources/app/src/main/java/parkup/entities/RegisteredUser.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/entities/RegisteredUser.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
@@ -0,0 +1,213 @@
+package parkup.entities;
+
+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.Plate;
+import parkup.data.enumarations.UserRole;
+
+@Entity
+@Table(name = "registeredUser")
+public class RegisteredUser implements UserDetails {
+    @Id
+    @SequenceGenerator(
+            name="registeredUser_sequence_generator",
+            sequenceName = "registeredUser_sequence",
+            allocationSize = 1,
+            initialValue = 300
+    )
+    @GeneratedValue(    //za postgres treba sequence da se namesti i ime na generator mi ga davamo kako od gore sto e
+            strategy = GenerationType.SEQUENCE,
+            generator = "registeredUser_sequence_generator"
+    )
+    @Column(name = "regParkId")
+    private int regParkId;
+
+    @Column(name = "name")
+    private String name;
+
+    @Column(name = "surname")
+    private String surname;
+
+    @Column(name = "password")
+    private String password;
+
+    @OneToMany(cascade ={CascadeType.ALL})
+    @Column(name = "regPlates")
+    private List<Plate> plates;
+
+    @Column(name = "email")
+    private String email;
+
+    @Column(name = "mobile")
+    private String mobile;
+
+    @Enumerated
+    @Column(name = "role")
+    private UserRole role;
+
+    @OneToOne
+    private ParkingSession session;
+
+    private boolean locked;
+
+    private boolean enabled;
+
+    public RegisteredUser() {
+        this.plates = new ArrayList<Plate>();
+        this.role = UserRole.REG_USER;
+        session=null;
+    }
+
+    public RegisteredUser(int regParkId, String name, String surname, String password, List<Plate> plates, String email, String mobile) {
+        this.regParkId = regParkId;
+        this.name = name;
+        this.surname = surname;
+        this.password = password;
+        this.plates = plates;
+        this.email = email;
+        this.mobile = mobile;
+        this.role = UserRole.REG_USER;
+        session=null;
+    }
+
+    public RegisteredUser(String name, String surname, String password, List<Plate> plates, String email, String mobile) {
+        this.name = name;
+        this.surname = surname;
+        this.password = password;
+        this.plates = plates;
+        this.email = email;
+        this.mobile = mobile;
+        this.role = UserRole.REG_USER;
+        session=null;
+    }
+
+    public RegisteredUser(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 = UserRole.REG_USER;
+        session=null;
+    }
+
+    public ParkingSession getSession() {
+        return session;
+    }
+
+    public void setSession(ParkingSession session) {
+        this.session = session;
+    }
+
+    public boolean isLocked() {
+        return locked;
+    }
+
+    public void setLocked(boolean locked) {
+        this.locked = locked;
+    }
+
+    public void setEnabled(boolean enabled) {
+        this.enabled = enabled;
+    }
+
+
+    public int getRegParkId() {
+        return regParkId;
+    }
+
+    public void setRegParkId(int regParkId) {
+        this.regParkId = regParkId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getSurname() {
+        return surname;
+    }
+
+    public void setSurname(String surname) {
+        this.surname = surname;
+    }
+
+    public List<Plate> getPlates() {
+        return plates;
+    }
+
+    public void setPlates(List<Plate> plates) {
+        this.plates = plates;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public UserRole getRole() {return role;}
+
+    public void setRole(UserRole role) {this.role = role;}
+
+    @Override
+    public Collection<? extends GrantedAuthority> getAuthorities() {
+        SimpleGrantedAuthority authority = new SimpleGrantedAuthority(role.getAuthority());
+        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/RegistriranParkirac.java
===================================================================
--- sources/app/src/main/java/parkup/entities/RegistriranParkirac.java	(revision 9ff45d65e1d0058eb0c79395ba62a726630c2daa)
+++ 	(revision )
@@ -1,211 +1,0 @@
-package parkup.entities;
-
-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 implements UserDetails {
-    @Id
-    @SequenceGenerator(
-            name="registriranParkirac_sequence_generator",
-            sequenceName = "registriranParkirac_sequence",
-            allocationSize = 1,
-            initialValue = 300
-    )
-    @GeneratedValue(    //za postgres treba sequence da se namesti i ime na generator mi ga davamo kako od gore sto e
-            strategy = GenerationType.SEQUENCE,
-            generator = "registriranParkirac_sequence_generator"
-    )
-    @Column(name = "regParkId")
-    private int regParkId;
-
-    @Column(name = "name")
-    private String name;
-
-    @Column(name = "surname")
-    private String surname;
-
-    @Column(name = "password")
-    private String password;
-
-    @OneToMany(cascade ={CascadeType.ALL})
-    @Column(name = "regTablicki")
-    private List<Tablicka> regTablicki;
-
-    @Column(name = "email")
-    private String email;
-
-    @Column(name = "mobile")
-    private String mobile;
-
-    @Column(name = "role")
-    private String role;
-
-    @OneToOne
-    private ParkingSession session;
-
-    private boolean locked;
-
-    private boolean enabled;
-
-    public RegistriranParkirac() {
-        this.regTablicki = new ArrayList<Tablicka>();
-        this.role = "ROLE_REGISTRIRAN_PARKIRAC";
-        session=null;
-    }
-
-    public RegistriranParkirac(int regParkId, String name, String surname, String password, List<Tablicka> regTablicki, String email, String mobile) {
-        this.regParkId = regParkId;
-        this.name = name;
-        this.surname = surname;
-        this.password = password;
-        this.regTablicki = regTablicki;
-        this.email = email;
-        this.mobile = mobile;
-        this.role = "ROLE_REGISTRIRAN_PARKIRAC";
-        session=null;
-    }
-
-    public RegistriranParkirac(String name, String surname, String password, List<Tablicka> regTablicki, String email, String mobile) {
-        this.name = name;
-        this.surname = surname;
-        this.password = password;
-        this.regTablicki = regTablicki;
-        this.email = email;
-        this.mobile = mobile;
-        this.role = "ROLE_REGISTRIRAN_PARKIRAC";
-        session=null;
-    }
-
-    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";
-        session=null;
-    }
-
-    public ParkingSession getSession() {
-        return session;
-    }
-
-    public void setSession(ParkingSession session) {
-        this.session = session;
-    }
-
-    public boolean isLocked() {
-        return locked;
-    }
-
-    public void setLocked(boolean locked) {
-        this.locked = locked;
-    }
-
-    public void setEnabled(boolean enabled) {
-        this.enabled = enabled;
-    }
-
-
-    public int getRegParkId() {
-        return regParkId;
-    }
-
-    public void setRegParkId(int regParkId) {
-        this.regParkId = regParkId;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getSurname() {
-        return surname;
-    }
-
-    public void setSurname(String surname) {
-        this.surname = surname;
-    }
-
-    public List<Tablicka> getRegTablicki() {
-        return regTablicki;
-    }
-
-    public void setRegTablicki(List<Tablicka> regTablicki) {
-        this.regTablicki = regTablicki;
-    }
-
-    public String getEmail() {
-        return email;
-    }
-
-    public void setEmail(String email) {
-        this.email = email;
-    }
-
-    public String getMobile() {
-        return mobile;
-    }
-
-    public void setMobile(String mobile) {
-        this.mobile = mobile;
-    }
-
-    public String getRole() {return role;}
-
-    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 9ff45d65e1d0058eb0c79395ba62a726630c2daa)
+++ 	(revision )
@@ -1,217 +1,0 @@
-package parkup.entities;
-
-import org.springframework.security.core.GrantedAuthority;
-import org.springframework.security.core.userdetails.UserDetails;
-import parkup.data.VrabotenDemo;
-import parkup.data.enumarations.EmployeeStatus;
-
-import javax.persistence.*;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-@Entity
-@Table(name = "vraboten")
-public class Vraboten implements UserDetails {
-    @Id
-    @SequenceGenerator(
-            name="vraboten_sequence_generator",
-            sequenceName = "vraboten_sequence",
-            allocationSize = 1,
-            initialValue = 200
-    )
-    @GeneratedValue(    //za postgres treba sequence da se namesti i ime na generator mi ga davamo kako od gore sto e
-            strategy = GenerationType.SEQUENCE,
-            generator = "vraboten_sequence_generator"
-    )
-    @Column(name = "vrabotenId")
-    private int vrabotenId;
-
-    @Override
-    public String toString() {
-        return "Vraboten{" +
-                "firstName='" + firstName + '\'' +
-                ", lastName='" + lastName + '\'' +
-                ", parkingZones=" + parkingZones +
-                ", locked=" + locked +
-                ", enabled=" + enabled +
-                '}';
-    }
-
-    @Column(name = "firstName")
-    private String firstName;
-
-    @Column(name = "lastName")
-    private String lastName;
-
-    @Column(name = "email")
-    private String email;
-
-    @Column(name = "password")
-    private String password;
-
-    @Column(name = "mobile")
-    private String mobile;
-
-    @Column(name = "role")
-    private String role;
-
-    @ManyToMany(cascade = {CascadeType.ALL})
-    private List<ParkingZone> parkingZones;
-
-    @Column(name = "status")
-    private EmployeeStatus status;
-
-    public void setLocked(boolean locked) {
-        this.locked = locked;
-    }
-
-    @Column(name="locked")
-    private boolean locked;
-
-    @Column(name = "enabled")
-    private boolean enabled;
-
-
-    public Vraboten() {
-        this.role = "ROLE_VRABOTEN";
-        this.parkingZones = new ArrayList<ParkingZone>();
-        this.enabled = true;
-        this.status = EmployeeStatus.NOT_WORKING;
-    }
-
-    public Vraboten(int vrabotenId, String firstName, String lastName, String email, String password, String mobile, List<ParkingZone> parkingZones) {
-        this.vrabotenId = vrabotenId;
-        this.firstName = firstName;
-        this.lastName = lastName;
-        this.email = email;
-        this.password = password;
-        this.mobile = mobile;
-        this.parkingZones = parkingZones;
-        this.role = "ROLE_VRABOTEN";
-        this.enabled = true;
-        this.status = EmployeeStatus.NOT_WORKING;
-    }
-
-    public Vraboten(String firstName, String lastName, String email, String password, String mobile, List<ParkingZone> parkingZones) {
-        this.firstName = firstName;
-        this.lastName = lastName;
-        this.email = email;
-        this.password = password;
-        this.mobile = mobile;
-        this.parkingZones = parkingZones;
-        this.role = "ROLE_VRABOTEN";
-        this.enabled = true;
-        this.status = EmployeeStatus.NOT_WORKING;
-    }
-
-    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.role="ROLE_VRABOTEN";
-        this.enabled=true;
-        this.status = EmployeeStatus.NOT_WORKING;
-    }
-
-    public int getVrabotenId() {
-        return vrabotenId;
-    }
-
-    public void setVrabotenId(int vrabotenId) {
-        this.vrabotenId = vrabotenId;
-    }
-
-    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;
-    }
-
-    @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;
-    }
-
-    public String getMobile() {
-        return mobile;
-    }
-
-    public void setMobile(String mobile) {
-        this.mobile = mobile;
-    }
-
-    public String getRole() {return role;}
-
-    public void setRole(String role) {this.role = role;}
-
-    public List<ParkingZone> getParkingZones() {return parkingZones;}
-
-    public void setParkingZones(List<ParkingZone> parkingZones) {this.parkingZones = parkingZones;}
-
-    public EmployeeStatus getStatus() {return status;}
-
-    public void setStatus(EmployeeStatus status) {this.status = status;}
-
-    public boolean isAccount() {return enabled;}
-
-    public void setAccount(boolean account) {this.enabled = account;}
-}
Index: sources/app/src/main/java/parkup/entities/Worker.java
===================================================================
--- sources/app/src/main/java/parkup/entities/Worker.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
+++ sources/app/src/main/java/parkup/entities/Worker.java	(revision df4089c7ef898fde56a92f138b1af0174628ad75)
@@ -0,0 +1,221 @@
+package parkup.entities;
+
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
+import parkup.data.enumarations.EmployeeStatus;
+import parkup.data.enumarations.UserRole;
+
+import javax.persistence.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+@Entity
+@Table(name = "worker")
+public class Worker implements UserDetails {
+    @Id
+    @SequenceGenerator(
+            name="worker_sequence_generator",
+            sequenceName = "worker_sequence",
+            allocationSize = 1,
+            initialValue = 200
+    )
+    @GeneratedValue(    //za postgres treba sequence da se namesti i ime na generator mi ga davamo kako od gore sto e
+            strategy = GenerationType.SEQUENCE,
+            generator = "worker_sequence_generator"
+    )
+    @Column(name = "workerId")
+    private int workerId;
+
+    @Override
+    public String toString() {
+        return "Vraboten{" +
+                "firstName='" + firstName + '\'' +
+                ", lastName='" + lastName + '\'' +
+                ", parkingZones=" + parkingZones +
+                ", locked=" + locked +
+                ", enabled=" + enabled +
+                '}';
+    }
+
+    @Column(name = "firstName")
+    private String firstName;
+
+    @Column(name = "lastName")
+    private String lastName;
+
+    @Column(name = "email")
+    private String email;
+
+    @Column(name = "password")
+    private String password;
+
+    @Column(name = "mobile")
+    private String mobile;
+
+    @Enumerated
+    @Column(name = "role")
+    private UserRole role;
+
+    @ManyToMany(cascade = {CascadeType.ALL})
+    private List<ParkingZone> parkingZones;
+
+    @Column(name = "status")
+    private EmployeeStatus status;
+
+    public void setLocked(boolean locked) {
+        this.locked = locked;
+    }
+
+    @Column(name="locked")
+    private boolean locked;
+
+    @Column(name = "enabled")
+    private boolean enabled;
+
+
+    public Worker() {
+        this.role = UserRole.WORKER;
+        this.parkingZones = new ArrayList<ParkingZone>();
+        this.enabled = true;
+        this.status = EmployeeStatus.NOT_WORKING;
+    }
+
+    public Worker(int workerId, String firstName, String lastName, String email, String password, String mobile, List<ParkingZone> parkingZones) {
+        this.workerId = workerId;
+        this.firstName = firstName;
+        this.lastName = lastName;
+        this.email = email;
+        this.password = password;
+        this.mobile = mobile;
+        this.parkingZones = parkingZones;
+        this.role = UserRole.WORKER;
+        this.enabled = true;
+        this.status = EmployeeStatus.NOT_WORKING;
+    }
+
+    public Worker(String firstName, String lastName, String email, String password, String mobile, List<ParkingZone> parkingZones) {
+        this.firstName = firstName;
+        this.lastName = lastName;
+        this.email = email;
+        this.password = password;
+        this.mobile = mobile;
+        this.parkingZones = parkingZones;
+        this.role = UserRole.WORKER;
+        this.enabled = true;
+        this.status = EmployeeStatus.NOT_WORKING;
+    }
+
+    public Worker(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.role = UserRole.WORKER;
+        this.enabled=true;
+        this.status = EmployeeStatus.NOT_WORKING;
+    }
+
+    public int getWorkerId() {
+        return workerId;
+    }
+
+    public void setWorkerId(int workerId) {
+        this.workerId = workerId;
+    }
+
+    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;
+    }
+
+    @Override
+    public Collection<? extends GrantedAuthority> getAuthorities() {
+        SimpleGrantedAuthority authority = new SimpleGrantedAuthority(role.getAuthority());
+        return Collections.singleton(authority);
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    @Override
+    public String getUsername() {
+        return email;
+    }
+
+    @Override
+    public boolean isAccountNonExpired() {
+        return true;
+    }
+
+    @Override
+    public boolean isAccountNonLocked() {
+        return !locked;
+    }
+
+    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;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public UserRole getRole() {return role;}
+
+    public void setRole(UserRole role) {this.role = role;}
+
+    public List<ParkingZone> getParkingZones() {return parkingZones;}
+
+    public void setParkingZones(List<ParkingZone> parkingZones) {this.parkingZones = parkingZones;}
+
+    public EmployeeStatus getStatus() {return status;}
+
+    public void setStatus(EmployeeStatus status) {this.status = status;}
+
+    public boolean isAccount() {return enabled;}
+
+    public void setAccount(boolean account) {this.enabled = account;}
+}
