1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package de.kaiserpfalzedv.rpg.torg.model.items;
19
20 import com.fasterxml.jackson.annotation.JsonInclude;
21 import de.kaiserpfalzedv.rpg.torg.model.core.Armor;
22 import de.kaiserpfalzedv.rpg.torg.model.core.Attack;
23 import de.kaiserpfalzedv.rpg.torg.model.core.Axiom;
24 import de.kaiserpfalzedv.rpg.torg.model.core.Cosm;
25 import lombok.AllArgsConstructor;
26 import lombok.Builder;
27 import lombok.Getter;
28 import lombok.ToString;
29 import lombok.extern.jackson.Jacksonized;
30 import org.eclipse.microprofile.openapi.annotations.media.Schema;
31
32 import jakarta.validation.constraints.Min;
33 import jakarta.validation.constraints.Size;
34 import java.io.Serializable;
35 import java.util.HashSet;
36 import java.util.Set;
37
38
39
40
41
42
43
44 @SuppressWarnings("FieldMayBeFinal")
45 @Jacksonized
46 @Builder(toBuilder = true)
47 @AllArgsConstructor
48 @Getter
49 @ToString
50 @JsonInclude(JsonInclude.Include.NON_ABSENT)
51 @Schema(description = "Gear and equipment.")
52 public class ItemData 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 @Schema(description = "Notes to this spell.", minItems = 0)
58 @Builder.Default
59 private final Set<String> notes = new HashSet<>();
60
61 @Schema(description = "Infos to this spell.", minItems = 0)
62 @Builder.Default
63 private final Set<String> info = new HashSet<>();
64
65 @Schema(description = "The cosms for this gear.", minItems = 1)
66 @Builder.Default
67 private final Set<Cosm> cosms = new HashSet<>();
68
69 @Schema(description = "The axioms of this spell", minItems = 1, maxItems = 2)
70 @Builder.Default
71 private final Set<Axiom> axioms = new HashSet<>();
72
73 @Min(1)
74 @Schema(description = "The price in $.", minimum = "0")
75 @Builder.Default
76 private int price = 0;
77
78 @Min(1)
79 @Schema(description = "The DN to get the equipment from the Delphi Council.", minimum = "1")
80 @Builder.Default
81 private int delphiDN = 10;
82
83 @Schema(description = "Possible attack (most spells are treated as attack to use the CharSheet for rolling).", minItems = 0)
84 @Builder.Default
85 private final Set<Attack> attack = new HashSet<>();
86
87 @Schema(description = "Possible armor (some spells provide armor depending on success levels).", minItems = 0)
88 @Builder.Default
89 private final Set<Armor> armor = new HashSet<>();
90 }