diff --git a/backend/src/main/java/cz/jzitnik/chronos/entities/Interaction.java b/backend/src/main/java/cz/jzitnik/chronos/entities/Interaction.java index d2ba7fd..8036079 100644 --- a/backend/src/main/java/cz/jzitnik/chronos/entities/Interaction.java +++ b/backend/src/main/java/cz/jzitnik/chronos/entities/Interaction.java @@ -2,7 +2,6 @@ package cz.jzitnik.chronos.entities; import com.fasterxml.jackson.annotation.JsonIgnore; import jakarta.persistence.*; -import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -31,4 +30,11 @@ public class Interaction { this.interactedWithText = interactedWithText; this.character = character; } + + @JsonIgnore + private String memory; + + @ManyToOne + @JsonIgnore + private Player player; } diff --git a/backend/src/main/java/cz/jzitnik/chronos/entities/Player.java b/backend/src/main/java/cz/jzitnik/chronos/entities/Player.java index b727c63..2d812bf 100644 --- a/backend/src/main/java/cz/jzitnik/chronos/entities/Player.java +++ b/backend/src/main/java/cz/jzitnik/chronos/entities/Player.java @@ -55,6 +55,10 @@ public class Player { @JsonIgnore private List seenCharacters = new ArrayList<>(); + @OneToMany(mappedBy = "player", cascade = CascadeType.ALL) + @JsonIgnore + private List interactions = new ArrayList<>(); + public Player(String name) { this.name = name; }