Index: src/main/java/com/wediscussmovies/project/model/Discussion.java
===================================================================
--- src/main/java/com/wediscussmovies/project/model/Discussion.java	(revision 7a0bf79dedf74d33b1f9bb8ce17b562e420e1fc6)
+++ src/main/java/com/wediscussmovies/project/model/Discussion.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
@@ -9,4 +9,5 @@
 @Data
 @Entity
+@Table (name="discussions")
 public class Discussion {
     @Id
@@ -35,6 +36,31 @@
     private Date date;
 
+    @Column(name = "type", nullable = false)
+    private DiscussionType type;
     @OneToMany
     private List<Reply> replies;
+
+    public Discussion() {
+    }
+
+    public Discussion(String title, String text, User user, Movie movie, Date valueOf) {
+        this.title = title;
+        this.text = text;
+        this.user = user;
+        this.date = valueOf;
+        this.movie = movie;
+        this.type = DiscussionType.M;
+    }
+
+    public Discussion(String title, String text, User user, Person person, Date valueOf) {
+        this.title = title;
+        this.text = text;
+        this.user = user;
+        this.date = valueOf;
+        this.person = person;
+        this.type = DiscussionType.P;
+    }
+
+
 }
 
Index: src/main/java/com/wediscussmovies/project/model/DiscussionType.java
===================================================================
--- src/main/java/com/wediscussmovies/project/model/DiscussionType.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
+++ src/main/java/com/wediscussmovies/project/model/DiscussionType.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
@@ -0,0 +1,5 @@
+package com.wediscussmovies.project.model;
+
+public enum DiscussionType {
+    M,P
+}
Index: src/main/java/com/wediscussmovies/project/model/Genre.java
===================================================================
--- src/main/java/com/wediscussmovies/project/model/Genre.java	(revision 7a0bf79dedf74d33b1f9bb8ce17b562e420e1fc6)
+++ src/main/java/com/wediscussmovies/project/model/Genre.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
@@ -3,11 +3,9 @@
 import lombok.Data;
 
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
+import javax.persistence.*;
 
 @Data
-@Entity(name="genres")
+@Entity
+@Table(name="genres")
 public class Genre {
     @Id
Index: src/main/java/com/wediscussmovies/project/model/Movie.java
===================================================================
--- src/main/java/com/wediscussmovies/project/model/Movie.java	(revision 7a0bf79dedf74d33b1f9bb8ce17b562e420e1fc6)
+++ src/main/java/com/wediscussmovies/project/model/Movie.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
@@ -8,5 +8,6 @@
 import java.util.List;
 @Data
-@Entity(name="movies")
+@Entity
+@Table (name="movies")
 public class Movie {
     @Id
@@ -61,4 +62,7 @@
     public static Comparator<Movie> comparatorTitle = Comparator.comparing(Movie::getTitle);
 
+    public Movie() {
+    }
+
     public Movie(String title, String description, String image_url, Date airing_date, float imdb_rating, Person director, List<Person> actors, List<Genre> genres) {
         Title = title;
Index: src/main/java/com/wediscussmovies/project/model/PasswordEncoder.java
===================================================================
--- src/main/java/com/wediscussmovies/project/model/PasswordEncoder.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
+++ src/main/java/com/wediscussmovies/project/model/PasswordEncoder.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
@@ -0,0 +1,36 @@
+package com.wediscussmovies.project.model;
+
+
+import java.math.BigInteger;
+import java.nio.charset.StandardCharsets;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
+public class PasswordEncoder {
+    public static byte[] getSHA(String input) throws NoSuchAlgorithmException
+    {
+        MessageDigest md = MessageDigest.getInstance("SHA-512");
+
+        return md.digest(input.getBytes(StandardCharsets.UTF_8));
+    }
+
+    public static String toHexString(byte[] hash)
+    {
+        BigInteger number = new BigInteger(1, hash);
+
+        StringBuilder hexString = new StringBuilder(number.toString(16));
+
+        while (hexString.length() < 32)
+        {
+            hexString.insert(0, '0');
+        }
+
+        return hexString.toString();
+    }
+
+    public static String getEncodedPasswordString(String password) throws NoSuchAlgorithmException {
+        return toHexString(getSHA(password));
+    }
+
+}
+
Index: src/main/java/com/wediscussmovies/project/model/Person.java
===================================================================
--- src/main/java/com/wediscussmovies/project/model/Person.java	(revision 7a0bf79dedf74d33b1f9bb8ce17b562e420e1fc6)
+++ src/main/java/com/wediscussmovies/project/model/Person.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
@@ -5,8 +5,10 @@
 import javax.persistence.*;
 import java.sql.Date;
+import java.util.Comparator;
 import java.util.List;
 
 @Data
-@Entity(name="persons")
+@Entity
+@Table(name="persons")
 public class Person {
     @Id
@@ -34,4 +36,18 @@
     @ManyToMany
     private List<Movie> acts_in;
+
+    public Person(String name, String surname, PersonType personType, Date date_of_birth, String image_url, String description) {
+        this.name = name;
+        this.surname = surname;
+        this.personType = personType;
+        this.date_of_birth = date_of_birth;
+        this.image_url = image_url;
+        this.description = description;
+    }
+
+    public Person() {
+    }
+
+    public static Comparator<Person> personComparatorByNameSurname = Comparator.comparing(Person::getName).thenComparing(Person::getSurname);
 }
 
Index: src/main/java/com/wediscussmovies/project/model/Reply.java
===================================================================
--- src/main/java/com/wediscussmovies/project/model/Reply.java	(revision 7a0bf79dedf74d33b1f9bb8ce17b562e420e1fc6)
+++ src/main/java/com/wediscussmovies/project/model/Reply.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
@@ -5,7 +5,9 @@
 import javax.persistence.*;
 import java.sql.Date;
+import java.util.Optional;
 
 @Data
-@Entity(name="replies")
+@Entity
+@Table(name="replies")
 public class Reply {
     @Id
@@ -27,4 +29,11 @@
     @Column(name= "text", length = 1000, nullable = false)
     private String text;
+
+    public Reply(Discussion discussion, User user, Date date, String text) {
+        this.discussion = discussion;
+        this.user = user;
+        this.date = date;
+        this.text = text;
+    }
 }
 
Index: src/main/java/com/wediscussmovies/project/model/User.java
===================================================================
--- src/main/java/com/wediscussmovies/project/model/User.java	(revision 7a0bf79dedf74d33b1f9bb8ce17b562e420e1fc6)
+++ src/main/java/com/wediscussmovies/project/model/User.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
@@ -7,5 +7,6 @@
 
 @Data
-@Entity(name="users")
+@Entity
+@Table(name="users")
 public class User {
     @Id
@@ -36,4 +37,14 @@
     private List<Genre> likes_genres;
 
+    public User(String username, String name, String surname, String email, String password) {
+        this.username = username;
+        this.name = name;
+        this.surname = surname;
+        this.email = email;
+        this.password = password;
+    }
+
+    public User() {
+    }
 }
 
Index: src/main/java/com/wediscussmovies/project/model/exception/InvalidUserCredentialsException.java
===================================================================
--- src/main/java/com/wediscussmovies/project/model/exception/InvalidUserCredentialsException.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
+++ src/main/java/com/wediscussmovies/project/model/exception/InvalidUserCredentialsException.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
@@ -0,0 +1,7 @@
+package com.wediscussmovies.project.model.exception;
+
+public class InvalidUserCredentialsException extends RuntimeException{
+    public InvalidUserCredentialsException(String username) {
+        super("The user with the username {" + username +"} cannot be authenticated.");
+    }
+}
Index: src/main/java/com/wediscussmovies/project/model/exception/PasswordsDontMatchException.java
===================================================================
--- src/main/java/com/wediscussmovies/project/model/exception/PasswordsDontMatchException.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
+++ src/main/java/com/wediscussmovies/project/model/exception/PasswordsDontMatchException.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
@@ -0,0 +1,7 @@
+package com.wediscussmovies.project.model.exception;
+
+public class PasswordsDontMatchException extends RuntimeException{
+    public PasswordsDontMatchException() {
+        super("The passwords you provided did not match.");
+    }
+}
Index: src/main/java/com/wediscussmovies/project/model/exception/UserWithEmailAlreadyExists.java
===================================================================
--- src/main/java/com/wediscussmovies/project/model/exception/UserWithEmailAlreadyExists.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
+++ src/main/java/com/wediscussmovies/project/model/exception/UserWithEmailAlreadyExists.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
@@ -0,0 +1,7 @@
+package com.wediscussmovies.project.model.exception;
+
+public class UserWithEmailAlreadyExists extends RuntimeException{
+    public UserWithEmailAlreadyExists(String email) {
+        super("User with the email {" + email +"} is already registered");
+    }
+}
Index: src/main/java/com/wediscussmovies/project/model/exception/UserWithUsernameAlreadyExists.java
===================================================================
--- src/main/java/com/wediscussmovies/project/model/exception/UserWithUsernameAlreadyExists.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
+++ src/main/java/com/wediscussmovies/project/model/exception/UserWithUsernameAlreadyExists.java	(revision 7bc8942e641cbe9fd658da84125ccf38b30063c9)
@@ -0,0 +1,7 @@
+package com.wediscussmovies.project.model.exception;
+
+public class UserWithUsernameAlreadyExists extends RuntimeException{
+    public UserWithUsernameAlreadyExists(String username) {
+        super("User with the username " + username + " is already registered");
+    }
+}
