Changeset c03e53b for Prototype Application/Paw5/src/main
- Timestamp:
- 03/08/23 17:29:07 (20 months ago)
- Branches:
- main
- Children:
- e76c5a6
- Parents:
- d1fe9c2
- Location:
- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Category.java
rd1fe9c2 rc03e53b 4 4 import lombok.Data; 5 5 import lombok.RequiredArgsConstructor; 6 7 import java.util.List; 6 8 7 9 @Data … … 19 21 private String name; 20 22 23 @ManyToMany 24 @JoinTable(name = "pet_belongs_to_category", 25 joinColumns = @JoinColumn(name = "id_category"), 26 inverseJoinColumns = @JoinColumn(name = "id_pet")) 27 List<Pet> pets; 28 21 29 public Category(String name) { 22 30 this.name = name; -
Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Donor.java
rd1fe9c2 rc03e53b 6 6 7 7 import java.time.LocalDate; 8 import java.util.List; 8 9 9 10 @Data … … 20 21 private String organisationName; 21 22 23 @ManyToMany 24 @JoinTable(name = "donor_donates_to_organisation", 25 joinColumns = @JoinColumn(name = "id_user"), 26 inverseJoinColumns = @JoinColumn(name = "id_organisation")) 27 List<Organisation> donatedToOrganisations; 28 22 29 public Donor(LocalDate dateCreated, String name, String email, 23 30 String password, String telephone, Boolean fromOrganisation, -
Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Food.java
rd1fe9c2 rc03e53b 5 5 import lombok.Data; 6 6 import lombok.RequiredArgsConstructor; 7 8 import java.util.List; 7 9 8 10 @Data … … 26 28 private FoodType type; 27 29 30 @ManyToMany 31 @JoinTable(name = "pet_preferably_eats_food", 32 joinColumns = @JoinColumn(name = "id_food"), 33 inverseJoinColumns = @JoinColumn(name = "id_pet")) 34 List<Pet> pets; 35 28 36 public Food(String manufacturer, String name, FoodType type) { 29 37 this.manufacturer = manufacturer; -
Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Organisation.java
rd1fe9c2 rc03e53b 4 4 import lombok.Data; 5 5 import lombok.RequiredArgsConstructor; 6 7 import java.util.List; 6 8 7 9 @Data … … 25 27 private String billingInformation; 26 28 29 @ManyToMany 30 @JoinTable(name = "donor_donates_to_organisation", 31 joinColumns = @JoinColumn(name = "id_organisation"), 32 inverseJoinColumns = @JoinColumn(name = "id_user")) 33 List<Donor> donors; 34 27 35 public Organisation(String name, String email, String billingInformation) { 28 36 this.name = name; -
Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Pet.java
rd1fe9c2 rc03e53b 8 8 import lombok.Data; 9 9 import lombok.RequiredArgsConstructor; 10 11 import java.util.List; 10 12 11 13 @Data … … 52 54 private Shelter shelter; 53 55 56 @ManyToMany 57 @JoinTable(name = "pet_belongs_to_category", 58 joinColumns = @JoinColumn(name = "id_pet"), 59 inverseJoinColumns = @JoinColumn(name = "id_category")) 60 List<Category> categories; 61 62 @ManyToMany 63 @JoinTable(name = "pet_needs_intervention_in_vet_clinic", 64 joinColumns = @JoinColumn(name = "id_pet"), 65 inverseJoinColumns = @JoinColumn(name = "id_vet_clinic")) 66 List<VetClinic> vetClinicsTreatedIn; 67 68 @ManyToMany 69 @JoinTable(name = "pet_needs_therapy", 70 joinColumns = @JoinColumn(name = "id_pet"), 71 inverseJoinColumns = @JoinColumn(name = "id_therapy")) 72 List<Therapy> therapies; 73 74 @ManyToMany 75 @JoinTable(name = "pet_preferably_eats_food", 76 joinColumns = @JoinColumn(name = "id_pet"), 77 inverseJoinColumns = @JoinColumn(name = "id_food")) 78 List<Food> preferredFoods; 79 54 80 public Pet(String imageUrl, AgeGroup ageGroup, Size size, String breed, 55 81 String name, Species species, Gender gender, Boolean canBeFostered, -
Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Therapy.java
rd1fe9c2 rc03e53b 7 7 import java.time.LocalDate; 8 8 import java.util.Date; 9 import java.util.List; 9 10 10 11 @Data … … 28 29 private LocalDate endDate; 29 30 31 @ManyToMany 32 @JoinTable(name = "pet_needs_therapy", 33 joinColumns = @JoinColumn(name = "id_therapy"), 34 inverseJoinColumns = @JoinColumn(name = "id_pet")) 35 List<Pet> pets; 36 30 37 public Therapy(String healthProblem, LocalDate startDate, LocalDate endDate) { 31 38 this.healthProblem = healthProblem; -
Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/VetClinic.java
rd1fe9c2 rc03e53b 4 4 import lombok.Data; 5 5 import lombok.RequiredArgsConstructor; 6 7 import java.util.List; 6 8 7 9 @Data … … 25 27 private String name; 26 28 29 @ManyToMany 30 @JoinTable(name = "pet_needs_intervention_in_vet_clinic", 31 joinColumns = @JoinColumn(name = "id_vet_clinic"), 32 inverseJoinColumns = @JoinColumn(name = "id_pet")) 33 List<Pet> pets; 34 27 35 public VetClinic(String telephone, String address, String name) { 28 36 this.telephone = telephone;
Note:
See TracChangeset
for help on using the changeset viewer.