ajout status dans dto + correction nom enum

Springboot
Victor SOULIER 1 year ago
parent 9c8d400a00
commit e031a2f4d8

@ -4,6 +4,7 @@ import fr.iut.sciencequest.sae.dto.difficulte.DifficulteSimpleDTO;
import fr.iut.sciencequest.sae.dto.jeu.JeuDTO; import fr.iut.sciencequest.sae.dto.jeu.JeuDTO;
import fr.iut.sciencequest.sae.dto.joueur.JoueurSimpleDTO; import fr.iut.sciencequest.sae.dto.joueur.JoueurSimpleDTO;
import fr.iut.sciencequest.sae.dto.thematique.ThematiqueSimpleDTO; import fr.iut.sciencequest.sae.dto.thematique.ThematiqueSimpleDTO;
import fr.iut.sciencequest.sae.entities.Status;
import fr.iut.sciencequest.sae.entities.Thematique; import fr.iut.sciencequest.sae.entities.Thematique;
import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
@ -32,4 +33,6 @@ public class PartieDTO extends RepresentationModel<PartieDTO> {
private List<ThematiqueSimpleDTO> thematiques; private List<ThematiqueSimpleDTO> thematiques;
@NotNull @NotNull
private DifficulteSimpleDTO difficulte; private DifficulteSimpleDTO difficulte;
@NotNull
private Status status;
} }

@ -1,10 +1,8 @@
package fr.iut.sciencequest.sae.entities; package fr.iut.sciencequest.sae.entities;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonManagedReference; import com.fasterxml.jackson.annotation.JsonManagedReference;
import jakarta.persistence.*; import jakarta.persistence.*;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
@ -50,5 +48,5 @@ public class Partie {
@Column(name = "status", nullable = false) @Column(name = "status", nullable = false)
@Enumerated(EnumType.STRING) @Enumerated(EnumType.STRING)
private Etat status = Etat.Pending; private Status status = Status.Pending;
} }

@ -1,5 +1,5 @@
package fr.iut.sciencequest.sae.entities; package fr.iut.sciencequest.sae.entities;
public enum Etat { public enum Status {
Pending, Pending,
} }
Loading…
Cancel
Save