forked from tom.biard/ScienceQuest
parent
a2fe781a96
commit
54f7d242c1
@ -0,0 +1,31 @@
|
||||
package fr.iut.sciencequest.sae.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import fr.iut.sciencequest.sae.entities.Partie;
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.*;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class AdminDTO extends RepresentationModel<AdminDTO> {
|
||||
@NotNull
|
||||
private int id;
|
||||
|
||||
@Email
|
||||
@NotNull
|
||||
@NotBlank
|
||||
private String email;
|
||||
|
||||
@NotNull
|
||||
@NotBlank
|
||||
private String password;
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package fr.iut.sciencequest.sae.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.*;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class DifficulteDTO extends RepresentationModel<DifficulteDTO> {
|
||||
@NotNull
|
||||
private int id;
|
||||
|
||||
@NotBlank
|
||||
private String libelle;
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package fr.iut.sciencequest.sae.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import fr.iut.sciencequest.sae.entities.Partie;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.*;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class InviteDTO extends RepresentationModel<InviteDTO> {
|
||||
@NotNull
|
||||
private int id;
|
||||
|
||||
@NotBlank
|
||||
private String pseudo;
|
||||
|
||||
private PartieDTO partie;
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package fr.iut.sciencequest.sae.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.*;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class JeuDTO extends RepresentationModel<JeuDTO> {
|
||||
@NotNull
|
||||
private int id;
|
||||
|
||||
@NotBlank
|
||||
private String nom;
|
||||
|
||||
@Min(0)
|
||||
private int nbrParties = 0;
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package fr.iut.sciencequest.sae.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import fr.iut.sciencequest.sae.entities.Reponse;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.*;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class ReponseDTO extends RepresentationModel<ReponseDTO> {
|
||||
@NotNull
|
||||
private int id;
|
||||
|
||||
@NotNull
|
||||
@NotBlank
|
||||
private String reponse;
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package fr.iut.sciencequest.sae.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.*;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class ThematiqueDTO extends RepresentationModel<ThematiqueDTO> {
|
||||
@NotNull
|
||||
private int id;
|
||||
|
||||
@NotBlank
|
||||
private String libelle;
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package fr.iut.sciencequest.sae.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import fr.iut.sciencequest.sae.entities.Partie;
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.*;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class UtilisateurDTO extends RepresentationModel<UtilisateurDTO> {
|
||||
@NotNull
|
||||
private int id;
|
||||
|
||||
@Email
|
||||
@NotNull
|
||||
private String email;
|
||||
|
||||
@NotBlank
|
||||
private String motDePasse;
|
||||
|
||||
@NotBlank
|
||||
private String pseudo;
|
||||
|
||||
private PartieDTO partie;
|
||||
}
|
Loading…
Reference in new issue