reordered some variables in Post for easier JSON readability
This commit is contained in:
@@ -13,6 +13,8 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class JodelPost {
|
||||
// id of the post
|
||||
public Long id;
|
||||
// Parent id
|
||||
public Optional<Long> parent = Optional.empty();
|
||||
// id of the author in db
|
||||
private final Long authorID;
|
||||
// anonymized authorID
|
||||
@@ -25,14 +27,12 @@ public class JodelPost {
|
||||
public Timestamp date;
|
||||
// location if the post
|
||||
public Location location;
|
||||
// list of all comments for the post
|
||||
public Vector<JodelPost> comments = new Vector<>();
|
||||
// the own reaction (null = none, true = positive, false = negative)
|
||||
public Optional<Boolean> reaction;
|
||||
// all other reactions
|
||||
public Reactions reactions;
|
||||
// Parent id
|
||||
public Optional<Long> parent = Optional.empty();
|
||||
// list of all comments for the post
|
||||
public Vector<JodelPost> comments = new Vector<>();
|
||||
|
||||
// anonymize function to recursively anonymize the posts
|
||||
public void anonymize(Vector<Long> idCache) {
|
||||
|
||||
@@ -4,8 +4,8 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class Location {
|
||||
public float longitude;
|
||||
public float latitude;
|
||||
public float longitude;
|
||||
|
||||
@JsonCreator
|
||||
public Location(@JsonProperty("longitude") float longitude, @JsonProperty("latitude") float latitude ) {
|
||||
|
||||
Reference in New Issue
Block a user