package metier;

import jakarta.persistence.*;

import java.io.Serializable;

@Entity
public class Question implements Serializable {
    private int id;
    private Reponse reponse;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }

    @OneToOne(cascade = CascadeType.ALL)
    @JoinColumn(name ="bonne_reponse", referencedColumnName = "id")
    public Reponse getReponse() {
        return reponse;
    }

    public void setReponse(Reponse reponse) {
        this.reponse = reponse;
    }

}
