1 | <?php |
||
14 | class Choice |
||
15 | { |
||
16 | /** |
||
17 | * @var int |
||
18 | * |
||
19 | * @ORM\Column(name="id", type="integer") |
||
20 | * @ORM\Id |
||
21 | * @ORM\GeneratedValue(strategy="AUTO") |
||
22 | */ |
||
23 | private $id; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | * |
||
28 | * @ORM\Column(name="choice_name", type="string", length=255) |
||
29 | */ |
||
30 | private $choiceName; |
||
31 | |||
32 | /** |
||
33 | * @ORM\OneToMany(targetEntity="Vote", mappedBy="choice") |
||
34 | */ |
||
35 | private $votes; |
||
36 | |||
37 | /** |
||
38 | * Constructor. |
||
39 | */ |
||
40 | public function __construct() |
||
44 | |||
45 | /** |
||
46 | * Get id. |
||
47 | * |
||
48 | * @return int |
||
49 | */ |
||
50 | public function getId(): int |
||
54 | |||
55 | /** |
||
56 | * Set choiceName. |
||
57 | * |
||
58 | * @param string $choiceName |
||
59 | * |
||
60 | * @return Choice |
||
61 | */ |
||
62 | public function setChoiceName(string $choiceName) |
||
68 | |||
69 | /** |
||
70 | * Get choiceName. |
||
71 | * |
||
72 | * @return string |
||
73 | */ |
||
74 | public function getChoiceName(): string |
||
78 | |||
79 | /** |
||
80 | * Add vote. |
||
81 | * |
||
82 | * @param \AppBundle\Entity\Vote $vote |
||
83 | * |
||
84 | * @return Choice |
||
85 | */ |
||
86 | public function addVote(\AppBundle\Entity\Vote $vote) |
||
92 | |||
93 | /** |
||
94 | * Remove vote. |
||
95 | * |
||
96 | * @param \AppBundle\Entity\Vote $vote |
||
97 | */ |
||
98 | public function removeVote(\AppBundle\Entity\Vote $vote) |
||
102 | |||
103 | /** |
||
104 | * Get votes. |
||
105 | * |
||
106 | * @return \Doctrine\Common\Collections\Collection |
||
107 | */ |
||
108 | public function getVotes() |
||
112 | } |
||
113 |