Align desktop DTOs to match backend field names
Phase 5: Simple DTO field renames AdoptionResponse: - id → adoptionId AppointmentResponse: - id → appointmentId - petNames: String → List<String> ProductResponse/ProductRequest: - id → prodId - productName → prodName - description → prodDesc - price → prodPrice ServiceResponse: - description → serviceDesc - price → servicePrice - Added serviceDuration field SupplierResponse/SupplierRequest: - id → supId - supplierName → supCompany - contactPerson → supContactFirstName - Added supContactLastName field - email → supEmail - phone → supPhone UserRequest/UserResponse already use fullName (no changes needed) All field names now match backend DTOs exactly. Controllers and views may need updates to reference new field names. Phase 5
This commit is contained in:
@@ -3,7 +3,7 @@ package org.example.petshopdesktop.api.dto.adoption;
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class AdoptionResponse {
|
||||
private Long id;
|
||||
private Long adoptionId;
|
||||
private String petName;
|
||||
private String customerName;
|
||||
private LocalDate adoptionDate;
|
||||
@@ -12,12 +12,12 @@ public class AdoptionResponse {
|
||||
public AdoptionResponse() {
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
public Long getAdoptionId() {
|
||||
return adoptionId;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
public void setAdoptionId(Long adoptionId) {
|
||||
this.adoptionId = adoptionId;
|
||||
}
|
||||
|
||||
public String getPetName() {
|
||||
|
||||
@@ -4,9 +4,9 @@ import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
|
||||
public class AppointmentResponse {
|
||||
private Long id;
|
||||
private Long appointmentId;
|
||||
private String customerName;
|
||||
private String petNames;
|
||||
private java.util.List<String> petNames;
|
||||
private String serviceName;
|
||||
private LocalDate appointmentDate;
|
||||
private LocalTime appointmentTime;
|
||||
@@ -15,12 +15,12 @@ public class AppointmentResponse {
|
||||
public AppointmentResponse() {
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
public Long getAppointmentId() {
|
||||
return appointmentId;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
public void setAppointmentId(Long appointmentId) {
|
||||
this.appointmentId = appointmentId;
|
||||
}
|
||||
|
||||
public String getCustomerName() {
|
||||
@@ -31,11 +31,11 @@ public class AppointmentResponse {
|
||||
this.customerName = customerName;
|
||||
}
|
||||
|
||||
public String getPetNames() {
|
||||
public java.util.List<String> getPetNames() {
|
||||
return petNames;
|
||||
}
|
||||
|
||||
public void setPetNames(String petNames) {
|
||||
public void setPetNames(java.util.List<String> petNames) {
|
||||
this.petNames = petNames;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,20 +3,20 @@ package org.example.petshopdesktop.api.dto.product;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class ProductRequest {
|
||||
private String productName;
|
||||
private String prodName;
|
||||
private Long categoryId;
|
||||
private BigDecimal price;
|
||||
private String description;
|
||||
private BigDecimal prodPrice;
|
||||
private String prodDesc;
|
||||
|
||||
public ProductRequest() {
|
||||
}
|
||||
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
public String getProdName() {
|
||||
return prodName;
|
||||
}
|
||||
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
public void setProdName(String prodName) {
|
||||
this.prodName = prodName;
|
||||
}
|
||||
|
||||
public Long getCategoryId() {
|
||||
@@ -27,19 +27,19 @@ public class ProductRequest {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public BigDecimal getPrice() {
|
||||
return price;
|
||||
public BigDecimal getProdPrice() {
|
||||
return prodPrice;
|
||||
}
|
||||
|
||||
public void setPrice(BigDecimal price) {
|
||||
this.price = price;
|
||||
public void setProdPrice(BigDecimal prodPrice) {
|
||||
this.prodPrice = prodPrice;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
public String getProdDesc() {
|
||||
return prodDesc;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
public void setProdDesc(String prodDesc) {
|
||||
this.prodDesc = prodDesc;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,29 +3,29 @@ package org.example.petshopdesktop.api.dto.product;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class ProductResponse {
|
||||
private Long id;
|
||||
private String productName;
|
||||
private Long prodId;
|
||||
private String prodName;
|
||||
private String categoryName;
|
||||
private BigDecimal price;
|
||||
private String description;
|
||||
private BigDecimal prodPrice;
|
||||
private String prodDesc;
|
||||
|
||||
public ProductResponse() {
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
public Long getProdId() {
|
||||
return prodId;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
public void setProdId(Long prodId) {
|
||||
this.prodId = prodId;
|
||||
}
|
||||
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
public String getProdName() {
|
||||
return prodName;
|
||||
}
|
||||
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
public void setProdName(String prodName) {
|
||||
this.prodName = prodName;
|
||||
}
|
||||
|
||||
public String getCategoryName() {
|
||||
@@ -36,19 +36,19 @@ public class ProductResponse {
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public BigDecimal getPrice() {
|
||||
return price;
|
||||
public BigDecimal getProdPrice() {
|
||||
return prodPrice;
|
||||
}
|
||||
|
||||
public void setPrice(BigDecimal price) {
|
||||
this.price = price;
|
||||
public void setProdPrice(BigDecimal prodPrice) {
|
||||
this.prodPrice = prodPrice;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
public String getProdDesc() {
|
||||
return prodDesc;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
public void setProdDesc(String prodDesc) {
|
||||
this.prodDesc = prodDesc;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,9 @@ import java.math.BigDecimal;
|
||||
public class ServiceResponse {
|
||||
private Long id;
|
||||
private String serviceName;
|
||||
private BigDecimal price;
|
||||
private String description;
|
||||
private BigDecimal servicePrice;
|
||||
private String serviceDesc;
|
||||
private Integer serviceDuration;
|
||||
|
||||
public ServiceResponse() {
|
||||
}
|
||||
@@ -27,19 +28,27 @@ public class ServiceResponse {
|
||||
this.serviceName = serviceName;
|
||||
}
|
||||
|
||||
public BigDecimal getPrice() {
|
||||
return price;
|
||||
public BigDecimal getServicePrice() {
|
||||
return servicePrice;
|
||||
}
|
||||
|
||||
public void setPrice(BigDecimal price) {
|
||||
this.price = price;
|
||||
public void setServicePrice(BigDecimal servicePrice) {
|
||||
this.servicePrice = servicePrice;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
public String getServiceDesc() {
|
||||
return serviceDesc;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
public void setServiceDesc(String serviceDesc) {
|
||||
this.serviceDesc = serviceDesc;
|
||||
}
|
||||
|
||||
public Integer getServiceDuration() {
|
||||
return serviceDuration;
|
||||
}
|
||||
|
||||
public void setServiceDuration(Integer serviceDuration) {
|
||||
this.serviceDuration = serviceDuration;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,45 +1,54 @@
|
||||
package org.example.petshopdesktop.api.dto.supplier;
|
||||
|
||||
public class SupplierRequest {
|
||||
private String supplierName;
|
||||
private String contactPerson;
|
||||
private String phone;
|
||||
private String email;
|
||||
private String supCompany;
|
||||
private String supContactFirstName;
|
||||
private String supContactLastName;
|
||||
private String supPhone;
|
||||
private String supEmail;
|
||||
private String address;
|
||||
|
||||
public SupplierRequest() {
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
public String getSupCompany() {
|
||||
return supCompany;
|
||||
}
|
||||
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
public void setSupCompany(String supCompany) {
|
||||
this.supCompany = supCompany;
|
||||
}
|
||||
|
||||
public String getContactPerson() {
|
||||
return contactPerson;
|
||||
public String getSupContactFirstName() {
|
||||
return supContactFirstName;
|
||||
}
|
||||
|
||||
public void setContactPerson(String contactPerson) {
|
||||
this.contactPerson = contactPerson;
|
||||
public void setSupContactFirstName(String supContactFirstName) {
|
||||
this.supContactFirstName = supContactFirstName;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
public String getSupContactLastName() {
|
||||
return supContactLastName;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
public void setSupContactLastName(String supContactLastName) {
|
||||
this.supContactLastName = supContactLastName;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
public String getSupPhone() {
|
||||
return supPhone;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
public void setSupPhone(String supPhone) {
|
||||
this.supPhone = supPhone;
|
||||
}
|
||||
|
||||
public String getSupEmail() {
|
||||
return supEmail;
|
||||
}
|
||||
|
||||
public void setSupEmail(String supEmail) {
|
||||
this.supEmail = supEmail;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
|
||||
@@ -1,54 +1,63 @@
|
||||
package org.example.petshopdesktop.api.dto.supplier;
|
||||
|
||||
public class SupplierResponse {
|
||||
private Long id;
|
||||
private String supplierName;
|
||||
private String contactPerson;
|
||||
private String phone;
|
||||
private String email;
|
||||
private Long supId;
|
||||
private String supCompany;
|
||||
private String supContactFirstName;
|
||||
private String supContactLastName;
|
||||
private String supPhone;
|
||||
private String supEmail;
|
||||
private String address;
|
||||
|
||||
public SupplierResponse() {
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
public Long getSupId() {
|
||||
return supId;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
public void setSupId(Long supId) {
|
||||
this.supId = supId;
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
public String getSupCompany() {
|
||||
return supCompany;
|
||||
}
|
||||
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
public void setSupCompany(String supCompany) {
|
||||
this.supCompany = supCompany;
|
||||
}
|
||||
|
||||
public String getContactPerson() {
|
||||
return contactPerson;
|
||||
public String getSupContactFirstName() {
|
||||
return supContactFirstName;
|
||||
}
|
||||
|
||||
public void setContactPerson(String contactPerson) {
|
||||
this.contactPerson = contactPerson;
|
||||
public void setSupContactFirstName(String supContactFirstName) {
|
||||
this.supContactFirstName = supContactFirstName;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
public String getSupContactLastName() {
|
||||
return supContactLastName;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
public void setSupContactLastName(String supContactLastName) {
|
||||
this.supContactLastName = supContactLastName;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
public String getSupPhone() {
|
||||
return supPhone;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
public void setSupPhone(String supPhone) {
|
||||
this.supPhone = supPhone;
|
||||
}
|
||||
|
||||
public String getSupEmail() {
|
||||
return supEmail;
|
||||
}
|
||||
|
||||
public void setSupEmail(String supEmail) {
|
||||
this.supEmail = supEmail;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
|
||||
Reference in New Issue
Block a user