diff options
| author | winter | 2024-12-09 21:31:54 +0000 |
|---|---|---|
| committer | winter | 2024-12-09 21:31:54 +0000 |
| commit | 4c7bde1400820f36caf8b2a5374007384c3018f3 (patch) | |
| tree | 83ed26ff368117b8e392f7bc28736482077fc2f4 /Digitigrade/Model/NoteAttachment.php | |
| parent | 50edbd3907c26a2d4d616421de9bb51a4d083c1b (diff) | |
rename to Digitigrade / PawPub
:3
Diffstat (limited to 'Digitigrade/Model/NoteAttachment.php')
| -rw-r--r-- | Digitigrade/Model/NoteAttachment.php | 23 |
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 |
