rework ui

This commit is contained in:
verboomp
2026-01-29 15:22:05 +01:00
parent 0918185a6b
commit 71100353fa
7 changed files with 31 additions and 20 deletions

View File

@@ -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);
}
}