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
This commit is contained in:
parent
b71b9f957c
commit
0ca0dea102
@ -28,6 +28,7 @@ public final class IpBan {
|
|||||||
@Getter private String userIp;
|
@Getter private String userIp;
|
||||||
@Getter private String reason;
|
@Getter private String reason;
|
||||||
@Getter private Instant expiresAt;
|
@Getter private Instant expiresAt;
|
||||||
|
@Getter private String linkedPunishmentId;
|
||||||
|
|
||||||
@Getter private UUID addedBy;
|
@Getter private UUID addedBy;
|
||||||
@Getter private Instant addedAt;
|
@Getter private Instant addedAt;
|
||||||
@ -81,6 +82,7 @@ public final class IpBan {
|
|||||||
this.userIp = userIp;
|
this.userIp = userIp;
|
||||||
this.reason = linked.getPublicReason();
|
this.reason = linked.getPublicReason();
|
||||||
this.expiresAt = linked.getExpiresAt();
|
this.expiresAt = linked.getExpiresAt();
|
||||||
|
this.linkedPunishmentId = linked.getId();
|
||||||
this.addedBy = linked.getAddedBy();
|
this.addedBy = linked.getAddedBy();
|
||||||
this.addedAt = Instant.now();
|
this.addedAt = Instant.now();
|
||||||
this.actorName = linked.getActorName();
|
this.actorName = linked.getActorName();
|
||||||
|
Loading…
Reference in New Issue
Block a user