feat: implement doctor schedule module, add detail fields to doctor profile, and integrate new appointment API client
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package vn.sis.appointment;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
record ProxyResponse(
|
||||
boolean ok,
|
||||
int httpStatus,
|
||||
String statusText,
|
||||
String method,
|
||||
String url,
|
||||
int attempts,
|
||||
String body,
|
||||
String requestInfo,
|
||||
String responseHeaders,
|
||||
Instant tokenExpiresAt,
|
||||
String message) {
|
||||
|
||||
String toJson() {
|
||||
Map<String, Object> values = new LinkedHashMap<>();
|
||||
values.put("ok", ok);
|
||||
values.put("httpStatus", httpStatus);
|
||||
values.put("statusText", statusText);
|
||||
values.put("method", method);
|
||||
values.put("url", url);
|
||||
values.put("attempts", attempts);
|
||||
values.put("body", body == null ? "" : body);
|
||||
values.put("requestInfo", requestInfo == null ? "" : requestInfo);
|
||||
values.put("responseHeaders", responseHeaders == null ? "" : responseHeaders);
|
||||
values.put("tokenExpiresAt", tokenExpiresAt == null ? null : tokenExpiresAt.toString());
|
||||
values.put("message", message == null ? "" : message);
|
||||
return Json.stringify(values);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user