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\Common; |
13
|
|
|
|
14
|
|
|
use JMS\Serializer\Annotation as SA; |
15
|
|
|
use Zibios\WrikePhpJmsserializer\Model\ResourceModelInterface; |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* Project Model. |
19
|
|
|
*/ |
20
|
|
|
class ProjectModel implements ResourceModelInterface |
21
|
|
|
{ |
22
|
|
|
/** |
23
|
|
|
* ID of user who created project. |
24
|
|
|
* |
25
|
|
|
* Comment: Contact ID |
26
|
|
|
* |
27
|
|
|
* @SA\Type("string") |
28
|
|
|
* @SA\SerializedName("authorId") |
29
|
|
|
* |
30
|
|
|
* @var string|null |
31
|
|
|
*/ |
32
|
|
|
protected $authorId; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* List of project owner IDs. |
36
|
|
|
* |
37
|
|
|
* Comment: Contact ID list |
38
|
|
|
* |
39
|
|
|
* @SA\Type("array<string>") |
40
|
|
|
* @SA\SerializedName("ownerIds") |
41
|
|
|
* |
42
|
|
|
* @var array|string[]|null |
43
|
|
|
*/ |
44
|
|
|
protected $ownerIds; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* Project status. |
48
|
|
|
* |
49
|
|
|
* Enum: Green, Yellow, Red, Completed, OnHold, Cancelled |
50
|
|
|
* |
51
|
|
|
* @see \Zibios\WrikePhpLibrary\Enum\ProjectStatusEnum |
52
|
|
|
* |
53
|
|
|
* @SA\Type("string") |
54
|
|
|
* @SA\SerializedName("status") |
55
|
|
|
* |
56
|
|
|
* @var string|null |
57
|
|
|
*/ |
58
|
|
|
protected $status; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* Project start date. |
62
|
|
|
* |
63
|
|
|
* Format: yyyy-MM-dd |
64
|
|
|
* Comment: Optional |
65
|
|
|
* |
66
|
|
|
* @SA\Type("DateTime<'Y-m-d'>") |
67
|
|
|
* @SA\SerializedName("startDate") |
68
|
|
|
* |
69
|
|
|
* @var \DateTime|null |
70
|
|
|
*/ |
71
|
|
|
protected $startDate; |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* Project end date. |
75
|
|
|
* |
76
|
|
|
* Format: yyyy-MM-dd |
77
|
|
|
* Comment: Optional |
78
|
|
|
* |
79
|
|
|
* @SA\Type("DateTime<'Y-m-d'>") |
80
|
|
|
* @SA\SerializedName("endDate") |
81
|
|
|
* |
82
|
|
|
* @var \DateTime|null |
83
|
|
|
*/ |
84
|
|
|
protected $endDate; |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* Project created date. |
88
|
|
|
* |
89
|
|
|
* Format: yyyy-MM-dd'T'HH:mm:ss'Z' |
90
|
|
|
* Comment: Optional |
91
|
|
|
* |
92
|
|
|
* @SA\Type("DateTime<'Y-m-d\TH:i:s\Z'>") |
93
|
|
|
* @SA\SerializedName("createdDate") |
94
|
|
|
* |
95
|
|
|
* @var \DateTime|null |
96
|
|
|
*/ |
97
|
|
|
protected $createdDate; |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* Project completed date. |
101
|
|
|
* |
102
|
|
|
* Format: yyyy-MM-dd'T'HH:mm:ss'Z' |
103
|
|
|
* Comment: Optional |
104
|
|
|
* |
105
|
|
|
* @SA\Type("DateTime<'Y-m-d\TH:i:s\Z'>") |
106
|
|
|
* @SA\SerializedName("completedDate") |
107
|
|
|
* |
108
|
|
|
* @var \DateTime|null |
109
|
|
|
*/ |
110
|
|
|
protected $completedDate; |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* @return null|string |
114
|
|
|
*/ |
115
|
1 |
|
public function getAuthorId() |
116
|
|
|
{ |
117
|
1 |
|
return $this->authorId; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* @param null|string $authorId |
122
|
|
|
* |
123
|
|
|
* @return $this |
124
|
|
|
*/ |
125
|
1 |
|
public function setAuthorId($authorId) |
126
|
|
|
{ |
127
|
1 |
|
$this->authorId = $authorId; |
128
|
|
|
|
129
|
1 |
|
return $this; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
/** |
133
|
|
|
* @return array|null|\string[] |
134
|
|
|
*/ |
135
|
1 |
|
public function getOwnerIds() |
136
|
|
|
{ |
137
|
1 |
|
return $this->ownerIds; |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
/** |
141
|
|
|
* @param array|null|\string[] $ownerIds |
142
|
|
|
* |
143
|
|
|
* @return $this |
144
|
|
|
*/ |
145
|
1 |
|
public function setOwnerIds($ownerIds) |
146
|
|
|
{ |
147
|
1 |
|
$this->ownerIds = $ownerIds; |
148
|
|
|
|
149
|
1 |
|
return $this; |
150
|
|
|
} |
151
|
|
|
|
152
|
|
|
/** |
153
|
|
|
* @return null|string |
154
|
|
|
*/ |
155
|
1 |
|
public function getStatus() |
156
|
|
|
{ |
157
|
1 |
|
return $this->status; |
158
|
|
|
} |
159
|
|
|
|
160
|
|
|
/** |
161
|
|
|
* @param null|string $status |
162
|
|
|
* |
163
|
|
|
* @return $this |
164
|
|
|
*/ |
165
|
1 |
|
public function setStatus($status) |
166
|
|
|
{ |
167
|
1 |
|
$this->status = $status; |
168
|
|
|
|
169
|
1 |
|
return $this; |
170
|
|
|
} |
171
|
|
|
|
172
|
|
|
/** |
173
|
|
|
* @return \DateTime|null |
174
|
|
|
*/ |
175
|
1 |
|
public function getStartDate() |
176
|
|
|
{ |
177
|
1 |
|
return $this->startDate; |
178
|
|
|
} |
179
|
|
|
|
180
|
|
|
/** |
181
|
|
|
* @param \DateTime|null $startDate |
182
|
|
|
* |
183
|
|
|
* @return $this |
184
|
|
|
*/ |
185
|
1 |
|
public function setStartDate($startDate) |
186
|
|
|
{ |
187
|
1 |
|
$this->startDate = $startDate; |
188
|
|
|
|
189
|
1 |
|
return $this; |
190
|
|
|
} |
191
|
|
|
|
192
|
|
|
/** |
193
|
|
|
* @return \DateTime|null |
194
|
|
|
*/ |
195
|
1 |
|
public function getEndDate() |
196
|
|
|
{ |
197
|
1 |
|
return $this->endDate; |
198
|
|
|
} |
199
|
|
|
|
200
|
|
|
/** |
201
|
|
|
* @param \DateTime|null $endDate |
202
|
|
|
* |
203
|
|
|
* @return $this |
204
|
|
|
*/ |
205
|
1 |
|
public function setEndDate($endDate) |
206
|
|
|
{ |
207
|
1 |
|
$this->endDate = $endDate; |
208
|
|
|
|
209
|
1 |
|
return $this; |
210
|
|
|
} |
211
|
|
|
|
212
|
|
|
/** |
213
|
|
|
* @return \DateTime|null |
214
|
|
|
*/ |
215
|
1 |
|
public function getCreatedDate() |
216
|
|
|
{ |
217
|
1 |
|
return $this->createdDate; |
218
|
|
|
} |
219
|
|
|
|
220
|
|
|
/** |
221
|
|
|
* @param \DateTime|null $createdDate |
222
|
|
|
* |
223
|
|
|
* @return $this |
224
|
|
|
*/ |
225
|
1 |
|
public function setCreatedDate($createdDate) |
226
|
|
|
{ |
227
|
1 |
|
$this->createdDate = $createdDate; |
228
|
|
|
|
229
|
1 |
|
return $this; |
230
|
|
|
} |
231
|
|
|
|
232
|
|
|
/** |
233
|
|
|
* @return \DateTime|null |
234
|
|
|
*/ |
235
|
1 |
|
public function getCompletedDate() |
236
|
|
|
{ |
237
|
1 |
|
return $this->completedDate; |
238
|
|
|
} |
239
|
|
|
|
240
|
|
|
/** |
241
|
|
|
* @param \DateTime|null $completedDate |
242
|
|
|
* |
243
|
|
|
* @return $this |
244
|
|
|
*/ |
245
|
1 |
|
public function setCompletedDate($completedDate) |
246
|
|
|
{ |
247
|
1 |
|
$this->completedDate = $completedDate; |
248
|
|
|
|
249
|
1 |
|
return $this; |
250
|
|
|
} |
251
|
|
|
} |
252
|
|
|
|