LeoMoulin/Backend/Leo #55

Merged
tonitch merged 11 commits from LeoMoulin/Backend/Leo into master 2024-03-05 23:42:00 +01:00
6 changed files with 21 additions and 33 deletions
Showing only changes of commit bb0e6783ec - Show all commits

View File

View File

@ -8,7 +8,7 @@ public class Secretary {
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@JoinColumn(name = "User")
@JoinColumn(name = "Users")
private int regNo;
private String faculty;

View File

@ -8,7 +8,7 @@ public class TeacherGivenCourse {
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@JoinColumn(name = "User")
@JoinColumn(name = "Users")
private int regNo;
@JoinColumn(name = "Course")

View File

@ -1,21 +1,20 @@
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
public class Token {
@GeneratedValue(strategy = GenerationType.AUTO)
@Id
private int id;
private int regNo;
private String data;
public Token(int regNo, String data){
@JoinColumn(name ="Users")
private int regNo;
private String token;
Review

data ? peut-être être plus précis dans le nom ?

data ? peut-être être plus précis dans le nom ?
Review

Je vais juste le rename en token comme ca c'est plié !

Je vais juste le rename en token comme ca c'est plié !
public Token(int regNo, String token){
this.regNo = regNo;
this.data = data;
this.token = token;
}
public Token(){}
@ -31,11 +30,11 @@ public class Token {
this.regNo = regNo;
}
public String getData(){
return data;
public String getToken(){
return token;
}
public void setData(String data) {
this.data = data;
public void setToken(String data) {
this.token = data;
}
}

View File

@ -17,22 +17,20 @@ public class User {
private String lastName;
private String firstName;
private String email;
private String adress;
private String address;
private String country;
private Date birthDate;
private ovh.herisson.Clyde.Tables.Role role;
private String password;
private String salt;
public User(String lastName, String firstName, String email, String adress, String country, Date birthDate, Role role, String password, String salt){
public User(String lastName, String firstName, String email, String address, String country, Date birthDate, Role role, String password){
this.lastName = lastName;
this.firstName = firstName;
this.email = email;
this.adress = adress;
this.address = address;
this.country = country;
this.birthDate = birthDate;
this.role = role;
this.password = password;
this.salt = salt;
}
public User() {}
@ -64,12 +62,12 @@ public class User {
this.email = email;
}
public String getAdress() {
return adress;
public String getAddress() {
return address;
}
public void setAdress(String adress) {
this.adress = adress;
public void setAddress(String adress) {
this.address = adress;
}
public String getCountry() {
@ -102,12 +100,4 @@ public class User {
public void setPassword(String password) {
this.password = password;
}
public String getSalt(){
return salt;
}
public void setSalt(String salt) {
this.salt = salt;
}
}

View File

@ -3,12 +3,11 @@ package ovh.herisson.Clyde.Tables;
import jakarta.persistence.*;
@Entity
@Table(name = "User_Cursus")
public class UserCursus {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@JoinColumn(name = "User")
@JoinColumn(name = "Users")
private int regNo;
@JoinColumn(name = "Cursus")