| 1 | <?php |
||
| 15 | class SurveyType |
||
| 16 | { |
||
| 17 | use ORMBehaviors\Timestampable\Timestampable; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var int |
||
| 21 | * |
||
| 22 | * @ORM\Column(type="integer") |
||
| 23 | * @ORM\Id |
||
| 24 | * @ORM\GeneratedValue(strategy="AUTO") |
||
| 25 | */ |
||
| 26 | private $id; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var string |
||
| 30 | * @Assert\NotBlank() |
||
| 31 | * @Assert\Type("string") |
||
| 32 | * @Assert\Length( |
||
| 33 | * min = 2, |
||
| 34 | * max = 190 |
||
| 35 | * ) |
||
| 36 | * @ORM\Column(type="string", length=190, unique=true) |
||
| 37 | */ |
||
| 38 | private $name; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @var ArrayCollection[Survey] |
||
| 42 | * @ORM\OneToMany(targetEntity="Survey", mappedBy="type") |
||
| 43 | */ |
||
| 44 | private $surveys; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @var ArrayCollection[SurveyQuestion] |
||
| 48 | * @ORM\OneToMany(targetEntity="SurveyQuestion", mappedBy="surveyType") |
||
| 49 | */ |
||
| 50 | private $questions; |
||
| 51 | |||
| 52 | public function __construct() |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Get id. |
||
| 60 | * |
||
| 61 | * @return int |
||
| 62 | */ |
||
| 63 | public function getId() |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Set name. |
||
| 70 | * |
||
| 71 | * @param string $name |
||
| 72 | * |
||
| 73 | * @return SurveyType |
||
| 74 | */ |
||
| 75 | public function setName($name) |
||
| 81 | |||
| 82 | /** |
||
| 83 | * Get name. |
||
| 84 | * |
||
| 85 | * @return string |
||
| 86 | */ |
||
| 87 | public function getName() |
||
| 91 | |||
| 92 | /** |
||
| 93 | * Get Surveys. |
||
| 94 | * |
||
| 95 | * @return ArrayCollection |
||
| 96 | */ |
||
| 97 | public function getSurveys() |
||
| 101 | |||
| 102 | /** |
||
| 103 | * Get Questions. |
||
| 104 | * |
||
| 105 | * @return ArrayCollection |
||
| 106 | */ |
||
| 107 | public function getQuestions() |
||
| 111 | } |
||
| 112 |