diff --git a/src/main/java/cat/udl/eps/softarch/demo/domain/Pet.java b/src/main/java/cat/udl/eps/softarch/demo/domain/Pet.java index 947c3887..9ae162cc 100644 --- a/src/main/java/cat/udl/eps/softarch/demo/domain/Pet.java +++ b/src/main/java/cat/udl/eps/softarch/demo/domain/Pet.java @@ -1,10 +1,19 @@ package cat.udl.eps.softarch.demo.domain; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; +import lombok.Data; +import lombok.EqualsAndHashCode; +@EqualsAndHashCode(callSuper = true) +@Entity +@Data public class Pet extends UriEntity { @Id + @GeneratedValue Long id; + String name; boolean isAdopted; String color; @@ -13,9 +22,4 @@ public class Pet extends UriEntity { String age; String description; String breed; - - @Override - public Long getId() { - return id; - } }