1
|
|
|
<?php |
2
|
|
|
namespace OmnideskBundle\Request\Message; |
3
|
|
|
|
4
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
5
|
|
|
use OmnideskBundle\Request\RequestInterface; |
6
|
|
|
use Symfony\Component\HttpFoundation\File\File; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Class AddMessageRequest |
10
|
|
|
* @package OmnideskBundle\Request\Message |
11
|
|
|
*/ |
12
|
|
|
class AddMessageRequest implements RequestInterface |
13
|
|
|
{ |
14
|
|
|
/** |
15
|
|
|
* @var int |
16
|
|
|
*/ |
17
|
|
|
private $caseId; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @var string |
21
|
|
|
*/ |
22
|
|
|
private $content; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @var string |
26
|
|
|
*/ |
27
|
|
|
private $contentHtml; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var int |
31
|
|
|
*/ |
32
|
|
|
private $staffId; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @var int |
36
|
|
|
*/ |
37
|
|
|
private $userId; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @var ArrayCollection|File[] |
41
|
|
|
*/ |
42
|
|
|
private $attachments; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* AddMessageRequest constructor. |
46
|
|
|
*/ |
47
|
|
|
public function __construct() |
48
|
|
|
{ |
49
|
|
|
$this->attachments = new ArrayCollection(); |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @return int |
54
|
|
|
*/ |
55
|
|
|
public function getCaseId() |
56
|
|
|
{ |
57
|
|
|
return $this->caseId; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @param int $caseId |
62
|
|
|
* @return $this |
63
|
|
|
*/ |
64
|
|
|
public function setCaseId($caseId) |
65
|
|
|
{ |
66
|
|
|
$this->caseId = $caseId; |
67
|
|
|
|
68
|
|
|
return $this; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @return string |
73
|
|
|
*/ |
74
|
|
|
public function getContent() |
75
|
|
|
{ |
76
|
|
|
return $this->content; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* @param string $content |
81
|
|
|
* @return $this |
82
|
|
|
*/ |
83
|
|
|
public function setContent($content) |
84
|
|
|
{ |
85
|
|
|
$this->content = $content; |
86
|
|
|
|
87
|
|
|
return $this; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @return string |
92
|
|
|
*/ |
93
|
|
|
public function getContentHtml() |
94
|
|
|
{ |
95
|
|
|
return $this->contentHtml; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @param string $contentHtml |
100
|
|
|
* @return $this |
101
|
|
|
*/ |
102
|
|
|
public function setContentHtml($contentHtml) |
103
|
|
|
{ |
104
|
|
|
$this->contentHtml = $contentHtml; |
105
|
|
|
|
106
|
|
|
return $this; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* @return int |
111
|
|
|
*/ |
112
|
|
|
public function getStaffId() |
113
|
|
|
{ |
114
|
|
|
return $this->staffId; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* @param int $staffId |
119
|
|
|
* @return $this |
120
|
|
|
*/ |
121
|
|
|
public function setStaffId($staffId) |
122
|
|
|
{ |
123
|
|
|
$this->staffId = $staffId; |
124
|
|
|
|
125
|
|
|
return $this; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* @return int |
130
|
|
|
*/ |
131
|
|
|
public function getUserId() |
132
|
|
|
{ |
133
|
|
|
return $this->userId; |
134
|
|
|
} |
135
|
|
|
|
136
|
|
|
/** |
137
|
|
|
* @param int $userId |
138
|
|
|
* @return $this |
139
|
|
|
*/ |
140
|
|
|
public function setUserId($userId) |
141
|
|
|
{ |
142
|
|
|
$this->userId = $userId; |
143
|
|
|
|
144
|
|
|
return $this; |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* @return ArrayCollection|File[] |
149
|
|
|
*/ |
150
|
|
|
public function getAttachments() |
151
|
|
|
{ |
152
|
|
|
return $this->attachments; |
153
|
|
|
} |
154
|
|
|
|
155
|
|
|
/** |
156
|
|
|
* @param File $attachment |
157
|
|
|
*/ |
158
|
|
|
public function addAttachment(File $attachment) |
159
|
|
|
{ |
160
|
|
|
$this->attachments->add($attachment); |
161
|
|
|
} |
162
|
|
|
} |
163
|
|
|
|