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);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -123,6 +123,6 @@ public class CustomerPictureResourceTest extends AbstractRestTest {
|
||||
test.username = "adm";
|
||||
test.password = "x1t0e7Pb49";
|
||||
|
||||
test.doAddCustomerPictureWrongJson();
|
||||
test.doAddCustomerWithPicture();
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,6 +2,8 @@
|
||||
"id": 1,
|
||||
"name": "Müller Apotheke",
|
||||
"customerNumber": "1234",
|
||||
"city": "Hannover",
|
||||
"zip": "12345",
|
||||
"pictures": [
|
||||
{
|
||||
"id": 1,
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user