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 SurveyQuestion |
||
29 | * @Assert\Type("object") |
||
30 | * @Assert\Valid |
||
31 | * @ORM\ManyToOne(targetEntity="SurveyQuestion", inversedBy="answers") |
||
32 | * @ORM\JoinColumn(onDelete="CASCADE") |
||
33 | */ |
||
34 | private $question; |
||
35 | |||
36 | /** |
||
37 | * @var Survey |
||
38 | * @Assert\Type("object") |
||
39 | * @Assert\Valid |
||
40 | * @ORM\ManyToOne(targetEntity="Survey", inversedBy="answers") |
||
41 | * @ORM\JoinColumn(onDelete="CASCADE") |
||
42 | */ |
||
43 | private $survey; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | * @Assert\NotBlank() |
||
48 | * @Assert\Type("string") |
||
49 | * @Assert\Length( |
||
50 | * max = 1000 |
||
51 | * ) |
||
52 | * @ORM\Column(name="body", type="text") |
||
53 | */ |
||
54 | private $content; |
||
55 | |||
56 | /** |
||
57 | * Get id. |
||
58 | * |
||
59 | * @return int |
||
60 | */ |
||
61 | public function getId() |
||
65 | |||
66 | /** |
||
67 | * Set survey question. |
||
68 | * |
||
69 | * @param SurveyQuestion $question |
||
70 | * |
||
71 | * @return SurveyAnswer |
||
72 | */ |
||
73 | 1 | public function setQuestion(SurveyQuestion $question) |
|
79 | |||
80 | /** |
||
81 | * Get survey question. |
||
82 | * |
||
83 | * @return SurveyQuestion |
||
84 | */ |
||
85 | 3 | public function getQuestion() |
|
89 | |||
90 | /** |
||
91 | * Set survey. |
||
92 | * |
||
93 | * @param Survey $survey |
||
94 | * |
||
95 | * @return SurveyAnswer |
||
96 | */ |
||
97 | 1 | public function setSurvey(Survey $survey) |
|
103 | |||
104 | /** |
||
105 | * Get survey. |
||
106 | * |
||
107 | * @return Survey |
||
108 | */ |
||
109 | public function getSurvey() |
||
113 | |||
114 | /** |
||
115 | * Set content. |
||
116 | * |
||
117 | * @param string $content |
||
118 | * |
||
119 | * @return SurveyAnswer |
||
120 | */ |
||
121 | 1 | public function setContent($content) |
|
127 | |||
128 | /** |
||
129 | * Get content. |
||
130 | * |
||
131 | * @return string |
||
132 | */ |
||
133 | 2 | public function getContent() |
|
137 | } |
||
138 |