rework ui
This commit is contained in:
@@ -15,13 +15,13 @@ import marketing.heyday.hartmann.fotodocumentation.core.model.Customer;
|
||||
* created: 22 Jan 2026
|
||||
*/
|
||||
@Schema(name = "Customer")
|
||||
public record CustomerValue(Long id, String name, String customerNumber, List<PictureValue> pictures) {
|
||||
public record CustomerValue(Long id, String name, String customerNumber, String city, String zip, List<PictureValue> pictures) {
|
||||
|
||||
public static CustomerValue builder(Customer customer) {
|
||||
if (customer == null) {
|
||||
return null;
|
||||
}
|
||||
List<PictureValue> pictures = customer.getPictures().parallelStream().map(PictureValue::builder).filter(p -> p != null).toList();
|
||||
return new CustomerValue(customer.getCustomerId(), customer.getName(), customer.getCustomerNumber(), pictures);
|
||||
return new CustomerValue(customer.getCustomerId(), customer.getName(), customer.getCustomerNumber(), customer.getCity(), customer.getZip(), pictures);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user