1 | <?php |
||
13 | class Vote |
||
14 | { |
||
15 | /** |
||
16 | * @var int |
||
17 | * |
||
18 | * @ORM\Column(name="id", type="integer") |
||
19 | * @ORM\Id |
||
20 | * @ORM\GeneratedValue(strategy="AUTO") |
||
21 | */ |
||
22 | private $id; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | * |
||
27 | * @ORM\Column(name="weight", type="integer") |
||
28 | */ |
||
29 | private $weight; |
||
30 | |||
31 | /** |
||
32 | * @var \AppBundle\Entity\Poll |
||
33 | * |
||
34 | * @ORM\ManyToOne(targetEntity="Poll", inversedBy="votes") |
||
35 | * @ORM\JoinColumn(name="poll_id", referencedColumnName="id") |
||
36 | */ |
||
37 | private $poll; |
||
38 | |||
39 | /** |
||
40 | * @var \AppBundle\Entity\User |
||
41 | * |
||
42 | * @ORM\ManyToOne(targetEntity="User", inversedBy="votes") |
||
43 | * @ORM\JoinColumn(name="caster_id", referencedColumnName="id") |
||
44 | */ |
||
45 | private $caster; |
||
46 | |||
47 | /** |
||
48 | * @var \DateTime |
||
49 | * |
||
50 | * @ORM\Column(name="time", type="datetime") |
||
51 | */ |
||
52 | private $time; |
||
53 | |||
54 | /** |
||
55 | * @var \AppBundle\Entity\Choice |
||
56 | * |
||
57 | * @ORM\ManyToOne(targetEntity="Choice", inversedBy="votes") |
||
58 | * @ORM\JoinColumn(name="choice_id", referencedColumnName="id") |
||
59 | */ |
||
60 | private $choice; |
||
61 | |||
62 | /** |
||
63 | * Constructor |
||
64 | */ |
||
65 | public function __construct() |
||
70 | |||
71 | /** |
||
72 | * Get id. |
||
73 | * |
||
74 | * @return int |
||
75 | */ |
||
76 | public function getId(): int |
||
80 | |||
81 | /** |
||
82 | * Set time. |
||
83 | * |
||
84 | * @param \DateTime $time |
||
85 | * |
||
86 | * @return Vote |
||
87 | */ |
||
88 | public function setTime(\DateTime $time) |
||
94 | |||
95 | /** |
||
96 | * Get time. |
||
97 | * |
||
98 | * @return \DateTime |
||
99 | */ |
||
100 | public function getTime(): DateTime |
||
104 | |||
105 | /** |
||
106 | * Set poll. |
||
107 | * |
||
108 | * @param \AppBundle\Entity\Poll $poll |
||
109 | * |
||
110 | * @return Vote |
||
111 | */ |
||
112 | public function setPoll(\AppBundle\Entity\Poll $poll = null) |
||
118 | |||
119 | /** |
||
120 | * Get poll. |
||
121 | * |
||
122 | * @return \AppBundle\Entity\Poll |
||
123 | */ |
||
124 | public function getPoll(): AppBundle\Entity\Poll |
||
128 | |||
129 | /** |
||
130 | * Set caster. |
||
131 | * |
||
132 | * @param \AppBundle\Entity\User $caster |
||
133 | * |
||
134 | * @return Vote |
||
135 | */ |
||
136 | public function setCaster(\AppBundle\Entity\User $caster = null) |
||
142 | |||
143 | /** |
||
144 | * Get caster. |
||
145 | * |
||
146 | * @return \AppBundle\Entity\User |
||
147 | */ |
||
148 | public function getCaster(): AppBundle\Entity\User |
||
152 | |||
153 | /** |
||
154 | * Set choice. |
||
155 | * |
||
156 | * @param \AppBundle\Entity\Choice $choice |
||
157 | * |
||
158 | * @return Vote |
||
159 | */ |
||
160 | public function setChoice(\AppBundle\Entity\Choice $choice = null) |
||
166 | |||
167 | /** |
||
168 | * Get choice. |
||
169 | * |
||
170 | * @return \AppBundle\Entity\Choice |
||
171 | */ |
||
172 | public function getChoice(): AppBundle\Entity\Choice |
||
176 | |||
177 | /** |
||
178 | * Set weight |
||
179 | * |
||
180 | * @param integer $weight |
||
181 | * |
||
182 | * @return Vote |
||
183 | */ |
||
184 | public function setWeight($weight) |
||
190 | |||
191 | /** |
||
192 | * Get weight |
||
193 | * |
||
194 | * @return integer |
||
195 | */ |
||
196 | public function getWeight() |
||
200 | } |
||
201 |