Changeset a0e93df
- Timestamp:
- 01/23/25 19:37:29 (3 months ago)
- Branches:
- master
- Children:
- be26658
- Parents:
- f9ef3e8
- Location:
- ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/Customer.java
rf9ef3e8 ra0e93df 14 14 15 15 @EqualsAndHashCode(callSuper = true) 16 @Data 16 17 17 @Entity 18 @AllArgsConstructor19 @NoArgsConstructor20 18 public class Customer extends User { 21 19 public Customer(String firstName, String lastName, String email, String password, String phoneNumber, Role userRole) { 22 20 super(firstName, lastName, email, password, phoneNumber, userRole); 21 } 22 23 public Customer() { 24 } 25 26 public Customer(List<Reservation> reservations, List<Local> favouriteLocals) { 27 this.reservations = reservations; 28 this.favouriteLocals = favouriteLocals; 23 29 } 24 30 … … 29 35 private List<Local> favouriteLocals; 30 36 37 public List<Reservation> getReservations() { 38 return reservations; 39 } 40 41 public List<Local> getFavouriteLocals() { 42 return favouriteLocals; 43 } 31 44 32 45 } -
ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/JWTAuthenticationResponse.java
rf9ef3e8 ra0e93df 6 6 import mk.ukim.finki.it.reservengo.model.enumerations.Role; 7 7 8 @Data 9 @AllArgsConstructor 10 @NoArgsConstructor 8 11 9 public class JWTAuthenticationResponse { 12 10 private Long id; … … 17 15 private Role role; 18 16 private String token; 17 18 public JWTAuthenticationResponse(Long id, String firstName, String lastName, String email, String phoneNumber, Role role, String token) { 19 this.id = id; 20 this.firstName = firstName; 21 this.lastName = lastName; 22 this.email = email; 23 this.phoneNumber = phoneNumber; 24 this.role = role; 25 this.token = token; 26 } 27 28 public JWTAuthenticationResponse() {} 29 30 public Long getId() { 31 return id; 32 } 33 34 public String getFirstName() { 35 return firstName; 36 } 37 38 public String getLastName() { 39 return lastName; 40 } 41 42 public String getEmail() { 43 return email; 44 } 45 46 public String getPhoneNumber() { 47 return phoneNumber; 48 } 49 50 public Role getRole() { 51 return role; 52 } 53 54 public String getToken() { 55 return token; 56 } 19 57 } -
ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/Local.java
rf9ef3e8 ra0e93df 10 10 import java.util.Map; 11 11 12 @Data 12 13 13 @Entity 14 @AllArgsConstructor15 @NoArgsConstructor16 14 @Table(name = "local_") 17 15 public class Local { 18 16 public Local(String name, String description, String address, String workingHours, List<Service> availableServices, Map<Long, Integer> ratings, List<Event> events, List<String> localPhotos, String menuPhoto, String menuLink, Contact contact, List<Reservation> reservations, List<LocalWorker> workers) { 17 this.name = name; 18 this.description = description; 19 this.address = address; 20 this.workingHours = workingHours; 21 this.availableServices = availableServices; 22 this.ratings = ratings; 23 this.events = events; 24 this.localPhotos = localPhotos; 25 this.menuPhoto = menuPhoto; 26 this.menuLink = menuLink; 27 this.contact = contact; 28 this.reservations = reservations; 29 this.workers = workers; 30 } 31 32 public Local() { 33 } 34 35 public Local(Long id, String name, String description, String address, String workingHours, List<Service> availableServices, Map<Long, Integer> ratings, List<Event> events, List<String> localPhotos, String menuPhoto, String menuLink, Contact contact, List<Reservation> reservations, List<LocalWorker> workers) { 36 this.id = id; 19 37 this.name = name; 20 38 this.description = description; … … 70 88 @OneToMany(mappedBy = "local") 71 89 private List<LocalWorker> workers; 90 91 92 public Long getId() { 93 return id; 94 } 95 96 public String getName() { 97 return name; 98 } 99 100 public String getDescription() { 101 return description; 102 } 103 104 public String getAddress() { 105 return address; 106 } 107 108 public String getWorkingHours() { 109 return workingHours; 110 } 111 112 public List<Service> getAvailableServices() { 113 return availableServices; 114 } 115 116 public Map<Long, Integer> getRatings() { 117 return ratings; 118 } 119 120 public List<Event> getEvents() { 121 return events; 122 } 123 124 public List<String> getLocalPhotos() { 125 return localPhotos; 126 } 127 128 public String getMenuPhoto() { 129 return menuPhoto; 130 } 131 132 public String getMenuLink() { 133 return menuLink; 134 } 135 136 public Contact getContact() { 137 return contact; 138 } 139 140 public List<Reservation> getReservations() { 141 return reservations; 142 } 143 144 public List<LocalWorker> getWorkers() { 145 return workers; 146 } 72 147 } -
ReserveNGo-backend/src/main/java/mk/ukim/finki/it/reservengo/model/User.java
rf9ef3e8 ra0e93df 14 14 import java.util.List; 15 15 16 @Data 16 17 17 @Entity 18 @AllArgsConstructor19 @NoArgsConstructor20 18 @Inheritance(strategy = InheritanceType.JOINED) 21 19 @Table(name = "app_user") … … 53 51 } 54 52 53 public User() {} 54 55 public User(Long id, String firstName, String lastName, String email, String password, String phoneNumber, Role userRole) { 56 this.id = id; 57 this.firstName = firstName; 58 this.lastName = lastName; 59 this.email = email; 60 this.password = password; 61 this.phoneNumber = phoneNumber; 62 this.userRole = userRole; 63 } 64 55 65 @Override 56 66 public String getPassword() { … … 83 93 } 84 94 85 //public Long getId() {86 //return id;87 //}88 // 89 //public String getFirstName() {90 //return firstName;91 //}92 // 93 //public String getLastName() {94 //return lastName;95 //}96 // 97 //public String getEmail() {98 //return email;99 //}100 // 101 //public String getPhoneNumber() {102 //return phoneNumber;103 //}104 // 105 //public Role getUserRole() {106 //return userRole;107 //}95 public Long getId() { 96 return id; 97 } 98 99 public String getFirstName() { 100 return firstName; 101 } 102 103 public String getLastName() { 104 return lastName; 105 } 106 107 public String getEmail() { 108 return email; 109 } 110 111 public String getPhoneNumber() { 112 return phoneNumber; 113 } 114 115 public Role getUserRole() { 116 return userRole; 117 } 108 118 109 119 // @Override
Note:
See TracChangeset
for help on using the changeset viewer.