Skip to content
Snippets Groups Projects
Commit 7997860a authored by Lukáš Majdan's avatar Lukáš Majdan Committed by Karolína Dočkalová Burská
Browse files

Add JSON serializer to createdAt

parent a5e0f7ee
No related branches found
No related tags found
1 merge request!127Develop
......@@ -47,6 +47,9 @@ public class TrainingDefinitionByIdDTO {
private LocalDateTime lastEdited;
@ApiModelProperty(value = "Name of the user who has done the last edit in definition.", example = "John Doe")
private String lastEditedBy;
@ApiModelProperty(value = "Time of creation of definition.", example = "2017-10-19 10:23:54+02")
@JsonSerialize(using = LocalDateTimeUTCSerializer.class)
private LocalDateTime createdAt;
/**
* Gets id.
......@@ -264,6 +267,14 @@ public class TrainingDefinitionByIdDTO {
this.lastEditedBy = lastEditedBy;
}
public LocalDateTime getCreatedAt() {
return createdAt;
}
public void setCreatedAt(LocalDateTime createdAt) {
this.createdAt = createdAt;
}
@Override
public boolean equals(Object object) {
if (!(object instanceof TrainingDefinitionByIdDTO)) return false;
......@@ -293,6 +304,7 @@ public class TrainingDefinitionByIdDTO {
", canBeArchived=" + canBeArchived +
", estimatedDuration=" + estimatedDuration +
", lastEdited=" + lastEdited +
", createdAt=" + createdAt +
'}';
}
}
......@@ -43,6 +43,7 @@ public class TrainingDefinitionDTO {
@ApiModelProperty(value = "Name of the user who has done the last edit in definition.", example = "John Doe")
private String lastEditedBy;
@ApiModelProperty(value = "Time of creation of definition.", example = "2017-10-19 10:23:54+02")
@JsonSerialize(using = LocalDateTimeUTCSerializer.class)
private LocalDateTime createdAt;
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment