aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/Model/NoteAttachment.php
diff options
context:
space:
mode:
Diffstat (limited to 'Digitigrade/Model/NoteAttachment.php')
-rw-r--r--Digitigrade/Model/NoteAttachment.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/Digitigrade/Model/NoteAttachment.php b/Digitigrade/Model/NoteAttachment.php
new file mode 100644
index 0000000..c47ec64
--- /dev/null
+++ b/Digitigrade/Model/NoteAttachment.php
@@ -0,0 +1,23 @@
+<?php
+namespace Digitigrade\Model;
+
+use Digitigrade\Model;
+
+class NoteAttachment extends Model {
+ public ?int $noteId;
+ public int $index;
+ public string $type;
+ public string $href;
+ public ?string $description;
+
+ protected function setOwnerId(int $id) {
+ $this->noteId = $id;
+ }
+
+ protected function getUpdateWhereClause($db): ?string {
+ if (self::findWhere('note_id = ?', [$this->noteId]) != null) {
+ return "note_id = $this->noteId";
+ }
+ return null;
+ }
+} \ No newline at end of file