add utilisateur
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
package metier;
|
||||
|
||||
public abstract class Activity {
|
||||
|
||||
private long id_utilisateur_created;
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ import jakarta.persistence.Id;
|
||||
|
||||
public abstract class Reponse {
|
||||
@Id
|
||||
int id;
|
||||
String value;
|
||||
Boolean correct;
|
||||
private int id;
|
||||
private String value;
|
||||
private Boolean correct;
|
||||
|
||||
public Reponse(){
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@ import jakarta.persistence.OneToMany;
|
||||
public class Session {
|
||||
|
||||
@Id
|
||||
protected int codePIN;
|
||||
private int codePIN;
|
||||
|
||||
@OneToMany
|
||||
ArrayList<Activity> activities;
|
||||
private ArrayList<Activity> activities;
|
||||
|
||||
public Session(){
|
||||
}
|
||||
|
||||
@@ -2,15 +2,27 @@ package metier;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
public class Utilisateur{
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
private String name;
|
||||
|
||||
@ManyToMany
|
||||
private Session session;
|
||||
|
||||
@Column(unique=true)
|
||||
private String email;
|
||||
private String password;
|
||||
|
||||
@OneToMany(mappedBy = "utilisateur")
|
||||
private List<Activity> activities;
|
||||
|
||||
public Utilisateur() {}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user