renamed SearchResponse to ServiceItem and moved to shared package
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.vaessl.app.shared;
|
||||
|
||||
import java.util.Map;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
public record ServiceItem(String id, @NotNull String title, String description,
|
||||
Map<String, Object> extraData) {
|
||||
|
||||
public String getExtra(String key) {
|
||||
if (extraData == null) {
|
||||
return null;
|
||||
} else {
|
||||
Object value = extraData.get(key);
|
||||
|
||||
return value != null ? String.valueOf(value) : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user