Add visibility flag to badge storage
This commit is contained in:
parent
84b3d324bb
commit
bc887ec6fa
|
@ -14,13 +14,16 @@ public class AccountBadge {
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
private final Instant expiration;
|
private final Instant expiration;
|
||||||
|
private final boolean visible;
|
||||||
|
|
||||||
@JsonCreator
|
@JsonCreator
|
||||||
public AccountBadge(
|
public AccountBadge(
|
||||||
@JsonProperty("name") String name,
|
@JsonProperty("name") String name,
|
||||||
@JsonProperty("expiration") Instant expiration) {
|
@JsonProperty("expiration") Instant expiration,
|
||||||
|
@JsonProperty("visible") boolean visible) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.expiration = expiration;
|
this.expiration = expiration;
|
||||||
|
this.visible = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
@ -31,6 +34,10 @@ public class AccountBadge {
|
||||||
return expiration;
|
return expiration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isVisible() {
|
||||||
|
return visible;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(final Object o) {
|
public boolean equals(final Object o) {
|
||||||
if (this == o) {
|
if (this == o) {
|
||||||
|
@ -40,13 +47,13 @@ public class AccountBadge {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
AccountBadge that = (AccountBadge) o;
|
AccountBadge that = (AccountBadge) o;
|
||||||
return Objects.equals(name, that.name)
|
return visible == that.visible && Objects.equals(name, that.name)
|
||||||
&& Objects.equals(expiration, that.expiration);
|
&& Objects.equals(expiration, that.expiration);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(name, expiration);
|
return Objects.hash(name, expiration, visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,6 +61,7 @@ public class AccountBadge {
|
||||||
return "AccountBadge{" +
|
return "AccountBadge{" +
|
||||||
"name='" + name + '\'' +
|
"name='" + name + '\'' +
|
||||||
", expiration=" + expiration +
|
", expiration=" + expiration +
|
||||||
|
", visible=" + visible +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue