feat: Interaction memory
This commit is contained in:
parent
53b4e9090e
commit
a05788c53b
@ -2,7 +2,6 @@ package cz.jzitnik.chronos.entities;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@ -31,4 +30,11 @@ public class Interaction {
|
|||||||
this.interactedWithText = interactedWithText;
|
this.interactedWithText = interactedWithText;
|
||||||
this.character = character;
|
this.character = character;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
private String memory;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
@JsonIgnore
|
||||||
|
private Player player;
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,10 @@ public class Player {
|
|||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private List<Character> seenCharacters = new ArrayList<>();
|
private List<Character> seenCharacters = new ArrayList<>();
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "player", cascade = CascadeType.ALL)
|
||||||
|
@JsonIgnore
|
||||||
|
private List<Interaction> interactions = new ArrayList<>();
|
||||||
|
|
||||||
public Player(String name) {
|
public Player(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user