1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package de.kaiserpfalzedv.rpg.torg.model.perks.magic;
19
20 import com.fasterxml.jackson.annotation.JsonInclude;
21 import de.kaiserpfalzedv.rpg.torg.model.actors.Clearance;
22 import de.kaiserpfalzedv.rpg.torg.model.core.Armor;
23 import de.kaiserpfalzedv.rpg.torg.model.core.Attack;
24 import de.kaiserpfalzedv.rpg.torg.model.core.Axiom;
25 import de.kaiserpfalzedv.rpg.torg.model.perks.Prerequisites;
26 import lombok.AllArgsConstructor;
27 import lombok.EqualsAndHashCode;
28 import lombok.Getter;
29 import lombok.ToString;
30 import lombok.experimental.SuperBuilder;
31 import lombok.extern.jackson.Jacksonized;
32 import org.eclipse.microprofile.openapi.annotations.media.Schema;
33
34 import jakarta.validation.constraints.Size;
35 import java.io.Serializable;
36 import java.util.Set;
37
38
39
40
41
42
43
44 @Jacksonized
45 @SuperBuilder(toBuilder = true)
46 @AllArgsConstructor
47 @Getter
48 @ToString(onlyExplicitlyIncluded = true)
49 @EqualsAndHashCode(onlyExplicitlyIncluded = false)
50 @JsonInclude(JsonInclude.Include.NON_ABSENT)
51 @Schema(description = "The spell definition.")
52 public class SpellData implements Serializable {
53 @Size(max = 5000, message = "The textual description must not be larger than 5000 characters.")
54 @Schema(description = "A textual description of this spell.", nullable = true, maxLength = 5000)
55 private final String description;
56
57 @ToString.Include
58 @EqualsAndHashCode.Include
59 @Schema(description = "The minimum clearance level for this spell.")
60 private final Clearance clearance;
61
62 @ToString.Include
63 @EqualsAndHashCode.Include
64 @Schema(description = "The axioms of this spell", minItems = 1, maxItems = 2)
65 private final Set<Axiom> axioms;
66
67 @Schema(description = "Notes to this spell.", minItems = 0)
68 private final Set<String> notes;
69
70 @Schema(description = "Infos to this spell.", minItems = 0)
71 private final Set<String> info;
72
73 @Schema(description = "Prerequisites for obtaining the spell", minItems = 0)
74 private final Set<Prerequisites> prerequisites;
75
76 @Schema(description = "Possible attack (most spells are treated as attack to use the CharSheet for rolling).", minItems = 0)
77 private final Set<Attack> attack;
78
79 @Schema(description = "Possible armor (some spells provide armor depending on success levels).", minItems = 0)
80 private final Set<Armor> armor;
81 }