Merge branch 'master' into Max/Backend/Curriculum
This commit is contained in:
@ -19,7 +19,7 @@ public class ReinscriptionRequest {
|
||||
|
||||
//Permet de différencier les demandes de changement et une réinscription dans le même cursus
|
||||
//Pour la réinscription on va le mettre a 0
|
||||
private boolean type;
|
||||
private boolean type = false;
|
||||
|
||||
public ReinscriptionRequest(){}
|
||||
|
||||
@ -30,6 +30,12 @@ public class ReinscriptionRequest {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public ReinscriptionRequest(User user, Cursus newCursus, RequestState state){
|
||||
this.user = user;
|
||||
this.newCursus = newCursus;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
package ovh.herisson.Clyde.Tables;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.*;
|
||||
|
||||
|
||||
@Entity
|
||||
@ -19,7 +16,6 @@ public class StorageFile {
|
||||
|
||||
private FileType fileType;
|
||||
|
||||
|
||||
public StorageFile(String name, String url, FileType fileType){
|
||||
this.name = name;
|
||||
this.url = url;
|
||||
@ -60,4 +56,5 @@ public class StorageFile {
|
||||
public void setFileType(FileType fileType) {
|
||||
this.fileType = fileType;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,12 +8,11 @@ import java.util.Date;
|
||||
//et l'attribut tokenApi doit encore être ajouté vu qu'il faut en discuter
|
||||
|
||||
@Entity
|
||||
//Je rajoute un s au nom de la table pour éviter les conflits avec les mots réservés
|
||||
@Table(name = "Users")
|
||||
public class User {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
private int regNo;
|
||||
private Long regNo;
|
||||
private String lastName;
|
||||
private String firstName;
|
||||
@Column(unique = true)
|
||||
@ -38,9 +37,34 @@ 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)
|
||||
{
|
||||
this.lastName = lastName;
|
||||
this.firstName = firstName;
|
||||
this.email = email;
|
||||
this.address = address;
|
||||
this.country = country;
|
||||
this.birthDate = birthDate;
|
||||
this.profilePictureUrl = profilePictureUrl;
|
||||
this.password = password;
|
||||
this.role = Role.Student;
|
||||
}
|
||||
public User() {}
|
||||
|
||||
public int getRegNo(){
|
||||
public Long getRegNo(){
|
||||
return this.regNo;
|
||||
}
|
||||
public String getLastName() {
|
||||
|
Reference in New Issue
Block a user