Commit 271dad37 authored by Alexandre Ducarne's avatar Alexandre Ducarne

Add new DB relation on vote

parent 1273d6bb
...@@ -56,7 +56,7 @@ public class VoteController { ...@@ -56,7 +56,7 @@ public class VoteController {
case NEUTRAL: case NEUTRAL:
p.setScoreNeutral(p.getScoreNeutral() + 1); p.setScoreNeutral(p.getScoreNeutral() + 1);
break; break;
case NO: case AGAINST:
p.setScoreAgainst(p.getScoreAgainst() + 1); p.setScoreAgainst(p.getScoreAgainst() + 1);
break; break;
} }
......
...@@ -23,5 +23,8 @@ public class Vote { ...@@ -23,5 +23,8 @@ public class Vote {
@Enumerated(EnumType.STRING) @Enumerated(EnumType.STRING)
ChoiceEnum choice; ChoiceEnum choice;
@ManyToOne
User user;
String comment; String comment;
} }
...@@ -4,5 +4,5 @@ public enum ChoiceEnum { ...@@ -4,5 +4,5 @@ public enum ChoiceEnum {
FOR, FOR,
FOR_BUT, FOR_BUT,
NEUTRAL, NEUTRAL,
NO AGAINST
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment