-
Notifications
You must be signed in to change notification settings - Fork 1
/
Fighters.java
55 lines (43 loc) · 1023 Bytes
/
Fighters.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package io.quarkus.sample.superheroes.fight;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import io.quarkus.sample.superheroes.fight.client.Hero;
import io.quarkus.sample.superheroes.fight.client.Villain;
/**
* Entity class representing Fighters
*/
@Schema(description = "A fight between one hero and one villain")
public class Fighters {
@NotNull
@Valid
private Hero hero;
@NotNull
@Valid
private Villain villain;
public Fighters(Hero hero, Villain villain) {
this.hero = hero;
this.villain = villain;
}
public Fighters() {
}
public Hero getHero() {
return this.hero;
}
public void setHero(Hero hero) {
this.hero = hero;
}
public Villain getVillain() {
return this.villain;
}
public void setVillain(Villain villain) {
this.villain = villain;
}
@Override
public String toString() {
return "Fighters{" +
"hero=" + this.hero +
", villain=" + this.villain +
'}';
}
}