1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the zibios/wrike-php-jmsserializer package. |
5
|
|
|
* |
6
|
|
|
* (c) Zbigniew Ślązak |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace Zibios\WrikePhpJmsserializer\Model\Timelog; |
13
|
|
|
|
14
|
|
|
use Zibios\WrikePhpJmsserializer\Model\ResourceModelInterface; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Timelog Resource Model. |
18
|
|
|
*/ |
19
|
|
|
class TimelogResourceModel implements ResourceModelInterface |
20
|
|
|
{ |
21
|
|
|
/** |
22
|
|
|
* Timelog Entry ID. |
23
|
|
|
* |
24
|
|
|
* Timelog: Timelog Entry ID |
25
|
|
|
* |
26
|
|
|
* @SA\Type("string") |
27
|
|
|
* @SA\SerializedName("id") |
28
|
|
|
* |
29
|
|
|
* @var string|null |
30
|
|
|
*/ |
31
|
|
|
protected $id; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* Task to which timelog record is tracked. |
35
|
|
|
* |
36
|
|
|
* Timelog: Task ID |
37
|
|
|
* |
38
|
|
|
* @SA\Type("string") |
39
|
|
|
* @SA\SerializedName("taskId") |
40
|
|
|
* |
41
|
|
|
* @var string|null |
42
|
|
|
*/ |
43
|
|
|
protected $taskId; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* User who tracked the timelog record. |
47
|
|
|
* |
48
|
|
|
* Timelog: Contact ID |
49
|
|
|
* |
50
|
|
|
* @SA\Type("string") |
51
|
|
|
* @SA\SerializedName("userId") |
52
|
|
|
* |
53
|
|
|
* @var string|null |
54
|
|
|
*/ |
55
|
|
|
protected $userId; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Hours tracked in timelog record, must be in [0..24] hours range. |
59
|
|
|
* |
60
|
|
|
* @SA\Type("float") |
61
|
|
|
* @SA\SerializedName("hours") |
62
|
|
|
* |
63
|
|
|
* @var float|null |
64
|
|
|
*/ |
65
|
|
|
protected $hours; |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* Date of timelog was created in user's timezone. |
69
|
|
|
* |
70
|
|
|
* Format: yyyy-MM-dd'T'HH:mm:ss'Z' |
71
|
|
|
* |
72
|
|
|
* @SA\Type("DateTime<'Y-m-d\TH:i:s\Z'>") |
73
|
|
|
* @SA\SerializedName("createdDate") |
74
|
|
|
* |
75
|
|
|
* @var \DateTime|null |
76
|
|
|
*/ |
77
|
|
|
protected $createdDate; |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* Date for which timelog was recorded. |
81
|
|
|
* |
82
|
|
|
* Format: yyyy-MM-dd |
83
|
|
|
* |
84
|
|
|
* @SA\Type("DateTime<'Y-m-d'>") |
85
|
|
|
* @SA\SerializedName("trackedDate") |
86
|
|
|
* |
87
|
|
|
* @var \DateTime|null |
88
|
|
|
*/ |
89
|
|
|
protected $trackedDate; |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* Timelog record comment. |
93
|
|
|
* |
94
|
|
|
* @SA\Type("string") |
95
|
|
|
* @SA\SerializedName("comment") |
96
|
|
|
* |
97
|
|
|
* @var string|null |
98
|
|
|
*/ |
99
|
|
|
protected $comment; |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @return null|string |
103
|
|
|
*/ |
104
|
1 |
|
public function getId() |
105
|
|
|
{ |
106
|
1 |
|
return $this->id; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* @param null|string $id |
111
|
|
|
* |
112
|
|
|
* @return $this |
113
|
|
|
*/ |
114
|
1 |
|
public function setId($id) |
115
|
|
|
{ |
116
|
1 |
|
$this->id = $id; |
117
|
|
|
|
118
|
1 |
|
return $this; |
119
|
|
|
} |
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* @return null|string |
123
|
|
|
*/ |
124
|
1 |
|
public function getTaskId() |
125
|
|
|
{ |
126
|
1 |
|
return $this->taskId; |
127
|
|
|
} |
128
|
|
|
|
129
|
|
|
/** |
130
|
|
|
* @param null|string $taskId |
131
|
|
|
* |
132
|
|
|
* @return $this |
133
|
|
|
*/ |
134
|
1 |
|
public function setTaskId($taskId) |
135
|
|
|
{ |
136
|
1 |
|
$this->taskId = $taskId; |
137
|
|
|
|
138
|
1 |
|
return $this; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
/** |
142
|
|
|
* @return null|string |
143
|
|
|
*/ |
144
|
1 |
|
public function getUserId() |
145
|
|
|
{ |
146
|
1 |
|
return $this->userId; |
147
|
|
|
} |
148
|
|
|
|
149
|
|
|
/** |
150
|
|
|
* @param null|string $userId |
151
|
|
|
* |
152
|
|
|
* @return $this |
153
|
|
|
*/ |
154
|
1 |
|
public function setUserId($userId) |
155
|
|
|
{ |
156
|
1 |
|
$this->userId = $userId; |
157
|
|
|
|
158
|
1 |
|
return $this; |
159
|
|
|
} |
160
|
|
|
|
161
|
|
|
/** |
162
|
|
|
* @return float|null |
163
|
|
|
*/ |
164
|
1 |
|
public function getHours() |
165
|
|
|
{ |
166
|
1 |
|
return $this->hours; |
167
|
|
|
} |
168
|
|
|
|
169
|
|
|
/** |
170
|
|
|
* @param float|null $hours |
171
|
|
|
* |
172
|
|
|
* @return $this |
173
|
|
|
*/ |
174
|
1 |
|
public function setHours($hours) |
175
|
|
|
{ |
176
|
1 |
|
$this->hours = $hours; |
177
|
|
|
|
178
|
1 |
|
return $this; |
179
|
|
|
} |
180
|
|
|
|
181
|
|
|
/** |
182
|
|
|
* @return \DateTime|null |
183
|
|
|
*/ |
184
|
1 |
|
public function getCreatedDate() |
185
|
|
|
{ |
186
|
1 |
|
return $this->createdDate; |
187
|
|
|
} |
188
|
|
|
|
189
|
|
|
/** |
190
|
|
|
* @param \DateTime|null $createdDate |
191
|
|
|
* |
192
|
|
|
* @return $this |
193
|
|
|
*/ |
194
|
1 |
|
public function setCreatedDate($createdDate) |
195
|
|
|
{ |
196
|
1 |
|
$this->createdDate = $createdDate; |
197
|
|
|
|
198
|
1 |
|
return $this; |
199
|
|
|
} |
200
|
|
|
|
201
|
|
|
/** |
202
|
|
|
* @return \DateTime|null |
203
|
|
|
*/ |
204
|
1 |
|
public function getTrackedDate() |
205
|
|
|
{ |
206
|
1 |
|
return $this->trackedDate; |
207
|
|
|
} |
208
|
|
|
|
209
|
|
|
/** |
210
|
|
|
* @param \DateTime|null $trackedDate |
211
|
|
|
* |
212
|
|
|
* @return $this |
213
|
|
|
*/ |
214
|
1 |
|
public function setTrackedDate($trackedDate) |
215
|
|
|
{ |
216
|
1 |
|
$this->trackedDate = $trackedDate; |
217
|
|
|
|
218
|
1 |
|
return $this; |
219
|
|
|
} |
220
|
|
|
|
221
|
|
|
/** |
222
|
|
|
* @return null|string |
223
|
|
|
*/ |
224
|
1 |
|
public function getComment() |
225
|
|
|
{ |
226
|
1 |
|
return $this->comment; |
227
|
|
|
} |
228
|
|
|
|
229
|
|
|
/** |
230
|
|
|
* @param null|string $comment |
231
|
|
|
* |
232
|
|
|
* @return $this |
233
|
|
|
*/ |
234
|
1 |
|
public function setComment($comment) |
235
|
|
|
{ |
236
|
1 |
|
$this->comment = $comment; |
237
|
|
|
|
238
|
1 |
|
return $this; |
239
|
|
|
} |
240
|
|
|
} |
241
|
|
|
|