| 1 | <?php |
||
| 15 | class PollType |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var int |
||
| 19 | * |
||
| 20 | * @ORM\Column(name="id", type="integer") |
||
| 21 | * @ORM\Id |
||
| 22 | * @ORM\GeneratedValue(strategy="AUTO") |
||
| 23 | */ |
||
| 24 | private $id; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | * |
||
| 29 | * @ORM\Column(name="name", type="string", length=255, unique=true) |
||
| 30 | */ |
||
| 31 | private $name; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @ORM\OneToMany(targetEntity="Poll", mappedBy="pollType") |
||
| 35 | */ |
||
| 36 | private $polls; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Constructor |
||
| 40 | */ |
||
| 41 | public function __construct() |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Get id |
||
| 48 | * |
||
| 49 | * @return int |
||
| 50 | */ |
||
| 51 | public function getId(): int |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Set name |
||
| 58 | * |
||
| 59 | * @param string $name |
||
| 60 | * |
||
| 61 | * @return PollType |
||
| 62 | */ |
||
| 63 | public function setName(string $name) |
||
| 69 | |||
| 70 | /** |
||
| 71 | * Get name |
||
| 72 | * |
||
| 73 | * @return string |
||
| 74 | */ |
||
| 75 | public function getName(): string |
||
| 79 | |||
| 80 | /** |
||
| 81 | * Add poll |
||
| 82 | * |
||
| 83 | * @param \AppBundle\Entity\Poll $poll |
||
| 84 | * |
||
| 85 | * @return PollType |
||
| 86 | */ |
||
| 87 | public function addPoll(Poll $poll) |
||
| 93 | |||
| 94 | /** |
||
| 95 | * Remove poll |
||
| 96 | * |
||
| 97 | * @param \AppBundle\Entity\Poll $poll |
||
| 98 | */ |
||
| 99 | public function removePoll(Poll $poll) |
||
| 103 | |||
| 104 | /** |
||
| 105 | * Get polls |
||
| 106 | * |
||
| 107 | * @return \Doctrine\Common\Collections\Collection |
||
| 108 | */ |
||
| 109 | public function getPolls() |
||
| 113 | } |
||
| 114 |