package metier;

import jakarta.persistence.*;

import java.util.List;

@Entity
public class Utilisateur{
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;
    private String name;

    @ManyToMany
    private Session session;

    @Column(unique=true)
    private String email;
    private String password;

    @OneToMany(mappedBy = "utilisateur")
    private List<Quizz> activities;

    public Utilisateur() {}

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Session getSession() {
        return session;
    }
}