From 5a6b86e95542f234899b1f11d822132a6a95afbd Mon Sep 17 00:00:00 2001 From: Codinab Date: Thu, 22 Feb 2024 15:31:40 +0100 Subject: [PATCH] Use of ZonedDateTime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Mario Fernandez -Àlex Codina --- .../java/cat/udl/eps/softarch/demo/domain/Adoption.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/cat/udl/eps/softarch/demo/domain/Adoption.java b/src/main/java/cat/udl/eps/softarch/demo/domain/Adoption.java index 019060a4..4333ac5f 100644 --- a/src/main/java/cat/udl/eps/softarch/demo/domain/Adoption.java +++ b/src/main/java/cat/udl/eps/softarch/demo/domain/Adoption.java @@ -2,10 +2,11 @@ import jakarta.persistence.Id; import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; +import java.time.ZonedDateTime; @EqualsAndHashCode(callSuper = true) @Data @@ -17,12 +18,12 @@ public class Adoption extends UriEntity { @NotBlank private String type; - @NotBlank + @NotNull private Boolean confirmed; @NotBlank - private Date startDate; + private ZonedDateTime startDate; - private Date endDate; + private ZonedDateTime endDate; }