1 | <?php |
||
33 | class Comment extends Entity |
||
34 | { |
||
35 | /** |
||
36 | * @var integer |
||
37 | * |
||
38 | * @ORM\Column(name="id", type="integer") |
||
39 | * @ORM\Id |
||
40 | * @ORM\GeneratedValue(strategy="AUTO") |
||
41 | */ |
||
42 | private $id; |
||
43 | |||
44 | /** |
||
45 | * @var string |
||
46 | * |
||
47 | * @ORM\Column(name="author", type="string", length=255) |
||
48 | */ |
||
49 | private $author; |
||
50 | |||
51 | /** |
||
52 | * @var string |
||
53 | * |
||
54 | * @ORM\Column(name="content", type="string", length=5000) |
||
55 | * @Assert\NotBlank() |
||
56 | */ |
||
57 | private $content; |
||
58 | |||
59 | /** |
||
60 | * @var \DateTime |
||
61 | * |
||
62 | * @ORM\Column(name="datetime", type="datetime") |
||
63 | */ |
||
64 | private $datetime; |
||
65 | |||
66 | /** |
||
67 | * @ORM\ManyToOne(targetEntity="Poll", inversedBy="comments") |
||
68 | */ |
||
69 | private $poll; |
||
70 | |||
71 | /** |
||
72 | * Get id |
||
73 | * |
||
74 | * @return integer |
||
75 | */ |
||
76 | public function getId() |
||
80 | |||
81 | /** |
||
82 | * Set author |
||
83 | * |
||
84 | * @param string $author |
||
85 | * @return Comment |
||
86 | */ |
||
87 | public function setAuthor($author) |
||
93 | |||
94 | /** |
||
95 | * Get author |
||
96 | * |
||
97 | * @return string |
||
98 | */ |
||
99 | public function getAuthor() |
||
103 | |||
104 | /** |
||
105 | * Set content |
||
106 | * |
||
107 | * @param string $content |
||
108 | * @return Comment |
||
109 | */ |
||
110 | public function setContent($content) |
||
116 | |||
117 | /** |
||
118 | * Get content |
||
119 | * |
||
120 | * @return string |
||
121 | */ |
||
122 | public function getContent() |
||
126 | |||
127 | /** |
||
128 | * Set datetime |
||
129 | * |
||
130 | * @param \DateTime $datetime |
||
131 | * @return Comment |
||
132 | */ |
||
133 | public function setDatetime($datetime) |
||
139 | |||
140 | /** |
||
141 | * Get datetime |
||
142 | * |
||
143 | * @return \DateTime |
||
144 | */ |
||
145 | public function getDatetime() |
||
149 | |||
150 | /** |
||
151 | * Set poll |
||
152 | * |
||
153 | * @param Poll $poll |
||
154 | * @return Comment |
||
155 | */ |
||
156 | public function setPoll(Poll $poll = null) |
||
162 | |||
163 | /** |
||
164 | * Get poll |
||
165 | * |
||
166 | * @return Poll |
||
167 | */ |
||
168 | public function getPoll() |
||
172 | } |
||
173 |