diff --git a/api/statisticsservice.yaml b/api/statisticsservice.yaml index 79fbe5d..d3b3f0c 100644 --- a/api/statisticsservice.yaml +++ b/api/statisticsservice.yaml @@ -231,6 +231,11 @@ components: receiverId: type: string description: receiving user id of the message (taken from session). Can be null for groupchat. + tenantId: + type: integer + format: int64 + description: The id of the tenant + example: 1 StartVideoCallStatisticsEventMessage: type: object @@ -253,6 +258,10 @@ components: type: string description: The uuid of the video call example: 123e4567-e89b-12d3-a456-556642440000 + tenantId: + type: integer + format: int64 + description: The id of the tenant StopVideoCallStatisticsEventMessage: type: object @@ -402,6 +411,10 @@ components: type: integer adviceSeekerId: type: string + tenantId: + type: integer + format: int64 + description: The id of the tenant BookingRescheduledStatisticsEventMessage: type: object diff --git a/src/main/java/de/caritas/cob/statisticsservice/api/statistics/listener/BookingCreatedListener.java b/src/main/java/de/caritas/cob/statisticsservice/api/statistics/listener/BookingCreatedListener.java index b247fe7..b5be145 100644 --- a/src/main/java/de/caritas/cob/statisticsservice/api/statistics/listener/BookingCreatedListener.java +++ b/src/main/java/de/caritas/cob/statisticsservice/api/statistics/listener/BookingCreatedListener.java @@ -52,6 +52,7 @@ private BookingCreatedMetaData buildMetaData(BookingCreatedStatisticsEventMessag .bookingId(eventMessage.getBookingId()) .currentBookingId(eventMessage.getBookingId()) .adviceSeekerId(eventMessage.getAdviceSeekerId()) + .tenantId(eventMessage.getTenantId()) .build(); } } diff --git a/src/main/java/de/caritas/cob/statisticsservice/api/statistics/listener/CreateMessageListener.java b/src/main/java/de/caritas/cob/statisticsservice/api/statistics/listener/CreateMessageListener.java index 6c997ae..64eb8d8 100644 --- a/src/main/java/de/caritas/cob/statisticsservice/api/statistics/listener/CreateMessageListener.java +++ b/src/main/java/de/caritas/cob/statisticsservice/api/statistics/listener/CreateMessageListener.java @@ -45,6 +45,10 @@ public void receiveMessage(CreateMessageStatisticsEventMessage eventMessage) { } private CreateMessageMetaData buildMetaData(CreateMessageStatisticsEventMessage eventMessage) { - return CreateMessageMetaData.builder().receiverId(eventMessage.getReceiverId()).hasAttachment(eventMessage.getHasAttachment()).build(); + return CreateMessageMetaData.builder() + .receiverId(eventMessage.getReceiverId()) + .hasAttachment(eventMessage.getHasAttachment()) + .tenantId(eventMessage.getTenantId()) + .build(); } } diff --git a/src/main/java/de/caritas/cob/statisticsservice/api/statistics/listener/StartVideoCallListener.java b/src/main/java/de/caritas/cob/statisticsservice/api/statistics/listener/StartVideoCallListener.java index 22e10bb..b732416 100644 --- a/src/main/java/de/caritas/cob/statisticsservice/api/statistics/listener/StartVideoCallListener.java +++ b/src/main/java/de/caritas/cob/statisticsservice/api/statistics/listener/StartVideoCallListener.java @@ -52,6 +52,7 @@ public void receiveMessage(StartVideoCallStatisticsEventMessage eventMessage) { private StartVideoCallMetaData buildMetaData(StartVideoCallStatisticsEventMessage eventMessage) { return StartVideoCallMetaData.builder() .videoCallUuid(eventMessage.getVideoCallUuid()) + .tenantId(eventMessage.getTenantId()) .duration(0) .timestampStop(null) .status(VideoCallStatus.ONGOING) diff --git a/src/main/java/de/caritas/cob/statisticsservice/api/statistics/model/statisticsevent/meta/BookingCreatedMetaData.java b/src/main/java/de/caritas/cob/statisticsservice/api/statistics/model/statisticsevent/meta/BookingCreatedMetaData.java index 646addb..47e6188 100644 --- a/src/main/java/de/caritas/cob/statisticsservice/api/statistics/model/statisticsevent/meta/BookingCreatedMetaData.java +++ b/src/main/java/de/caritas/cob/statisticsservice/api/statistics/model/statisticsevent/meta/BookingCreatedMetaData.java @@ -19,7 +19,7 @@ public class BookingCreatedMetaData implements AdviceSeekerAwareMetaData { private String uid; private Integer bookingId; private Integer currentBookingId; - private String adviceSeekerId; + private Long tenantId; } diff --git a/src/main/java/de/caritas/cob/statisticsservice/api/statistics/model/statisticsevent/meta/CreateMessageMetaData.java b/src/main/java/de/caritas/cob/statisticsservice/api/statistics/model/statisticsevent/meta/CreateMessageMetaData.java index 0065602..45af492 100644 --- a/src/main/java/de/caritas/cob/statisticsservice/api/statistics/model/statisticsevent/meta/CreateMessageMetaData.java +++ b/src/main/java/de/caritas/cob/statisticsservice/api/statistics/model/statisticsevent/meta/CreateMessageMetaData.java @@ -14,4 +14,6 @@ public class CreateMessageMetaData { private boolean hasAttachment; private String receiverId; + private Long tenantId; + } diff --git a/src/main/java/de/caritas/cob/statisticsservice/api/statistics/model/statisticsevent/meta/StartVideoCallMetaData.java b/src/main/java/de/caritas/cob/statisticsservice/api/statistics/model/statisticsevent/meta/StartVideoCallMetaData.java index 7811e3a..3fe9fd1 100644 --- a/src/main/java/de/caritas/cob/statisticsservice/api/statistics/model/statisticsevent/meta/StartVideoCallMetaData.java +++ b/src/main/java/de/caritas/cob/statisticsservice/api/statistics/model/statisticsevent/meta/StartVideoCallMetaData.java @@ -18,4 +18,6 @@ public class StartVideoCallMetaData implements AdviceSeekerAwareMetaData { private VideoCallStatus status; private String adviceSeekerId; + private Long tenantId; + }