From 68988d01babd861b296f94fee76fa96eb95a3877 Mon Sep 17 00:00:00 2001 From: Codinab Date: Thu, 22 Feb 2024 16:16:32 +0100 Subject: [PATCH] Added relation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Mario Fernandez -Àlex Codina --- .../cat/udl/eps/softarch/demo/domain/MedicalRecord.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/cat/udl/eps/softarch/demo/domain/MedicalRecord.java b/src/main/java/cat/udl/eps/softarch/demo/domain/MedicalRecord.java index 69a4cc3d..1d83c87f 100644 --- a/src/main/java/cat/udl/eps/softarch/demo/domain/MedicalRecord.java +++ b/src/main/java/cat/udl/eps/softarch/demo/domain/MedicalRecord.java @@ -1,9 +1,6 @@ package cat.udl.eps.softarch.demo.domain; -import jakarta.persistence.Entity; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.GenerationType; -import jakarta.persistence.Id; +import jakarta.persistence.*; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import lombok.Data; @@ -28,4 +25,7 @@ public class MedicalRecord extends UriEntity { @NotNull private ZonedDateTime date; + + @ManyToOne + private Pet pet; } \ No newline at end of file