|
|
@@ -1,4 +1,31 @@
|
|
1
|
1
|
package io.zipcoder.tc_spring_poll_application.domain;
|
|
2
|
2
|
|
|
|
3
|
+import javax.persistence.*;
|
|
|
4
|
+
|
|
|
5
|
+@Entity
|
|
3
|
6
|
public class Vote {
|
|
|
7
|
+ @Id
|
|
|
8
|
+ @GeneratedValue
|
|
|
9
|
+ @Column(name = "VOTE_ID")
|
|
|
10
|
+ Long id;
|
|
|
11
|
+
|
|
|
12
|
+ @ManyToMany
|
|
|
13
|
+ @JoinColumn(name = "OPTION_ID")
|
|
|
14
|
+ Option option;
|
|
|
15
|
+
|
|
|
16
|
+ public Long getId() {
|
|
|
17
|
+ return id;
|
|
|
18
|
+ }
|
|
|
19
|
+
|
|
|
20
|
+ public void setId(Long id) {
|
|
|
21
|
+ this.id = id;
|
|
|
22
|
+ }
|
|
|
23
|
+
|
|
|
24
|
+ public Option getOption() {
|
|
|
25
|
+ return option;
|
|
|
26
|
+ }
|
|
|
27
|
+
|
|
|
28
|
+ public void setOption(Option option) {
|
|
|
29
|
+ this.option = option;
|
|
|
30
|
+ }
|
|
4
|
31
|
}
|