package metier;

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

import jakarta.persistence.*;

@Entity
@Inheritance(strategy=InheritanceType.JOINED)
@DiscriminatorColumn(name="Type_reponse")
@DiscriminatorValue("Reponse")
public abstract class Reponse implements Serializable {
    private int id;
    private Question question;
    public ArrayList<String> reponses;

    public Reponse(){}

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public int getId() {
        return id;
    }

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

    @OneToOne
    public Question getQuestion(){
        return this.question;
    }

    public void setQuestion(Question question){
        this.question=question;
    }

    public ArrayList<String> getReponses(){
        return this.reponses;
    }

    public void setReponses(ArrayList<String> reponses){
        this.reponses=reponses;
    }
}