Skip to content

Commit

Permalink
changed Pet implementation to extend UriEntity
Browse files Browse the repository at this point in the history
  • Loading branch information
Antt02 committed Feb 20, 2024
1 parent 1506bf8 commit d2ab886
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main/java/cat/udl/eps/softarch/demo/domain/Pet.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package cat.udl.eps.softarch.demo.domain;

public class Pet {
int id;
import jakarta.persistence.Id;

public class Pet extends UriEntity<Long> {
@Id
Long id;
String name;
boolean isAdopted;
String color;
Expand All @@ -10,4 +13,9 @@ public class Pet {
String age;
String description;
String breed;

@Override
public Long getId() {
return id;
}
}

0 comments on commit d2ab886

Please sign in to comment.