1 | <?php |
||
14 | class SurveyAnswer |
||
15 | { |
||
16 | use ORMBehaviors\Timestampable\Timestampable; |
||
17 | |||
18 | /** |
||
19 | * @var int |
||
20 | * |
||
21 | * @ORM\Column(type="integer") |
||
22 | * @ORM\Id |
||
23 | * @ORM\GeneratedValue(strategy="AUTO") |
||
24 | */ |
||
25 | private $id; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | * @Assert\NotBlank() |
||
30 | * @Assert\Type("string") |
||
31 | * @ORM\Column(type="string") |
||
32 | */ |
||
33 | private $type; |
||
34 | |||
35 | /** |
||
36 | * @var SurveyQuestion |
||
37 | * @Assert\Type("object") |
||
38 | * @Assert\Valid |
||
39 | * @ORM\ManyToOne(targetEntity="SurveyQuestion", inversedBy="answers") |
||
40 | */ |
||
41 | private $question; |
||
42 | |||
43 | /** |
||
44 | * @var User |
||
45 | * @Assert\Type("object") |
||
46 | * @Assert\Valid |
||
47 | * @ORM\ManyToOne(targetEntity="User", inversedBy="answers") |
||
48 | */ |
||
49 | private $user; |
||
50 | |||
51 | /** |
||
52 | * @var Survey |
||
53 | * @Assert\Type("object") |
||
54 | * @Assert\Valid |
||
55 | * @ORM\ManyToOne(targetEntity="Survey", inversedBy="answers") |
||
56 | */ |
||
57 | private $survey; |
||
58 | |||
59 | /** |
||
60 | * @var string |
||
61 | * @Assert\NotBlank() |
||
62 | * @Assert\Type("string") |
||
63 | * @Assert\Length( |
||
64 | * max = 1000 |
||
65 | * ) |
||
66 | * @ORM\Column(name="body", type="text") |
||
67 | */ |
||
68 | private $content; |
||
69 | |||
70 | /** |
||
71 | * Get id. |
||
72 | * |
||
73 | * @return int |
||
74 | */ |
||
75 | public function getId() |
||
79 | |||
80 | /** |
||
81 | * Set type. |
||
82 | * |
||
83 | * @param string $type |
||
84 | * |
||
85 | * @return SurveyAnswer |
||
86 | */ |
||
87 | public function setType($type) |
||
93 | |||
94 | /** |
||
95 | * Get type. |
||
96 | * |
||
97 | * @return string |
||
98 | */ |
||
99 | public function getType() |
||
103 | |||
104 | /** |
||
105 | * Set survey question. |
||
106 | * |
||
107 | * @param SurveyQuestion $question |
||
108 | * |
||
109 | * @return SurveyAnswer |
||
110 | */ |
||
111 | public function setQuestion(SurveyQuestion $question) |
||
117 | |||
118 | /** |
||
119 | * Get survey question. |
||
120 | * |
||
121 | * @return SurveyQuestion |
||
122 | */ |
||
123 | public function getQuestion() |
||
127 | |||
128 | /** |
||
129 | * Set user. |
||
130 | * |
||
131 | * @param User $user |
||
132 | * |
||
133 | * @return SurveyAnswer |
||
134 | */ |
||
135 | public function setUser(User $user) |
||
141 | |||
142 | /** |
||
143 | * Get user. |
||
144 | * |
||
145 | * @return User |
||
146 | */ |
||
147 | public function getUser() |
||
151 | |||
152 | /** |
||
153 | * Set survey. |
||
154 | * |
||
155 | * @param Survey $survey |
||
156 | * |
||
157 | * @return SurveyAnswer |
||
158 | */ |
||
159 | public function setSurvey(Survey $survey) |
||
165 | |||
166 | /** |
||
167 | * Get survey. |
||
168 | * |
||
169 | * @return Survey |
||
170 | */ |
||
171 | public function getSurvey() |
||
175 | |||
176 | /** |
||
177 | * Set content. |
||
178 | * |
||
179 | * @param string $content |
||
180 | * |
||
181 | * @return SurveyAnswer |
||
182 | */ |
||
183 | public function setContent($content) |
||
189 | |||
190 | /** |
||
191 | * Get content. |
||
192 | * |
||
193 | * @return string |
||
194 | */ |
||
195 | public function getContent() |
||
199 | } |
||
200 |