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