Index: sources/app/src/main/java/parkup/configs/token/ConfirmationToken.java
===================================================================
--- sources/app/src/main/java/parkup/configs/token/ConfirmationToken.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ 	(revision )
@@ -1,105 +1,0 @@
-package parkup.configs.token;
-
-import parkup.entities.Administrator;
-
-import javax.persistence.*;
-import java.time.LocalDateTime;
-
-@Entity
-public class ConfirmationToken {
-
-    @Id
-    @Column(name = "confirmation_token_id")
-    @SequenceGenerator(
-            name="confirmation_token_generator",
-            sequenceName = "confirmation_token_sequence",
-            allocationSize = 1,
-            initialValue = 900
-    )
-    @GeneratedValue(    //za postgres treba sequence da se namesti i ime na generator mi ga davamo kako od gore sto e
-            strategy = GenerationType.SEQUENCE,
-            generator = "confirmation_token_sequence_generator"
-    )
-    private int id;
-
-    @Column(nullable = false)
-    private String token;
-
-    @Column(nullable = false)
-    private LocalDateTime createdAt;
-
-    @Column(nullable = false)
-    private LocalDateTime expiresAt;
-
-    private LocalDateTime confirmedAt;
-
-    @ManyToOne
-    @JoinColumn(nullable = false, name = "administrator_id")
-    //many confirmation tokens to one administrator
-    private Administrator administrator;
-
-    public ConfirmationToken() {}
-
-    public ConfirmationToken(int id, String token, LocalDateTime createdAt, LocalDateTime expiresAt, Administrator administrator) {
-        this.id = id;
-        this.token = token;
-        this.createdAt = createdAt;
-        this.expiresAt = expiresAt;
-        this.administrator = administrator;
-    }
-
-    public ConfirmationToken(String token, LocalDateTime createdAt, LocalDateTime expiresAt, Administrator administrator) {
-        this.token = token;
-        this.createdAt = createdAt;
-        this.expiresAt = expiresAt;
-        this.administrator = administrator;
-    }
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    public String getToken() {
-        return token;
-    }
-
-    public void setToken(String token) {
-        this.token = token;
-    }
-
-    public LocalDateTime getCreatedAt() {
-        return createdAt;
-    }
-
-    public void setCreatedAt(LocalDateTime createdAt) {
-        this.createdAt = createdAt;
-    }
-
-    public LocalDateTime getExpiresAt() {
-        return expiresAt;
-    }
-
-    public void setExpiresAt(LocalDateTime expiresAt) {
-        this.expiresAt = expiresAt;
-    }
-
-    public LocalDateTime getConfirmedAt() {
-        return confirmedAt;
-    }
-
-    public void setConfirmedAt(LocalDateTime confirmedAt) {
-        this.confirmedAt = confirmedAt;
-    }
-
-    public Administrator getAdministrator() {
-        return administrator;
-    }
-
-    public void setAdministrator(Administrator administrator) {
-        this.administrator = administrator;
-    }
-}
Index: sources/app/src/main/java/parkup/configs/token/ConfirmationTokenRP.java
===================================================================
--- sources/app/src/main/java/parkup/configs/token/ConfirmationTokenRP.java	(revision f6bc52d991e03ece15d64dc62eaeb0f2aed0805b)
+++ sources/app/src/main/java/parkup/configs/token/ConfirmationTokenRP.java	(revision f6bc52d991e03ece15d64dc62eaeb0f2aed0805b)
@@ -0,0 +1,105 @@
+package parkup.configs.token;
+
+import parkup.entities.RegistriranParkirac;
+
+import javax.persistence.*;
+import java.time.LocalDateTime;
+
+@Entity
+public class ConfirmationTokenRP {
+
+    @Id
+    @Column(name = "confirmation_token_id")
+    @SequenceGenerator(
+            name="confirmation_token_sequence_generator_RP",
+            sequenceName = "confirmation_token_sequence_RP",
+            allocationSize = 1,
+            initialValue = 1100
+    )
+    @GeneratedValue(    //za postgres treba sequence da se namesti i ime na generator mi ga davamo kako od gore sto e
+            strategy = GenerationType.SEQUENCE,
+            generator = "confirmation_token_sequence_generator_RP"
+    )
+    private int id;
+
+    @Column(nullable = false)
+    private String token;
+
+    @Column(nullable = false)
+    private LocalDateTime createdAt;
+
+    @Column(nullable = false)
+    private LocalDateTime expiresAt;
+
+    private LocalDateTime confirmedAt;
+
+    @ManyToOne
+    @JoinColumn(nullable = false, name = "registriranParkirac_id")
+    //many confirmation tokens to one registriranParkirac
+    private RegistriranParkirac registriranParkirac;
+
+    public ConfirmationTokenRP() {}
+
+    public ConfirmationTokenRP(int id, String token, LocalDateTime createdAt, LocalDateTime expiresAt, RegistriranParkirac registriranParkirac) {
+        this.id = id;
+        this.token = token;
+        this.createdAt = createdAt;
+        this.expiresAt = expiresAt;
+        this.registriranParkirac = registriranParkirac;
+    }
+
+    public ConfirmationTokenRP(String token, LocalDateTime createdAt, LocalDateTime expiresAt, RegistriranParkirac registriranParkirac) {
+        this.token = token;
+        this.createdAt = createdAt;
+        this.expiresAt = expiresAt;
+        this.registriranParkirac = registriranParkirac;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getToken() {
+        return token;
+    }
+
+    public void setToken(String token) {
+        this.token = token;
+    }
+
+    public LocalDateTime getCreatedAt() {
+        return createdAt;
+    }
+
+    public void setCreatedAt(LocalDateTime createdAt) {
+        this.createdAt = createdAt;
+    }
+
+    public LocalDateTime getExpiresAt() {
+        return expiresAt;
+    }
+
+    public void setExpiresAt(LocalDateTime expiresAt) {
+        this.expiresAt = expiresAt;
+    }
+
+    public LocalDateTime getConfirmedAt() {
+        return confirmedAt;
+    }
+
+    public void setConfirmedAt(LocalDateTime confirmedAt) {
+        this.confirmedAt = confirmedAt;
+    }
+
+    public RegistriranParkirac getRegistriranParkirac() {
+        return registriranParkirac;
+    }
+
+    public void setRegistriranParkirac(RegistriranParkirac registriranParkirac) {
+        this.registriranParkirac = registriranParkirac;
+    }
+}
Index: sources/app/src/main/java/parkup/configs/token/ConfirmationTokenRepository.java
===================================================================
--- sources/app/src/main/java/parkup/configs/token/ConfirmationTokenRepository.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ 	(revision )
@@ -1,23 +1,0 @@
-package parkup.configs.token;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.Modifying;
-import org.springframework.data.jpa.repository.Query;
-import org.springframework.stereotype.Repository;
-
-import javax.transaction.Transactional;
-import java.time.LocalDateTime;
-import java.util.Optional;
-
-@Repository
-public interface ConfirmationTokenRepository extends JpaRepository<ConfirmationToken,Integer> {
-
-    Optional<ConfirmationToken> findByToken(String token);
-
-    @Transactional
-    @Modifying
-    @Query("UPDATE ConfirmationToken c " +
-            "SET c.confirmedAt = ?2 " +
-            "WHERE c.token = ?1")
-    int updateConfirmedAt(String token, LocalDateTime confirmedAt);
-}
Index: sources/app/src/main/java/parkup/configs/token/ConfirmationTokenRepositoryRP.java
===================================================================
--- sources/app/src/main/java/parkup/configs/token/ConfirmationTokenRepositoryRP.java	(revision f6bc52d991e03ece15d64dc62eaeb0f2aed0805b)
+++ sources/app/src/main/java/parkup/configs/token/ConfirmationTokenRepositoryRP.java	(revision f6bc52d991e03ece15d64dc62eaeb0f2aed0805b)
@@ -0,0 +1,25 @@
+package parkup.configs.token;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.stereotype.Repository;
+
+import javax.transaction.Transactional;
+import java.time.LocalDateTime;
+import java.util.Optional;
+
+@Repository
+public interface ConfirmationTokenRepositoryRP extends JpaRepository<ConfirmationTokenRP,Integer> {
+
+    Optional<ConfirmationTokenRP> findByToken(String token);
+
+    void deleteByRegistriranParkirac_RegParkId(int regParkId);
+
+    @Transactional
+    @Modifying
+    @Query("UPDATE ConfirmationTokenRP c " +
+            "SET c.confirmedAt = ?2 " +
+            "WHERE c.token = ?1")
+    int updateConfirmedAt(String token, LocalDateTime confirmedAt);
+}
Index: sources/app/src/main/java/parkup/configs/token/ConfirmationTokenRepositoryW.java
===================================================================
--- sources/app/src/main/java/parkup/configs/token/ConfirmationTokenRepositoryW.java	(revision f6bc52d991e03ece15d64dc62eaeb0f2aed0805b)
+++ sources/app/src/main/java/parkup/configs/token/ConfirmationTokenRepositoryW.java	(revision f6bc52d991e03ece15d64dc62eaeb0f2aed0805b)
@@ -0,0 +1,25 @@
+package parkup.configs.token;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.stereotype.Repository;
+
+import javax.transaction.Transactional;
+import java.time.LocalDateTime;
+import java.util.Optional;
+
+@Repository
+public interface ConfirmationTokenRepositoryW extends JpaRepository<ConfirmationTokenW,Integer> {
+
+    Optional<ConfirmationTokenW> findByToken(String token);
+
+    void deleteByVraboten_VrabotenId(int vraboten_id);
+
+    @Transactional
+    @Modifying
+    @Query("UPDATE ConfirmationTokenW c " +
+            "SET c.confirmedAt = ?2 " +
+            "WHERE c.token = ?1")
+    int updateConfirmedAt(String token, LocalDateTime confirmedAt);
+}
Index: sources/app/src/main/java/parkup/configs/token/ConfirmationTokenService.java
===================================================================
--- sources/app/src/main/java/parkup/configs/token/ConfirmationTokenService.java	(revision ce6ad22249e902dea17e6ba473846ccebdd4330c)
+++ sources/app/src/main/java/parkup/configs/token/ConfirmationTokenService.java	(revision f6bc52d991e03ece15d64dc62eaeb0f2aed0805b)
@@ -9,20 +9,39 @@
 public class ConfirmationTokenService {
 
-    private final ConfirmationTokenRepository confirmationTokenRepository;
+    private final ConfirmationTokenRepositoryRP confirmationTokenRepositoryRP;
+    private final ConfirmationTokenRepositoryW confirmationTokenRepositoryW;
 
-    public ConfirmationTokenService(ConfirmationTokenRepository confirmationTokenRepository) {
-        this.confirmationTokenRepository = confirmationTokenRepository;
+    public ConfirmationTokenService(ConfirmationTokenRepositoryRP confirmationTokenRepositoryRP, ConfirmationTokenRepositoryW confirmationTokenRepositoryW) {
+        this.confirmationTokenRepositoryRP = confirmationTokenRepositoryRP;
+        this.confirmationTokenRepositoryW = confirmationTokenRepositoryW;
     }
 
-    public void saveConfirmationToken(ConfirmationToken token){
-        confirmationTokenRepository.save(token);
+    public void saveConfirmationTokenRP(ConfirmationTokenRP token){
+        confirmationTokenRepositoryRP.save(token);
     }
 
-    public Optional<ConfirmationToken> getToken(String token) {
-        return confirmationTokenRepository.findByToken(token);
+    public void saveConfirmationTokenW(ConfirmationTokenW token){
+        confirmationTokenRepositoryW.save(token);}
+
+    public Optional<ConfirmationTokenRP> getTokenRP(String token) {
+        return confirmationTokenRepositoryRP.findByToken(token);
+    }
+    public Optional<ConfirmationTokenW> getTokenW(String token){
+        return confirmationTokenRepositoryW.findByToken(token);
     }
 
-    public int setConfirmedAt(String token) {
-        return confirmationTokenRepository.updateConfirmedAt(token, LocalDateTime.now());
+    public void deleteByVraboten_VrabotenId(int vraboten_id){
+        confirmationTokenRepositoryW.deleteByVraboten_VrabotenId(vraboten_id);
+    }
+
+    public void deleteByRegistriranParkirac_RegParkId(int regParkId){
+        confirmationTokenRepositoryRP.deleteByRegistriranParkirac_RegParkId(regParkId);
+    }
+
+    public int setConfirmedAtRP(String token) {
+        return confirmationTokenRepositoryRP.updateConfirmedAt(token, LocalDateTime.now());
+    }
+    public int setConfirmedAtW(String token){
+        return confirmationTokenRepositoryW.updateConfirmedAt(token,LocalDateTime.now());
     }
 }
Index: sources/app/src/main/java/parkup/configs/token/ConfirmationTokenW.java
===================================================================
--- sources/app/src/main/java/parkup/configs/token/ConfirmationTokenW.java	(revision f6bc52d991e03ece15d64dc62eaeb0f2aed0805b)
+++ sources/app/src/main/java/parkup/configs/token/ConfirmationTokenW.java	(revision f6bc52d991e03ece15d64dc62eaeb0f2aed0805b)
@@ -0,0 +1,105 @@
+package parkup.configs.token;
+
+import parkup.entities.Vraboten;
+
+import javax.persistence.*;
+import java.time.LocalDateTime;
+
+@Entity
+public class ConfirmationTokenW {
+
+    @Id
+    @Column(name = "confirmation_token_id")
+    @SequenceGenerator(
+            name="confirmation_token_sequence_generator_W",
+            sequenceName = "confirmation_token_sequence_W",
+            allocationSize = 1,
+            initialValue = 1200
+    )
+    @GeneratedValue(    //za postgres treba sequence da se namesti i ime na generator mi ga davamo kako od gore sto e
+            strategy = GenerationType.SEQUENCE,
+            generator = "confirmation_token_sequence_generator_W"
+    )
+    private int id;
+
+    @Column(nullable = false)
+    private String token;
+
+    @Column(nullable = false)
+    private LocalDateTime createdAt;
+
+    @Column(nullable = false)
+    private LocalDateTime expiresAt;
+
+    private LocalDateTime confirmedAt;
+
+    @ManyToOne(cascade = {CascadeType.ALL})
+    @JoinColumn(nullable = false, name = "vraboten_id")
+    //many confirmation tokens to one registriranParkirac
+    private Vraboten vraboten;
+
+    public ConfirmationTokenW() {}
+
+    public ConfirmationTokenW(int id, String token, LocalDateTime createdAt, LocalDateTime expiresAt, Vraboten vraboten) {
+        this.id = id;
+        this.token = token;
+        this.createdAt = createdAt;
+        this.expiresAt = expiresAt;
+        this.vraboten = vraboten;
+    }
+
+    public ConfirmationTokenW(String token, LocalDateTime createdAt, LocalDateTime expiresAt, Vraboten vraboten) {
+        this.token = token;
+        this.createdAt = createdAt;
+        this.expiresAt = expiresAt;
+        this.vraboten = vraboten;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getToken() {
+        return token;
+    }
+
+    public void setToken(String token) {
+        this.token = token;
+    }
+
+    public LocalDateTime getCreatedAt() {
+        return createdAt;
+    }
+
+    public void setCreatedAt(LocalDateTime createdAt) {
+        this.createdAt = createdAt;
+    }
+
+    public LocalDateTime getExpiresAt() {
+        return expiresAt;
+    }
+
+    public void setExpiresAt(LocalDateTime expiresAt) {
+        this.expiresAt = expiresAt;
+    }
+
+    public LocalDateTime getConfirmedAt() {
+        return confirmedAt;
+    }
+
+    public void setConfirmedAt(LocalDateTime confirmedAt) {
+        this.confirmedAt = confirmedAt;
+    }
+
+    public Vraboten getRegistriranParkirac() {
+        return vraboten;
+    }
+
+    public void setRegistriranParkirac(Vraboten vraboten) {
+        this.vraboten = vraboten;
+    }
+}
