Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crud pet #11

Merged
merged 3 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 95 additions & 4 deletions EntitiesModel.puml
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions src/main/java/cat/udl/eps/softarch/demo/domain/Pet.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package cat.udl.eps.softarch.demo.domain;

import jakarta.persistence.Id;

public class Pet extends UriEntity<Long> {
@Id
Long id;
String name;
boolean isAdopted;
String color;
String size;
Double weight;
String age;
String description;
String breed;

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