ajout attribut estvalid sur reponse

Springboot
Victor SOULIER 1 year ago
parent e031a2f4d8
commit 30e9e33814

@ -18,6 +18,8 @@ public class Reponse{
private String reponse; private String reponse;
private Boolean estValide;
@JsonBackReference @JsonBackReference
@ManyToOne @ManyToOne
@JoinColumn(name = "idquestion", nullable = false) @JoinColumn(name = "idquestion", nullable = false)

@ -69,6 +69,7 @@ CREATE TABLE Question(
CREATE TABLE Reponse( CREATE TABLE Reponse(
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
reponse varchar(255) NOT NULL, reponse varchar(255) NOT NULL,
estValide boolean NOT NULL,
idQuestion integer REFERENCES Question(id), idQuestion integer REFERENCES Question(id),
idScientifique integer REFERENCES Scientifique(id) idScientifique integer REFERENCES Scientifique(id)
); );
@ -214,11 +215,15 @@ INSERT INTO Indice (libelle, idscientifique) VALUES
('S''appelle Marie', 1); ('S''appelle Marie', 1);
-- Réponses -- Réponses
INSERT INTO Reponse(reponse, idQuestion, idScientifique) INSERT INTO Reponse(reponse, estValide, idQuestion, idScientifique)
VALUES VALUES
('Marie Curie', 1, 1), ('Marie Curie', true, 1, 1),
('Albert Einstein', 2, 2), ('Albert Einstein', false, 1, 2),
('Sophie Germain', 3, 3);
('Marie Curie',true, 2, 1),
('Albert Einstein',false, 2, 2),
('Sophie Germain', true, 3, 3);
-- Partie -- Partie

Loading…
Cancel
Save