Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Admin.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Admin.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Admin.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,4 +3,5 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 import java.time.LocalDate;
@@ -8,13 +9,12 @@
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "admin_table")
 @PrimaryKeyJoinColumn(name = "id_user")
 public class Admin extends User {
 
-    public Admin(LocalDate dateCreated, String name, String email, String password, String telephone) {
+    public Admin(LocalDate dateCreated, String name, String email,
+                 String password, String telephone) {
         super(dateCreated, name, email, password, telephone);
     }
-
-    public Admin() {
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Adopter.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Adopter.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Adopter.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -7,4 +7,5 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 import java.time.LocalDate;
@@ -13,4 +14,5 @@
 @Entity
 @Table(name = "adopter")
+@RequiredArgsConstructor
 @PrimaryKeyJoinColumn(name = "id_user")
 public class Adopter extends User {
@@ -40,6 +42,7 @@
     private Boolean verified;
 
-    @Column(name = "verified_by_employee")
-    private Integer verifiedByEmployeeId;
+    @ManyToOne
+    @JoinColumn(name = "verified_by_employee")
+    Employee employeeVerificator;
 
     public Adopter(LocalDate dateCreated, String name, String email, String password, String telephone,
@@ -57,18 +60,3 @@
     }
 
-    public Adopter(FreeTime freeTime, Funds funds, boolean hasOtherPets, boolean hasKids, Housing housing,
-                   PhysicalActivity physicalActivity, boolean willFoster, boolean verified, int verifiedByEmployeeId) {
-        this.freeTime = freeTime;
-        this.funds = funds;
-        this.hasOtherPets = hasOtherPets;
-        this.hasKids = hasKids;
-        this.housing = housing;
-        this.physicalActivity = physicalActivity;
-        this.willFoster = willFoster;
-        this.verified = verified;
-        this.verifiedByEmployeeId = verifiedByEmployeeId;
-    }
-
-    public Adopter() {
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Adoption.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Adoption.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Adoption.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,4 +3,5 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 import java.time.LocalDate;
@@ -8,4 +9,5 @@
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "adoption")
 public class Adoption {
@@ -23,17 +25,16 @@
 
     @Column(name = "approved", nullable = false)
-    private boolean approved;
+    private Boolean approved;
 
-    @Column(name = "id_adopter", nullable = false)
-    private Integer adopterId;
+    @ManyToOne
+    @JoinColumn(name = "id_adopter", nullable = false)
+    private Adopter adopter;
 
-    public Adoption(LocalDate startDate, LocalDate endDateFoster, boolean approved, Integer adopterId) {
+    public Adoption(LocalDate startDate, LocalDate endDateFoster, Boolean approved,
+                    Adopter adopter) {
         this.startDate = startDate;
         this.endDateFoster = endDateFoster;
         this.approved = approved;
-        this.adopterId = adopterId;
-    }
-
-    public Adoption() {
+        this.adopter = adopter;
     }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Category.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Category.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Category.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,7 +3,11 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
+
+import java.util.List;
 
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "category")
 public class Category {
@@ -17,9 +21,13 @@
     private String name;
 
+    @ManyToMany
+    @JoinTable(name = "pet_belongs_to_category",
+            joinColumns = @JoinColumn(name = "id_category"),
+            inverseJoinColumns = @JoinColumn(name = "id_pet"))
+    List<Pet> pets;
+
     public Category(String name) {
         this.name = name;
     }
 
-    public Category() {
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Donor.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Donor.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Donor.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,9 +3,12 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 import java.time.LocalDate;
+import java.util.List;
 
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "donor")
 @PrimaryKeyJoinColumn(name = "id_user")
@@ -13,10 +16,18 @@
 
     @Column(name = "is_from_organisation", nullable = false)
-    private boolean fromOrganisation;
+    private Boolean fromOrganisation;
 
     @Column(name = "name_organisation_donor", nullable = true, length = 100)
     private String organisationName;
 
-    public Donor(LocalDate dateCreated, String name, String email, String password, String telephone, boolean fromOrganisation, String organisationName) {
+    @ManyToMany
+    @JoinTable(name = "donor_donates_to_organisation",
+            joinColumns = @JoinColumn(name = "id_user"),
+            inverseJoinColumns = @JoinColumn(name = "id_organisation"))
+    List<Organisation> donatedToOrganisations;
+
+    public Donor(LocalDate dateCreated, String name, String email,
+                 String password, String telephone, Boolean fromOrganisation,
+                 String organisationName) {
         super(dateCreated, name, email, password, telephone);
         this.fromOrganisation = fromOrganisation;
@@ -24,11 +35,3 @@
     }
 
-    public Donor(boolean fromOrganisation, String organisationName) {
-        this.fromOrganisation = fromOrganisation;
-        this.organisationName = organisationName;
-    }
-
-    public Donor() {
-    }
-
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Employee.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Employee.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Employee.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,4 +3,5 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 import java.time.LocalDate;
@@ -8,4 +9,5 @@
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "employee")
 @PrimaryKeyJoinColumn(name = "id_user")
@@ -15,31 +17,22 @@
     private String position;
 
-    @Column(name = "id_shelter", nullable = false)
-    private Integer shelterId;
+    @ManyToOne
+    @JoinColumn(name = "id_shelter", nullable = false)
+    private Shelter shelter;
 
     @Column(name = "is_verified", nullable = false)
-    private boolean verified;
+    private Boolean verified;
 
-    @Column(name = "verified_by_admin")
-    private Integer verifiedByAdminId;
+    @ManyToOne
+    @JoinColumn(name = "verified_by_admin")
+    private Admin adminVerificator;
 
     public Employee(LocalDate dateCreated, String name, String email, String password, String telephone,
-                    String position, int shelterId, boolean verified) {
+                    String position, Shelter shelter, Boolean verified) {
         super(dateCreated, name, email, password, telephone);
         this.position = position;
-        this.shelterId = shelterId;
+        this.shelter = shelter;
         this.verified = verified;
     }
 
-    public Employee(String position, int shelterId, boolean verified, int verifiedByAdminId) {
-        this.position = position;
-        this.shelterId = shelterId;
-        this.verified = verified;
-        this.verifiedByAdminId = verifiedByAdminId;
-    }
-
-    public Employee() {
-
-    }
-
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Food.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Food.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Food.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -4,7 +4,11 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
+
+import java.util.List;
 
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "food")
 public class Food {
@@ -24,4 +28,10 @@
     private FoodType type;
 
+    @ManyToMany
+    @JoinTable(name = "pet_preferably_eats_food",
+            joinColumns = @JoinColumn(name = "id_food"),
+            inverseJoinColumns = @JoinColumn(name = "id_pet"))
+    List<Pet> pets;
+
     public Food(String manufacturer, String name, FoodType type) {
         this.manufacturer = manufacturer;
@@ -29,6 +39,3 @@
         this.type = type;
     }
-
-    public Food() {
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Organisation.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Organisation.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Organisation.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,7 +3,11 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
+
+import java.util.List;
 
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "organisation")
 public class Organisation {
@@ -23,4 +27,10 @@
     private String billingInformation;
 
+    @ManyToMany
+    @JoinTable(name = "donor_donates_to_organisation",
+            joinColumns = @JoinColumn(name = "id_organisation"),
+            inverseJoinColumns = @JoinColumn(name = "id_user"))
+    List<Donor> donors;
+
     public Organisation(String name, String email, String billingInformation) {
         this.name = name;
@@ -28,6 +38,3 @@
         this.billingInformation = billingInformation;
     }
-
-    public Organisation() {
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/PersonalProfile.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/PersonalProfile.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/PersonalProfile.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -2,12 +2,11 @@
 
 import finki.paw5.model.enumerations.*;
-import jakarta.persistence.Column;
-import jakarta.persistence.Entity;
-import jakarta.persistence.Id;
-import jakarta.persistence.Table;
+import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "personal_profile")
 public class PersonalProfile {
@@ -16,4 +15,8 @@
     @Column(name = "id_pet", nullable = false)
     private Integer id;
+
+    @OneToOne
+    @JoinColumn(name = "id_pet", nullable = false)
+    private Pet pet;
 
     @Column(name = "friendly_to_kids", nullable = false)
@@ -32,6 +35,7 @@
     private GroomingNeed groomingNeed;
 
-    public PersonalProfile(Integer id, FriendlyToKids friendlyToKids, FriendlyToPets friendlyToPets, AttentionNeed attentionNeed, PhysicalActivity physicalActivity, GroomingNeed groomingNeed) {
+    public PersonalProfile(Integer id, Pet pet, FriendlyToKids friendlyToKids, FriendlyToPets friendlyToPets, AttentionNeed attentionNeed, PhysicalActivity physicalActivity, GroomingNeed groomingNeed) {
         this.id = id;
+        this.pet = pet;
         this.friendlyToKids = friendlyToKids;
         this.friendlyToPets = friendlyToPets;
@@ -40,6 +44,3 @@
         this.groomingNeed = groomingNeed;
     }
-
-    public PersonalProfile() {
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Pet.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Pet.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Pet.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -7,7 +7,11 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
+
+import java.util.List;
 
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "pet")
 public class Pet {
@@ -17,4 +21,8 @@
     @Column(name = "id_pet")
     private Integer id;
+
+    @OneToOne
+    @JoinColumn(name = "id_pet", nullable = false)
+    private PersonalProfile personalProfile;
 
     @Column(name = "url_pet_image", length = 200)
@@ -40,13 +48,41 @@
 
     @Column(name = "can_be_fostered", nullable = false)
-    private boolean canBeFostered;
+    private Boolean canBeFostered;
 
-    @Column(name = "id_adoption")
-    private Integer adoptionId;
+    @ManyToOne
+    @JoinColumn(name = "id_adoption")
+    private Adoption adoption;
 
-    @Column(name = "id_shelter")
-    private Integer shelterId;
+    @ManyToOne
+    @JoinColumn(name = "id_shelter")
+    private Shelter shelter;
 
-    public Pet(String imageUrl, AgeGroup ageGroup, Size size, String breed, String name, Species species, Gender gender, boolean canBeFostered, Integer adoptionId, Integer shelterId) {
+    @ManyToMany
+    @JoinTable(name = "pet_belongs_to_category",
+            joinColumns = @JoinColumn(name = "id_pet"),
+            inverseJoinColumns = @JoinColumn(name = "id_category"))
+    List<Category> categories;
+
+    @ManyToMany
+    @JoinTable(name = "pet_needs_intervention_in_vet_clinic",
+            joinColumns = @JoinColumn(name = "id_pet"),
+            inverseJoinColumns = @JoinColumn(name = "id_vet_clinic"))
+    List<VetClinic> vetClinicsTreatedIn;
+
+    @ManyToMany
+    @JoinTable(name = "pet_needs_therapy",
+            joinColumns = @JoinColumn(name = "id_pet"),
+            inverseJoinColumns = @JoinColumn(name = "id_therapy"))
+    List<Therapy> therapies;
+
+    @ManyToMany
+    @JoinTable(name = "pet_preferably_eats_food",
+            joinColumns = @JoinColumn(name = "id_pet"),
+            inverseJoinColumns = @JoinColumn(name = "id_food"))
+    List<Food> preferredFoods;
+
+    public Pet(String imageUrl, AgeGroup ageGroup, Size size, String breed,
+               String name, Species species, Gender gender, Boolean canBeFostered,
+               Adoption adoption, Shelter shelter) {
         this.imageUrl = imageUrl;
         this.ageGroup = ageGroup;
@@ -57,9 +93,6 @@
         this.gender = gender;
         this.canBeFostered = canBeFostered;
-        this.adoptionId = adoptionId;
-        this.shelterId = shelterId;
-    }
-
-    public Pet() {
+        this.adoption = adoption;
+        this.shelter = shelter;
     }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Post.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Post.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Post.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,4 +3,5 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 import java.time.LocalDate;
@@ -8,4 +9,5 @@
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "post")
 public class Post {
@@ -22,22 +24,23 @@
     private String thumbnailUrl;
 
-    @Column(name="id_pet", nullable = false)
-    private Integer petId;
+    @OneToOne
+    @JoinColumn(name="id_pet", nullable = false)
+    private Pet pet;
 
-    @Column(name="id_surendee")
-    private Integer surendeeId;
+    @ManyToOne
+    @JoinColumn(name="id_surendee")
+    private Surendee surendeePoster;
 
-    @Column(name="id_employee")
-    private Integer employeeId;
+    @ManyToOne
+    @JoinColumn(name="id_employee")
+    private Employee employeePoster;
 
-    public Post(LocalDate dateCreated, String thumbnailUrl, Integer petId, Integer surendeeId, Integer employeeId) {
+    public Post(LocalDate dateCreated, String thumbnailUrl,
+                Pet pet, Surendee surendeePoster, Employee employeePoster) {
         this.dateCreated = dateCreated;
         this.thumbnailUrl = thumbnailUrl;
-        this.petId = petId;
-        this.surendeeId = surendeeId;
-        this.employeeId = employeeId;
-    }
-
-    public Post() {
+        this.pet = pet;
+        this.surendeePoster = surendeePoster;
+        this.employeePoster = employeePoster;
     }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Shelter.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Shelter.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Shelter.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,7 +3,9 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "shelter")
 public class Shelter {
@@ -20,6 +22,7 @@
     private String telephone;
 
-    @Column(name = "id_organisation")
-    private Integer organisationId;
+    @ManyToOne
+    @JoinColumn(name = "id_organisation")
+    private Organisation organisation;
 
     @Column(name = "name_shelter", nullable = false, length = 100)
@@ -29,13 +32,11 @@
     private String email;
 
-    public Shelter(String address, String telephone, Integer organisationId, String name, String email) {
+    public Shelter(String address, String telephone, Organisation organisation,
+                   String name, String email) {
         this.address = address;
         this.telephone = telephone;
-        this.organisationId = organisationId;
+        this.organisation = organisation;
         this.name = name;
         this.email = email;
     }
-
-    public Shelter() {
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Surendee.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Surendee.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Surendee.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,4 +3,5 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 import java.time.LocalDate;
@@ -8,4 +9,5 @@
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "surendee")
 @PrimaryKeyJoinColumn(name = "id_user")
@@ -16,6 +18,3 @@
     }
 
-    public Surendee() {
-    }
-
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Therapy.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Therapy.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Therapy.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,10 +3,13 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 import java.time.LocalDate;
 import java.util.Date;
+import java.util.List;
 
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "therapy")
 public class Therapy {
@@ -26,4 +29,10 @@
     private LocalDate endDate;
 
+    @ManyToMany
+    @JoinTable(name = "pet_needs_therapy",
+            joinColumns = @JoinColumn(name = "id_therapy"),
+            inverseJoinColumns = @JoinColumn(name = "id_pet"))
+    List<Pet> pets;
+
     public Therapy(String healthProblem, LocalDate startDate, LocalDate endDate) {
         this.healthProblem = healthProblem;
@@ -31,6 +40,3 @@
         this.endDate = endDate;
     }
-
-    public Therapy() {
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/User.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/User.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/User.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,4 +3,5 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 import java.time.LocalDate;
@@ -9,4 +10,5 @@
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "user_table")
 @Inheritance(strategy = InheritanceType.JOINED)
@@ -40,6 +42,3 @@
         this.telephone = telephone;
     }
-
-    public User() {
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/VetClinic.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/VetClinic.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/VetClinic.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,7 +3,11 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
+
+import java.util.List;
 
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "vet_clinic")
 public class VetClinic {
@@ -23,4 +27,10 @@
     private String name;
 
+    @ManyToMany
+    @JoinTable(name = "pet_needs_intervention_in_vet_clinic",
+            joinColumns = @JoinColumn(name = "id_vet_clinic"),
+            inverseJoinColumns = @JoinColumn(name = "id_pet"))
+    List<Pet> pets;
+
     public VetClinic(String telephone, String address, String name) {
         this.telephone = telephone;
@@ -28,6 +38,3 @@
         this.name = name;
     }
-
-    public VetClinic() {
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/DonorDonatesToOrganisation.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/DonorDonatesToOrganisation.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/DonorDonatesToOrganisation.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,7 +3,9 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "donor_donates_to_organisation")
 @IdClass(DonorDonatesToOrganisationId.class)
@@ -22,7 +24,3 @@
         this.organisationId = organisationId;
     }
-
-    public DonorDonatesToOrganisation() {
-        
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetBelongsToCategory.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetBelongsToCategory.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetBelongsToCategory.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,7 +3,9 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "pet_belongs_to_category")
 @IdClass(PetBelongsToCategoryId.class)
@@ -22,7 +24,3 @@
         this.categoryId = categoryId;
     }
-
-    public PetBelongsToCategory() {
-
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetNeedsInterventionInVetClinic.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetNeedsInterventionInVetClinic.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetNeedsInterventionInVetClinic.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,4 +3,5 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 import java.time.LocalDate;
@@ -9,4 +10,5 @@
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "pet_needs_intervention_in_vet_clinic")
 @IdClass(PetNeedsInterventionInVetClinicId.class)
@@ -33,7 +35,3 @@
         this.description = description;
     }
-
-    public PetNeedsInterventionInVetClinic() {
-
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetNeedsTherapy.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetNeedsTherapy.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetNeedsTherapy.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,7 +3,9 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "pet_needs_therapy")
 @IdClass(PetNeedsTherapyId.class)
@@ -22,6 +24,3 @@
         this.therapyId = therapyId;
     }
-
-    public PetNeedsTherapy() {
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetPreferablyEatsFood.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetPreferablyEatsFood.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/relations/PetPreferablyEatsFood.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,7 +3,9 @@
 import jakarta.persistence.*;
 import lombok.Data;
+import lombok.RequiredArgsConstructor;
 
 @Data
 @Entity
+@RequiredArgsConstructor
 @Table(name = "pet_preferably_eats_food")
 @IdClass(PetPreferablyEatsFoodId.class)
@@ -26,6 +28,3 @@
         this.quantityPerDay = quantityPerDay;
     }
-
-    public PetPreferablyEatsFood() {
-    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/AuthServiceImplementation.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/AuthServiceImplementation.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/AuthServiceImplementation.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -3,4 +3,5 @@
 import finki.paw5.model.entities.Adopter;
 import finki.paw5.model.entities.Employee;
+import finki.paw5.model.entities.Shelter;
 import finki.paw5.model.entities.User;
 import finki.paw5.model.enumerations.FreeTime;
@@ -10,4 +11,5 @@
 import finki.paw5.repository.AdopterRepository;
 import finki.paw5.repository.EmployeeRepository;
+import finki.paw5.repository.ShelterRepository;
 import finki.paw5.repository.UserRepository;
 import finki.paw5.service.AuthService;
@@ -22,9 +24,11 @@
     private final AdopterRepository adopterRepository;
     private final EmployeeRepository employeeRepository;
+    private final ShelterRepository shelterRepository;
 
-    public AuthServiceImplementation(UserRepository userRepository, AdopterRepository adopterRepository, EmployeeRepository employeeRepository) {
+    public AuthServiceImplementation(UserRepository userRepository, AdopterRepository adopterRepository, EmployeeRepository employeeRepository, ShelterRepository shelterRepository) {
         this.userRepository = userRepository;
         this.adopterRepository = adopterRepository;
         this.employeeRepository = employeeRepository;
+        this.shelterRepository = shelterRepository;
     }
 
@@ -47,5 +51,6 @@
     @Override
     public Employee registerEmployee(String name, String email, String password, String telephone, String position, Integer shelterId) {
-        Employee employee = new Employee(LocalDate.now(),name, email,password,telephone,position,shelterId,false);
+        Shelter shelter = this.shelterRepository.findById(shelterId).get();
+        Employee employee = new Employee(LocalDate.now(),name, email,password,telephone,position,shelter,false);
         return employeeRepository.save(employee);
     }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PetController.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PetController.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PetController.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -1,8 +1,7 @@
 package finki.paw5.web.controllers;
 
+import finki.paw5.model.entities.Adopter;
 import finki.paw5.model.entities.Adoption;
 import finki.paw5.model.entities.Pet;
-import finki.paw5.model.entities.User;
-import finki.paw5.model.exceptions.InvalidPetIdException;
 import finki.paw5.service.AdoptionService;
 import finki.paw5.service.PetService;
@@ -25,15 +24,15 @@
     }
 
-    @PostMapping("/submit-adopton-{id}")
+    @PostMapping("/submit-adoption-{id}")
     public String saveAdoption(@PathVariable Integer id, HttpServletRequest request) {
 
         Pet pet = this.petService.findById(id);
         
-        User user = (User) request.getSession().getAttribute("user");
+        Adopter adopter = (Adopter) request.getSession().getAttribute("user");
 
-        Adoption adoption = new Adoption(LocalDate.now(), null, false, user.getId());
+        Adoption adoption = new Adoption(LocalDate.now(), null, false, adopter);
         this.adoptionService.save(adoption);
 
-        pet.setAdoptionId(adoption.getId());
+        pet.setAdoption(adoption);
         this.petService.save(pet);
 
Index: Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -58,8 +58,8 @@
         if(newPetCheckbox == true){
 
-            Pet newPet = new Pet(imageUrl, AgeGroup.valueOf(ageGroup), Size.valueOf(size), breed, name, Species.valueOf(species), Gender.valueOf(gender), canBeFostered, null, employee.getShelterId());
+            Pet newPet = new Pet(imageUrl, AgeGroup.valueOf(ageGroup), Size.valueOf(size), breed, name, Species.valueOf(species), Gender.valueOf(gender), canBeFostered, null, employee.getShelter());
             this.petService.save(newPet);
 
-            Post post = new Post(LocalDate.now(), imageUrl, newPet.getId(), null, employee.getId());
+            Post post = new Post(LocalDate.now(), imageUrl, newPet, null, employee);
             this.postService.save(post);
 
@@ -68,5 +68,5 @@
             Pet selectedPet = this.petService.findById(petId);
 
-            Post post = new Post(LocalDate.now(), imageUrl, selectedPet.getId(), null, employee.getId());
+            Post post = new Post(LocalDate.now(), imageUrl, selectedPet, null, employee);
             this.postService.save(post);
 
@@ -92,5 +92,5 @@
 
         Post post = this.postService.findById(id).get();
-        Pet pet = this.petService.findById(post.getPetId());
+        Pet pet = post.getPet();
 
         model.addAttribute("pet", pet);
Index: Prototype Application/Paw5/src/main/resources/templates/list-posts-adoption.html
===================================================================
--- Prototype Application/Paw5/src/main/resources/templates/list-posts-adoption.html	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/resources/templates/list-posts-adoption.html	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -47,6 +47,6 @@
     <tr th:each = "post : ${posts}">
         <td th:text = "${post.getId()}"></td>
-        <td th:each = "pet : ${pets}" th:if="${post.getPetId()==pet.getId()}" th:text = "${pet.getName()}"></td>
-        <td th:each = "pet : ${pets}" th:if="${post.getPetId()==pet.getId()}" th:text = "${pet.getSpecies()}"></td>
+        <td th:text = "${post.getPet().getName()}"></td>
+        <td th:text = "${post.getPet().getSpecies()}"></td>
         <td>
             <form th:action="@{'/pet-details-{id}' (id=${post.getId()})}"
Index: Prototype Application/Paw5/src/main/resources/templates/pet-details.html
===================================================================
--- Prototype Application/Paw5/src/main/resources/templates/pet-details.html	(revision 8b7dd7f1ec33aa6a925cce2f923c06937b5d1679)
+++ Prototype Application/Paw5/src/main/resources/templates/pet-details.html	(revision c3278ace63b346a0f614643acfe23f7a155fe72c)
@@ -68,6 +68,6 @@
 </table>
 <form method="POST"
-      th:action="@{'/submit-adopton-{id}' (id=${pet.getId()})}"
-      th:if="${pet.getAdoptionId()==null}">
+      th:action="@{'/submit-adoption-{id}' (id=${pet.getId()})}"
+      th:if="${pet.getAdoption()==null}">
     <button id="submit"
             type="submit"
