1 | <?php |
||
16 | class SurveyType |
||
17 | { |
||
18 | use ORMBehaviors\Timestampable\Timestampable; |
||
19 | |||
20 | /** |
||
21 | * @var int |
||
22 | * |
||
23 | * @ORM\Column(type="integer") |
||
24 | * @ORM\Id |
||
25 | * @ORM\GeneratedValue(strategy="AUTO") |
||
26 | */ |
||
27 | private $id; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | * @Assert\NotBlank() |
||
32 | * @Assert\Type("string") |
||
33 | * @Assert\Length( |
||
34 | * min = 2, |
||
35 | * max = 190 |
||
36 | * ) |
||
37 | * @ORM\Column(type="string", length=190, unique=true) |
||
38 | * @Groups({"group1"}) |
||
39 | */ |
||
40 | private $name; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | * @Assert\NotBlank() |
||
45 | * @Assert\Type("string") |
||
46 | * @Assert\Length( |
||
47 | * min = 2, |
||
48 | * max = 500 |
||
49 | * ) |
||
50 | * @ORM\Column(type="string", length=500, nullable=true) |
||
51 | * @Groups({"group2"}) |
||
52 | */ |
||
53 | private $description; |
||
54 | |||
55 | /** |
||
56 | * @var ArrayCollection[SurveyTypeSection] |
||
57 | * @ORM\OneToMany(targetEntity="SurveyTypeSection", mappedBy="surveyType", cascade={"persist", "remove"}) |
||
58 | * @Groups({"group2"}) |
||
59 | */ |
||
60 | private $sections; |
||
61 | |||
62 | /** |
||
63 | * @var ArrayCollection[Survey] |
||
64 | * @ORM\OneToMany(targetEntity="Survey", mappedBy="type", cascade={"persist", "remove"}) |
||
65 | */ |
||
66 | private $surveys; |
||
67 | |||
68 | public function __construct() |
||
73 | |||
74 | /** |
||
75 | * Get id. |
||
76 | * |
||
77 | * @return int |
||
78 | */ |
||
79 | public function getId() |
||
83 | |||
84 | /** |
||
85 | * Set name. |
||
86 | * |
||
87 | * @param string $name |
||
88 | * |
||
89 | * @return SurveyType |
||
90 | */ |
||
91 | public function setName($name) |
||
97 | |||
98 | /** |
||
99 | * Get name. |
||
100 | * |
||
101 | * @return string |
||
102 | */ |
||
103 | 6 | public function getName() |
|
107 | |||
108 | /** |
||
109 | * Set description. |
||
110 | * |
||
111 | * @param string $description |
||
112 | * |
||
113 | * @return SurveyType |
||
114 | */ |
||
115 | public function setDescription($description) |
||
121 | |||
122 | /** |
||
123 | * Get description. |
||
124 | * |
||
125 | * @return string |
||
126 | */ |
||
127 | 3 | public function getDescription() |
|
131 | |||
132 | /** |
||
133 | * Get SurveysTypeSection. |
||
134 | * |
||
135 | * @return ArrayCollection |
||
136 | */ |
||
137 | 4 | public function getSections() |
|
141 | |||
142 | /** |
||
143 | * Get Surveys. |
||
144 | * |
||
145 | * @return ArrayCollection |
||
146 | */ |
||
147 | public function getSurveys() |
||
151 | } |
||
152 |