mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-12-01 07:37:18 +01:00
Attachments... .
This commit is contained in:
28
lib/Db/Attach.php
Normal file
28
lib/Db/Attach.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
namespace OCA\QuickNotes\Db;
|
||||
|
||||
use JsonSerializable;
|
||||
|
||||
use OCP\AppFramework\Db\Entity;
|
||||
|
||||
class Attach extends Entity implements JsonSerializable {
|
||||
protected $userId;
|
||||
protected $noteId;
|
||||
protected $fileId;
|
||||
protected $createdAt;
|
||||
protected $previewUrl;
|
||||
|
||||
public function setPreviewUrl($previewUrl) {
|
||||
$this->previewUrl = $previewUrl;
|
||||
}
|
||||
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'note_id' => $this->noteId,
|
||||
'file_id' => $this->fileId,
|
||||
'created_at' => $this->createdAt,
|
||||
'preview_url' => $this->previewUrl,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user