From 8e4d094fe368dcbea247ade0701bc5b2598df6c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pol=20Escol=C3=A0=20Curc=C3=B3?= Date: Thu, 15 Feb 2024 16:46:55 +0100 Subject: [PATCH 1/3] umlUpdated --- EntitiesModel.puml | 99 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 95 insertions(+), 4 deletions(-) diff --git a/EntitiesModel.puml b/EntitiesModel.puml index e243271f..4ea591b9 100644 --- a/EntitiesModel.puml +++ b/EntitiesModel.puml @@ -1,15 +1,106 @@ @startuml - -class User extends UriEntity implements UserDetails { +interface User extends UriEntity implements UserDetails { username : String password : String email : String + dni: String + dateOfBirth: String +} +class Client implements User{ + +} +class Admin implements User{ + +} +class ShelterVolunteer implements User{ + } class UriEntity { uri : String } -User "1" --right-- "*" Resource : owner < +class Pet { + id: Integer + name: String + isAdopted: Boolean + color: String + size: String + weight: double + age: String + description: String + breed: String + +} + +class Shelter { + id: Integer + name: String + email: String + mobile : String + createdAt: DateDateTime + updatedAt: DateDateTime + isActive: Boolean + rating: Integer + +} + +class Location { + id: Integer + address: String + latitude: Float + longitude: Float + province: String + municipality: String + postalCode: String +} + +class ShelterCertificate { + id: String + expirationDate: DateDateTime +} + +class SocialNetworks { + id: Integer + instagram: String + twitter: String +} + +class Schedule { + id: Integer + startDateTime: DateTime + endDateTime: DateTime +} + +class Adoption{ + id: Integer + type: String + confirmed: Boolean + startDate: DateTime + endDate: DateTime +} + + + +class MedicalRecord { + id : Integer + issue : String + description: String + date : Date +} + + +Pet "1" -- "*" MedicalRecord : has > + + +Location "1" -> "1" Shelter : has> -@enduml +Shelter "1" -> "*" SocialNetworks : < has +Shelter "1" -> "*" Pet : has > +Shelter "1" -> "1" ShelterCertificate : has > +Schedule "1.*" -> "1" Shelter :available > +Client "*" -> "*" Shelter : donate > +Adoption "*" -> "1" Pet :adopted > +Adoption "*" -> "1" User :adopt < +ShelterVolunteer "1.*" -> "*" Shelter : works > +@enduml \ No newline at end of file From 1506bf81f3559a9fd2022ac8ab7c228c8a019ca5 Mon Sep 17 00:00:00 2001 From: Antt02 Date: Tue, 20 Feb 2024 15:57:52 +0100 Subject: [PATCH 2/3] Created Pet class --- .../java/cat/udl/eps/softarch/demo/domain/Pet.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/main/java/cat/udl/eps/softarch/demo/domain/Pet.java 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 new file mode 100644 index 00000000..24dd1e84 --- /dev/null +++ b/src/main/java/cat/udl/eps/softarch/demo/domain/Pet.java @@ -0,0 +1,13 @@ +package cat.udl.eps.softarch.demo.domain; + +public class Pet { + int id; + String name; + boolean isAdopted; + String color; + String size; + Double weight; + String age; + String description; + String breed; +} From d2ab886e4d765e3502badbabae9ea9a4bca82c69 Mon Sep 17 00:00:00 2001 From: Antt02 Date: Tue, 20 Feb 2024 16:43:00 +0100 Subject: [PATCH 3/3] changed Pet implementation to extend UriEntity --- .../java/cat/udl/eps/softarch/demo/domain/Pet.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 24dd1e84..947c3887 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,7 +1,10 @@ package cat.udl.eps.softarch.demo.domain; -public class Pet { - int id; +import jakarta.persistence.Id; + +public class Pet extends UriEntity { + @Id + Long id; String name; boolean isAdopted; String color; @@ -10,4 +13,9 @@ public class Pet { String age; String description; String breed; + + @Override + public Long getId() { + return id; + } }