package metier;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Entity
@Getter
@Setter
@NoArgsConstructor
public class Session implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;

    @Column(unique=true)
    private int codePIN;
    @OneToMany(mappedBy="session")
    private List<Quizz> quizzs = new ArrayList<>();

    @ManyToMany(mappedBy = "session")
    private List<Utilisateur> utilisateurs = new ArrayList<>();
    private String theme;
}