Max/Backend/UserControllerUpdate #94

Merged
Maxime merged 6 commits from Max/Backend/UserControllerUpdate into master 2024-03-14 21:53:35 +01:00
Showing only changes of commit 28d252279a - Show all commits

View File

@ -8,7 +8,6 @@ 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
@ -37,6 +36,31 @@ 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(){