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\CustomField; |
13
|
|
|
|
14
|
|
|
use Zibios\WrikePhpJmsserializer\Model\ResourceModelInterface; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Custom Field Resource Model. |
18
|
|
|
*/ |
19
|
|
|
class CustomFieldResourceModel implements ResourceModelInterface |
20
|
|
|
{ |
21
|
|
|
/** |
22
|
|
|
* Custom Field ID. |
23
|
|
|
* |
24
|
|
|
* Comment: Custom Field ID |
25
|
|
|
* |
26
|
|
|
* @SA\Type("string") |
27
|
|
|
* @SA\SerializedName("id") |
28
|
|
|
* |
29
|
|
|
* @var string|null |
30
|
|
|
*/ |
31
|
|
|
protected $id; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* Account ID. |
35
|
|
|
* |
36
|
|
|
* Comment: Account ID |
37
|
|
|
* |
38
|
|
|
* @SA\Type("string") |
39
|
|
|
* @SA\SerializedName("accountId") |
40
|
|
|
* |
41
|
|
|
* @var string|null |
42
|
|
|
*/ |
43
|
|
|
protected $accountId; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Custom field title. |
47
|
|
|
* |
48
|
|
|
* @SA\Type("string") |
49
|
|
|
* @SA\SerializedName("title") |
50
|
|
|
* |
51
|
|
|
* @var string|null |
52
|
|
|
*/ |
53
|
|
|
protected $title; |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Custom field type |
57
|
|
|
* Type of custom field, Enum: Text, DropDown, Numeric, Money, Percentage, Date, Duration, Checkbox. |
58
|
|
|
* |
59
|
|
|
* @see \Zibios\WrikePhpLibrary\Enum\CustomFieldTypeEnum |
60
|
|
|
* |
61
|
|
|
* @SA\Type("string") |
62
|
|
|
* @SA\SerializedName("type") |
63
|
|
|
* |
64
|
|
|
* @var string|null |
65
|
|
|
*/ |
66
|
|
|
protected $type; |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* List of user IDs, who share the custom field. |
70
|
|
|
* |
71
|
|
|
* Comment: Contact ID list |
72
|
|
|
* |
73
|
|
|
* @SA\Type("array<string>") |
74
|
|
|
* @SA\SerializedName("sharedIds") |
75
|
|
|
* |
76
|
|
|
* @var array|string[]|null |
77
|
|
|
*/ |
78
|
|
|
protected $sharedIds; |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* Deleted flag is present and set to true, if custom field is deleted/hidden. |
82
|
|
|
* |
83
|
|
|
* @SA\Type("boolean") |
84
|
|
|
* @SA\SerializedName("deleted") |
85
|
|
|
* |
86
|
|
|
* @var bool|null |
87
|
|
|
*/ |
88
|
|
|
protected $deleted; |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @return mixed |
|
|
|
|
92
|
|
|
*/ |
93
|
1 |
|
public function getId() |
94
|
|
|
{ |
95
|
1 |
|
return $this->id; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @param mixed $id |
100
|
|
|
* |
101
|
|
|
* @return $this |
102
|
|
|
*/ |
103
|
1 |
|
public function setId($id) |
104
|
|
|
{ |
105
|
1 |
|
$this->id = $id; |
106
|
|
|
|
107
|
1 |
|
return $this; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @return mixed |
|
|
|
|
112
|
|
|
*/ |
113
|
1 |
|
public function getAccountId() |
114
|
|
|
{ |
115
|
1 |
|
return $this->accountId; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @param mixed $accountId |
120
|
|
|
* |
121
|
|
|
* @return $this |
122
|
|
|
*/ |
123
|
1 |
|
public function setAccountId($accountId) |
124
|
|
|
{ |
125
|
1 |
|
$this->accountId = $accountId; |
126
|
|
|
|
127
|
1 |
|
return $this; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* @return mixed |
|
|
|
|
132
|
|
|
*/ |
133
|
1 |
|
public function getTitle() |
134
|
|
|
{ |
135
|
1 |
|
return $this->title; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* @param mixed $title |
140
|
|
|
* |
141
|
|
|
* @return $this |
142
|
|
|
*/ |
143
|
1 |
|
public function setTitle($title) |
144
|
|
|
{ |
145
|
1 |
|
$this->title = $title; |
146
|
|
|
|
147
|
1 |
|
return $this; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* @return mixed |
|
|
|
|
152
|
|
|
*/ |
153
|
1 |
|
public function getType() |
154
|
|
|
{ |
155
|
1 |
|
return $this->type; |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* @param mixed $type |
160
|
|
|
* |
161
|
|
|
* @return $this |
162
|
|
|
*/ |
163
|
1 |
|
public function setType($type) |
164
|
|
|
{ |
165
|
1 |
|
$this->type = $type; |
166
|
|
|
|
167
|
1 |
|
return $this; |
168
|
|
|
} |
169
|
|
|
|
170
|
|
|
/** |
171
|
|
|
* @return mixed |
|
|
|
|
172
|
|
|
*/ |
173
|
1 |
|
public function getSharedIds() |
174
|
|
|
{ |
175
|
1 |
|
return $this->sharedIds; |
176
|
|
|
} |
177
|
|
|
|
178
|
|
|
/** |
179
|
|
|
* @param mixed $sharedIds |
180
|
|
|
* |
181
|
|
|
* @return $this |
182
|
|
|
*/ |
183
|
1 |
|
public function setSharedIds($sharedIds) |
184
|
|
|
{ |
185
|
1 |
|
$this->sharedIds = $sharedIds; |
186
|
|
|
|
187
|
1 |
|
return $this; |
188
|
|
|
} |
189
|
|
|
|
190
|
|
|
/** |
191
|
|
|
* @return mixed |
|
|
|
|
192
|
|
|
*/ |
193
|
1 |
|
public function getDeleted() |
194
|
|
|
{ |
195
|
1 |
|
return $this->deleted; |
196
|
|
|
} |
197
|
|
|
|
198
|
|
|
/** |
199
|
|
|
* @param mixed $deleted |
200
|
|
|
* |
201
|
|
|
* @return $this |
202
|
|
|
*/ |
203
|
1 |
|
public function setDeleted($deleted) |
204
|
|
|
{ |
205
|
1 |
|
$this->deleted = $deleted; |
206
|
|
|
|
207
|
1 |
|
return $this; |
208
|
|
|
} |
209
|
|
|
} |
210
|
|
|
|
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.