1 | <?php |
||
22 | class TaskEntity |
||
23 | { |
||
24 | /** |
||
25 | * The default priority. |
||
26 | */ |
||
27 | const DEFAULT_PRIORITY = 1; |
||
28 | |||
29 | /** |
||
30 | * The ID. |
||
31 | * |
||
32 | * @var string |
||
33 | * |
||
34 | * @ORM\Id |
||
35 | * @ORM\GeneratedValue(strategy="UUID") |
||
36 | * @ORM\Column(type="guid") |
||
37 | **/ |
||
38 | private $id; |
||
39 | |||
40 | /** |
||
41 | * The priority. |
||
42 | * |
||
43 | * @var int |
||
44 | * |
||
45 | * @ORM\Column(type="integer") |
||
46 | */ |
||
47 | private $priority; |
||
48 | |||
49 | /** |
||
50 | * The commandline. |
||
51 | * |
||
52 | * @var string |
||
53 | * |
||
54 | * @ORM\Column(type="string") |
||
55 | **/ |
||
56 | private $commandline; |
||
57 | |||
58 | /** |
||
59 | * The PID. |
||
60 | * |
||
61 | * @var int |
||
62 | * |
||
63 | * @ORM\Column(type="integer", nullable=true) |
||
64 | **/ |
||
65 | private $pid; |
||
66 | |||
67 | /** |
||
68 | * The exit code. |
||
69 | * |
||
70 | * @var int |
||
71 | * |
||
72 | * @ORM\Column(type="integer", nullable=true) |
||
73 | */ |
||
74 | private $exitCode; |
||
75 | |||
76 | /** |
||
77 | * The timestamp when the task was created. |
||
78 | * |
||
79 | * @var \DateTime $createdAt |
||
80 | * |
||
81 | * @Gedmo\Timestampable(on="create") |
||
82 | * @ORM\Column(type="datetime") |
||
83 | */ |
||
84 | private $createdAt; |
||
85 | |||
86 | /** |
||
87 | * The timestamp when the task was updated. |
||
88 | * |
||
89 | * @var \DateTime $updatedAt |
||
90 | * |
||
91 | * @Gedmo\Timestampable(on="update") |
||
92 | * @ORM\Column(type="datetime") |
||
93 | */ |
||
94 | private $updatedAt; |
||
95 | |||
96 | /** |
||
97 | * Get ID. |
||
98 | * |
||
99 | * @return string |
||
100 | */ |
||
101 | 2 | public function getId() |
|
105 | |||
106 | /** |
||
107 | * Get priority. |
||
108 | * |
||
109 | * @return int |
||
110 | */ |
||
111 | 2 | public function getPriority() |
|
115 | |||
116 | /** |
||
117 | * Set priority. |
||
118 | * |
||
119 | * @param int $priority |
||
120 | * |
||
121 | * @return $this |
||
122 | */ |
||
123 | 2 | public function setPriority($priority) |
|
128 | |||
129 | /** |
||
130 | * Get commandline. |
||
131 | * |
||
132 | * @return string |
||
133 | */ |
||
134 | 2 | public function getCommandline() |
|
138 | |||
139 | /** |
||
140 | * Set commandline. |
||
141 | * |
||
142 | * @param string $commandline |
||
143 | * |
||
144 | * @return $this |
||
145 | */ |
||
146 | 2 | public function setCommandline($commandline) |
|
151 | |||
152 | /** |
||
153 | * Get PID. |
||
154 | * |
||
155 | * @return int |
||
156 | */ |
||
157 | 2 | public function getPid() |
|
161 | |||
162 | /** |
||
163 | * Set PID. |
||
164 | * |
||
165 | * @param int $pid |
||
166 | * |
||
167 | * @return $this |
||
168 | */ |
||
169 | 2 | public function setPid($pid) |
|
174 | |||
175 | /** |
||
176 | * Get exit code. |
||
177 | * |
||
178 | * @return int |
||
179 | */ |
||
180 | 2 | public function getExitCode() |
|
184 | |||
185 | /** |
||
186 | * Set exit code. |
||
187 | * |
||
188 | * @param int $exitCode |
||
189 | * |
||
190 | * @return $this |
||
191 | */ |
||
192 | 2 | public function setExitCode($exitCode) |
|
197 | |||
198 | /** |
||
199 | * Get timestamp when the task was created. |
||
200 | * |
||
201 | * @return \DateTime |
||
202 | */ |
||
203 | 2 | public function getCreatedAt() |
|
207 | |||
208 | /** |
||
209 | * Set timestamp when the task was created. |
||
210 | * |
||
211 | * @param \DateTime $createdAt |
||
212 | * |
||
213 | * @return $this |
||
214 | */ |
||
215 | 2 | public function setCreatedAt(\DateTime $createdAt) |
|
220 | |||
221 | /** |
||
222 | * Get timestamp when the task was updated. |
||
223 | * |
||
224 | * @return \DateTime |
||
225 | */ |
||
226 | 2 | public function getUpdatedAt() |
|
230 | |||
231 | /** |
||
232 | * Set timestamp when the task was updated. |
||
233 | * |
||
234 | * @param \DateTime $updatedAt |
||
235 | * |
||
236 | * @return $this |
||
237 | */ |
||
238 | 2 | public function setUpdatedAt(\DateTime $updatedAt) |
|
243 | } |
||
244 |