Modif
This commit is contained in:
parent
b734723db9
commit
fefa62627a
2 changed files with 30 additions and 27 deletions
30
src/main/java/tf/lehub/kaamelott/entity/Chevalier.java
Normal file
30
src/main/java/tf/lehub/kaamelott/entity/Chevalier.java
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
package tf.lehub.kaamelott.entity;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class Chevalier {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
private String nom;
|
||||
|
||||
private String titre;
|
||||
|
||||
private String caracteristiquePrincipale;
|
||||
|
||||
private int niveauBravoure;
|
||||
|
||||
@OneToMany(mappedBy = "chevalier", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
private List<ParticipationQuete> participations = new ArrayList<>();
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
package tf.lehub.kaamelott.entity
|
||||
|
||||
import jakarta.persistence.*
|
||||
import lombok.*
|
||||
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
class Chevalier {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private var id: Long? = null
|
||||
|
||||
private var nom: String? = null
|
||||
|
||||
private var titre: String? = null
|
||||
|
||||
private var caracteristiquePrincipale: String? = null
|
||||
|
||||
private var niveauBravoure = 0
|
||||
|
||||
@OneToMany(mappedBy = "chevalier", cascade = [CascadeType.ALL], orphanRemoval = true)
|
||||
var participations: MutableList<ParticipationQuete> = mutableListOf()
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue