1 | <?php |
||
15 | class Task |
||
16 | { |
||
17 | const STATUS_NEW = 'new'; |
||
18 | const STATUS_COMPLETED = 'completed'; |
||
19 | const STATUS_IN_PROGRESS = 'in_progress'; |
||
20 | |||
21 | const PRIORITY_LOW = 1; |
||
22 | const PRIORITY_NORMAL = 2; |
||
23 | const PRIORITY_HIGH = 3; |
||
24 | |||
25 | /** |
||
26 | * @var int |
||
27 | * |
||
28 | * @ORM\Column(name="id", type="integer") |
||
29 | * @ORM\Id |
||
30 | * @ORM\GeneratedValue(strategy="AUTO") |
||
31 | */ |
||
32 | private $id; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | * |
||
37 | * @Assert\NotBlank() |
||
38 | * @ORM\Column(name="title", type="string", length=255) |
||
39 | */ |
||
40 | private $title; |
||
41 | |||
42 | /** |
||
43 | * @var \DateTime |
||
44 | * |
||
45 | * @ORM\Column(name="dateCreated", type="datetime") |
||
46 | */ |
||
47 | private $dateCreated; |
||
48 | |||
49 | /** |
||
50 | * @var \DateTime |
||
51 | * |
||
52 | * @ORM\Column(name="dateUpdated", type="datetime", nullable=true) |
||
53 | */ |
||
54 | private $dateUpdated; |
||
55 | |||
56 | /** |
||
57 | * @var string |
||
58 | * |
||
59 | * @Assert\NotBlank() |
||
60 | * @ORM\Column(name="description", type="text", nullable=true) |
||
61 | */ |
||
62 | private $description; |
||
63 | |||
64 | /** |
||
65 | * @var string |
||
66 | * |
||
67 | * @ORM\Column(name="status", type="string", length=20) |
||
68 | */ |
||
69 | private $status; |
||
70 | |||
71 | /** |
||
72 | * @var int |
||
73 | * |
||
74 | * @ORM\Column(name="priority", type="integer") |
||
75 | */ |
||
76 | private $priority; |
||
77 | |||
78 | public function __construct() |
||
84 | |||
85 | /** |
||
86 | * Get id |
||
87 | * |
||
88 | * @return int |
||
89 | */ |
||
90 | public function getId() |
||
91 | { |
||
92 | return $this->id; |
||
93 | } |
||
94 | |||
95 | /** |
||
96 | * Set title |
||
97 | * |
||
98 | * @param string $title |
||
99 | * |
||
100 | * @return Task |
||
101 | */ |
||
102 | public function setTitle($title) |
||
108 | |||
109 | /** |
||
110 | * Get title |
||
111 | * |
||
112 | * @return string |
||
113 | */ |
||
114 | public function getTitle() |
||
118 | |||
119 | /** |
||
120 | * Set dateCreated |
||
121 | * |
||
122 | * @param \DateTime $dateCreated |
||
123 | * |
||
124 | * @return Task |
||
125 | */ |
||
126 | public function setDateCreated($dateCreated) |
||
132 | |||
133 | /** |
||
134 | * Get dateCreated |
||
135 | * |
||
136 | * @return \DateTime |
||
137 | */ |
||
138 | public function getDateCreated() |
||
142 | |||
143 | /** |
||
144 | * Set dateUpdated |
||
145 | * |
||
146 | * @param \DateTime $dateUpdated |
||
147 | * |
||
148 | * @return Task |
||
149 | */ |
||
150 | public function setDateUpdated($dateUpdated) |
||
156 | |||
157 | /** |
||
158 | * Get dateUpdated |
||
159 | * |
||
160 | * @return \DateTime |
||
161 | */ |
||
162 | public function getDateUpdated() |
||
166 | |||
167 | /** |
||
168 | * Set description |
||
169 | * |
||
170 | * @param string $description |
||
171 | * |
||
172 | * @return Task |
||
173 | */ |
||
174 | public function setDescription($description) |
||
180 | |||
181 | /** |
||
182 | * Get description |
||
183 | * |
||
184 | * @return string |
||
185 | */ |
||
186 | public function getDescription() |
||
190 | |||
191 | /** |
||
192 | * Set status |
||
193 | * |
||
194 | * @param string $status |
||
195 | * |
||
196 | * @return Task |
||
197 | */ |
||
198 | public function setStatus($status) |
||
199 | { |
||
200 | $this->status = $status; |
||
201 | |||
202 | return $this; |
||
203 | } |
||
204 | |||
205 | /** |
||
206 | * Get status |
||
207 | * |
||
208 | * @return string |
||
209 | */ |
||
210 | public function getStatus() |
||
211 | { |
||
212 | return $this->status; |
||
213 | } |
||
214 | |||
215 | /** |
||
216 | * Set priority |
||
217 | * |
||
218 | * @param integer $priority |
||
219 | * |
||
220 | * @return Task |
||
221 | */ |
||
222 | public function setPriority($priority) |
||
228 | |||
229 | /** |
||
230 | * Get priority |
||
231 | * |
||
232 | * @return int |
||
233 | */ |
||
234 | public function getPriority() |
||
238 | } |
||
239 |