Add timestamp to Actions (#2113)
* Add timestamp to Actions Signed-off-by: Vasil Ilchev <Vasil.Ilchev@bosch.com> * Add Timestamp to All Actions Feedback DDI/DMF * After review * Removed Action timestamp as we have timestamp in each ActionStatus so use that instead * Unify to use everywhere System.currentTimeMillis() * Add constructor w/o timestamp to DmfActionUpdateStatus --------- Signed-off-by: Vasil Ilchev <Vasil.Ilchev@bosch.com> Co-authored-by: vasilchev <vasil.ilchev@bosch.com>
This commit is contained in:
@@ -131,4 +131,5 @@ public class MgmtAction extends MgmtBaseEntity {
|
||||
@JsonProperty
|
||||
@Schema(description = "If created by external system this field contains the external reference for the action")
|
||||
private String externalRef;
|
||||
|
||||
}
|
||||
@@ -43,6 +43,10 @@ public class MgmtActionStatus {
|
||||
@Schema(example = "1691065929524")
|
||||
private Long reportedAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691065929524")
|
||||
private Long timestamp;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "200")
|
||||
private Integer code;
|
||||
|
||||
@@ -354,6 +354,7 @@ public final class MgmtTargetMapper {
|
||||
|
||||
result.setMessages(messages);
|
||||
result.setReportedAt(actionStatus.getCreatedAt());
|
||||
result.setTimestamp(actionStatus.getOccurredAt());
|
||||
result.setStatusId(actionStatus.getId());
|
||||
result.setType(actionStatus.getStatus().name().toLowerCase());
|
||||
actionStatus.getCode().ifPresent(result::setCode);
|
||||
|
||||
Reference in New Issue
Block a user