Merge branch 'main' into AttachmentsToChat
This commit is contained in:
@@ -8,16 +8,22 @@ public class AdoptionDTO {
|
||||
private String petName;
|
||||
private Long customerId;
|
||||
private String customerName;
|
||||
private Long employeeId;
|
||||
private String employeeName;
|
||||
private String adoptionDate;
|
||||
private String adoptionStatus;
|
||||
private BigDecimal adoptionFee;
|
||||
private String createdAt;
|
||||
private String updatedAt;
|
||||
|
||||
// Constructor for create/update requests
|
||||
public AdoptionDTO(Long petId, Long customerId, String adoptionDate, String adoptionStatus) {
|
||||
this(petId, customerId, null, adoptionDate, adoptionStatus);
|
||||
}
|
||||
|
||||
public AdoptionDTO(Long petId, Long customerId, Long employeeId, String adoptionDate, String adoptionStatus) {
|
||||
this.petId = petId;
|
||||
this.customerId = customerId;
|
||||
this.employeeId = employeeId;
|
||||
this.adoptionDate = adoptionDate;
|
||||
this.adoptionStatus = adoptionStatus;
|
||||
}
|
||||
@@ -42,6 +48,14 @@ public class AdoptionDTO {
|
||||
return customerName;
|
||||
}
|
||||
|
||||
public Long getEmployeeId() {
|
||||
return employeeId;
|
||||
}
|
||||
|
||||
public String getEmployeeName() {
|
||||
return employeeName;
|
||||
}
|
||||
|
||||
public String getAdoptionDate() {
|
||||
return adoptionDate;
|
||||
}
|
||||
@@ -65,4 +79,4 @@ public class AdoptionDTO {
|
||||
public String getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
public class AppointmentDTO {
|
||||
// Response fields (from server)
|
||||
|
||||
private Long appointmentId;
|
||||
private Long customerId;
|
||||
private String customerName;
|
||||
@@ -12,6 +12,8 @@ public class AppointmentDTO {
|
||||
private String storeName;
|
||||
private Long serviceId;
|
||||
private String serviceName;
|
||||
private Long employeeId;
|
||||
private String employeeName;
|
||||
private String appointmentDate;
|
||||
private String appointmentTime;
|
||||
private String appointmentStatus;
|
||||
@@ -20,21 +22,25 @@ public class AppointmentDTO {
|
||||
private String createdAt;
|
||||
private String updatedAt;
|
||||
|
||||
// Constructor for CREATE/UPDATE request body
|
||||
// Matches AppointmentRequest exactly
|
||||
public AppointmentDTO(Long customerId, Long storeId, Long serviceId,
|
||||
String appointmentDate, String appointmentTime,
|
||||
String appointmentStatus, List<Long> petIds) {
|
||||
this(customerId, storeId, serviceId, null, appointmentDate, appointmentTime, appointmentStatus, petIds);
|
||||
}
|
||||
|
||||
public AppointmentDTO(Long customerId, Long storeId, Long serviceId, Long employeeId,
|
||||
String appointmentDate, String appointmentTime,
|
||||
String appointmentStatus, List<Long> petIds) {
|
||||
this.customerId = customerId;
|
||||
this.storeId = storeId;
|
||||
this.serviceId = serviceId;
|
||||
this.employeeId = employeeId;
|
||||
this.appointmentDate = appointmentDate;
|
||||
this.appointmentTime = appointmentTime;
|
||||
this.appointmentStatus = appointmentStatus;
|
||||
this.petIds = petIds;
|
||||
}
|
||||
|
||||
// Getters
|
||||
public Long getAppointmentId() {
|
||||
return appointmentId;
|
||||
}
|
||||
@@ -63,6 +69,14 @@ public class AppointmentDTO {
|
||||
return serviceName;
|
||||
}
|
||||
|
||||
public Long getEmployeeId() {
|
||||
return employeeId;
|
||||
}
|
||||
|
||||
public String getEmployeeName() {
|
||||
return employeeName;
|
||||
}
|
||||
|
||||
public String getAppointmentDate() {
|
||||
return appointmentDate;
|
||||
}
|
||||
@@ -91,7 +105,6 @@ public class AppointmentDTO {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
// Convenience getters for adapter/list display
|
||||
public String getPetName() {
|
||||
return (petNames != null && !petNames.isEmpty()) ? petNames.get(0) : "";
|
||||
}
|
||||
@@ -104,7 +117,6 @@ public class AppointmentDTO {
|
||||
return getPetID();
|
||||
}
|
||||
|
||||
// Keep old name so adapter doesn't break
|
||||
public String getServiceType() {
|
||||
return serviceName;
|
||||
}
|
||||
@@ -113,7 +125,6 @@ public class AppointmentDTO {
|
||||
return serviceId;
|
||||
}
|
||||
|
||||
// Status alias
|
||||
public String getStatus() {
|
||||
return appointmentStatus;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user