From 0ca0dea10293cedd01b4a1769f4ae791d9455213 Mon Sep 17 00:00:00 2001 From: Colin McDonald Date: Sun, 16 Oct 2016 10:25:51 -0400 Subject: [PATCH] Create a bilateral link between bans and ip bans Because existing data does not have this link we're not changing our queries to depend on this new field, it exists purely for the website/other clients. A conversion will be ran on the database to add this field to existing ip bans. Trello card: https://trello.com/c/os6iX7tv/5-create-a-bilateral-link-between-bans-and-ip-bans --- src/main/java/net/frozenorb/apiv3/model/IpBan.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/frozenorb/apiv3/model/IpBan.java b/src/main/java/net/frozenorb/apiv3/model/IpBan.java index 0ecd8e7..3010432 100644 --- a/src/main/java/net/frozenorb/apiv3/model/IpBan.java +++ b/src/main/java/net/frozenorb/apiv3/model/IpBan.java @@ -28,6 +28,7 @@ public final class IpBan { @Getter private String userIp; @Getter private String reason; @Getter private Instant expiresAt; + @Getter private String linkedPunishmentId; @Getter private UUID addedBy; @Getter private Instant addedAt; @@ -81,6 +82,7 @@ public final class IpBan { this.userIp = userIp; this.reason = linked.getPublicReason(); this.expiresAt = linked.getExpiresAt(); + this.linkedPunishmentId = linked.getId(); this.addedBy = linked.getAddedBy(); this.addedAt = Instant.now(); this.actorName = linked.getActorName();