cleaned the Entities
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m4s
Build and test backend / Test-backend (pull_request) Successful in 2m1s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 24s

This commit is contained in:
Bartha Maxime 2024-03-16 20:31:03 +01:00
parent 382d3c203a
commit c5d7ce4178
5 changed files with 15 additions and 25 deletions

View File

@ -16,7 +16,7 @@ public class InscriptionRequest {
private String country; private String country;
private Date birthDate; private Date birthDate;
@ManyToOne @ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name="Curriculum") @JoinColumn(name="Curriculum")
private Curriculum curriculum; private Curriculum curriculum;
private RequestState state; private RequestState state;
@ -112,4 +112,12 @@ public class InscriptionRequest {
public void setProfilePicture(String profilePicture) { public void setProfilePicture(String profilePicture) {
this.profilePicture = profilePicture; this.profilePicture = profilePicture;
} }
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
} }

View File

@ -3,7 +3,7 @@ package ovh.herisson.Clyde.Tables;
import jakarta.persistence.*; import jakarta.persistence.*;
@Entity @Entity
public class ReinscriptionRequest { public class ReInscriptionRequest {
@Id @Id
@GeneratedValue(strategy = GenerationType.AUTO) @GeneratedValue(strategy = GenerationType.AUTO)
private int id; private int id;
@ -21,16 +21,16 @@ public class ReinscriptionRequest {
//Pour la réinscription on va le mettre a 0 //Pour la réinscription on va le mettre a 0
private boolean type = false; private boolean type = false;
public ReinscriptionRequest(){} public ReInscriptionRequest(){}
public ReinscriptionRequest(User user, Curriculum newCurriculum, RequestState state, boolean type){ public ReInscriptionRequest(User user, Curriculum newCurriculum, RequestState state, boolean type){
this.user = user; this.user = user;
this.newCurriculum = newCurriculum; this.newCurriculum = newCurriculum;
this.state = state; this.state = state;
this.type = type; this.type = type;
} }
public ReinscriptionRequest(User user, Curriculum newCurriculum, RequestState state){ public ReInscriptionRequest(User user, Curriculum newCurriculum, RequestState state){
this.user = user; this.user = user;
this.newCurriculum = newCurriculum; this.newCurriculum = newCurriculum;
this.state = state; this.state = state;

View File

@ -24,7 +24,6 @@ public class StorageFile {
public StorageFile(){} public StorageFile(){}
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }

View File

@ -1,8 +1,6 @@
package ovh.herisson.Clyde.Tables; package ovh.herisson.Clyde.Tables;
import jakarta.persistence.*; import jakarta.persistence.*;
import org.springframework.scheduling.annotation.Scheduled;
import ovh.herisson.Clyde.Repositories.TokenRepository;
import java.util.Date; import java.util.Date;

View File

@ -1,11 +1,8 @@
package ovh.herisson.Clyde.Tables; package ovh.herisson.Clyde.Tables;
import jakarta.persistence.*; import jakarta.persistence.*;
import java.util.Date; import java.util.Date;
//Classe représentant un utilisateur l'attribut password demande surement un peu de rafinement niveau sécurité
//et l'attribut tokenApi doit encore être ajouté vu qu'il faut en discuter
@Entity @Entity
@Table(name = "Users") @Table(name = "Users")
@ -37,18 +34,6 @@ public class User {
this.password = password; this.password = password;
} }
/** Constructor for the first registration request from a student (can't specify a Role)
*
* @param lastName
* @param firstName
* @param email
* @param address
* @param country
* @param birthDate
* @param profilePictureUrl
* @param password
*/
public User(String lastName, String firstName, String email, String address, public User(String lastName, String firstName, String email, String address,
String country, Date birthDate, String profilePictureUrl, String password) String country, Date birthDate, String profilePictureUrl, String password)
{ {
@ -95,8 +80,8 @@ public class User {
return address; return address;
} }
public void setAddress(String adress) { public void setAddress(String address) {
this.address = adress; this.address = address;
} }
public String getCountry() { public String getCountry() {