cleaned the Entities
This commit is contained in:
		@ -16,7 +16,7 @@ public class InscriptionRequest {
 | 
			
		||||
    private String country;
 | 
			
		||||
    private Date birthDate;
 | 
			
		||||
 | 
			
		||||
    @ManyToOne
 | 
			
		||||
    @ManyToOne(fetch = FetchType.EAGER)
 | 
			
		||||
    @JoinColumn(name="Curriculum")
 | 
			
		||||
    private Curriculum curriculum;
 | 
			
		||||
    private RequestState state;
 | 
			
		||||
@ -112,4 +112,12 @@ public class InscriptionRequest {
 | 
			
		||||
    public void setProfilePicture(String profilePicture) {
 | 
			
		||||
        this.profilePicture = profilePicture;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getPassword() {
 | 
			
		||||
        return password;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setPassword(String password) {
 | 
			
		||||
        this.password = password;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@ package ovh.herisson.Clyde.Tables;
 | 
			
		||||
import jakarta.persistence.*;
 | 
			
		||||
 | 
			
		||||
@Entity
 | 
			
		||||
public class ReinscriptionRequest {
 | 
			
		||||
public class ReInscriptionRequest {
 | 
			
		||||
    @Id
 | 
			
		||||
    @GeneratedValue(strategy = GenerationType.AUTO)
 | 
			
		||||
    private int id;
 | 
			
		||||
@ -21,16 +21,16 @@ public class ReinscriptionRequest {
 | 
			
		||||
    //Pour la réinscription on va le mettre a 0
 | 
			
		||||
    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.newCurriculum = newCurriculum;
 | 
			
		||||
        this.state = state;
 | 
			
		||||
        this.type = type;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public ReinscriptionRequest(User user, Curriculum newCurriculum, RequestState state){
 | 
			
		||||
    public ReInscriptionRequest(User user, Curriculum newCurriculum, RequestState state){
 | 
			
		||||
        this.user = user;
 | 
			
		||||
        this.newCurriculum = newCurriculum;
 | 
			
		||||
        this.state = state;
 | 
			
		||||
@ -24,7 +24,6 @@ public class StorageFile {
 | 
			
		||||
 | 
			
		||||
    public StorageFile(){}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public void setId(Long id) {
 | 
			
		||||
        this.id = id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,6 @@
 | 
			
		||||
package ovh.herisson.Clyde.Tables;
 | 
			
		||||
 | 
			
		||||
import jakarta.persistence.*;
 | 
			
		||||
import org.springframework.scheduling.annotation.Scheduled;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.TokenRepository;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,8 @@
 | 
			
		||||
package ovh.herisson.Clyde.Tables;
 | 
			
		||||
 | 
			
		||||
import jakarta.persistence.*;
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
@Table(name = "Users")
 | 
			
		||||
@ -37,18 +34,6 @@ public class User {
 | 
			
		||||
        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,
 | 
			
		||||
                String country, Date birthDate, String profilePictureUrl, String password)
 | 
			
		||||
    {
 | 
			
		||||
@ -95,8 +80,8 @@ public class User {
 | 
			
		||||
        return address;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setAddress(String adress) {
 | 
			
		||||
        this.address = adress;
 | 
			
		||||
    public void setAddress(String address) {
 | 
			
		||||
        this.address = address;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getCountry() {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user