Files
lionsdev-client-impl-quarkus/src/main/java/dev/lions/audit/AuditQuestion.java

87 lines
2.8 KiB
Java

package dev.lions.audit;
import jakarta.persistence.*;
import java.util.List;
/**
* Question d'audit pour évaluer la maturité digitale des PME
*/
@Entity
@Table(name = "audit_questions")
public class AuditQuestion {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false)
private String category; // "commercial", "stock", "comptabilite", "rh", "infrastructure"
@Column(nullable = false, length = 500)
private String question;
@Column(name = "question_en", length = 500)
private String questionEn; // Version anglaise
@ElementCollection
@CollectionTable(name = "audit_question_options")
private List<String> options;
@ElementCollection
@CollectionTable(name = "audit_question_scores")
private List<Integer> scores; // Score pour chaque option
@Column(nullable = false)
private Integer weight = 1; // Poids de la question
@Column(length = 1000)
private String recommendation; // Recommandation selon la réponse
@Column(nullable = false)
private Boolean active = true;
@Column(name = "display_order")
private Integer displayOrder;
// Constructeurs
public AuditQuestion() {}
public AuditQuestion(String category, String question, List<String> options, List<Integer> scores) {
this.category = category;
this.question = question;
this.options = options;
this.scores = scores;
}
// Getters et Setters
public Long getId() { return id; }
public void setId(Long id) { this.id = id; }
public String getCategory() { return category; }
public void setCategory(String category) { this.category = category; }
public String getQuestion() { return question; }
public void setQuestion(String question) { this.question = question; }
public String getQuestionEn() { return questionEn; }
public void setQuestionEn(String questionEn) { this.questionEn = questionEn; }
public List<String> getOptions() { return options; }
public void setOptions(List<String> options) { this.options = options; }
public List<Integer> getScores() { return scores; }
public void setScores(List<Integer> scores) { this.scores = scores; }
public Integer getWeight() { return weight; }
public void setWeight(Integer weight) { this.weight = weight; }
public String getRecommendation() { return recommendation; }
public void setRecommendation(String recommendation) { this.recommendation = recommendation; }
public Boolean getActive() { return active; }
public void setActive(Boolean active) { this.active = active; }
public Integer getDisplayOrder() { return displayOrder; }
public void setDisplayOrder(Integer displayOrder) { this.displayOrder = displayOrder; }
}