Completed
Pull Request — master (#1591)
by Christoph
23:04
created

LocalAttachment::jsonSerialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
/**
4
 * @author Christoph Wurst <[email protected]>
5
 *
6
 * ownCloud - Mail
7
 *
8
 * This code is free software: you can redistribute it and/or modify
9
 * it under the terms of the GNU Affero General Public License, version 3,
10
 * as published by the Free Software Foundation.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
 * GNU Affero General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Affero General Public License, version 3,
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
19
 *
20
 */
21
22
namespace OCA\Mail\Db;
23
24
use JsonSerializable;
25
use OCP\AppFramework\Db\Entity;
26
27
/**
28
 * @method string getUserId()
29
 * @method void setUserId(string $userId)
30
 * @method string getFileName()
31
 * @method void setFileName(string $fileName)
32
 * @method string getFilePath()
33
 * @method void setFilePath(string $filePath)
34
 * @method int getCreatedAt()
35
 * @method void setCreatedAt(int $createdAt)
36
 */
37
class LocalAttachment extends Entity implements JsonSerializable {
38
39
	protected $userId;
40
	protected $fileName;
41
	protected $filePath;
42
	protected $createdAt;
43
44
	public function jsonSerialize() {
45
		return [
46
			'id' => $this->id,
47
			'fileName' => $this->fileName,
48
		];
49
	}
50
51
}
52