mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
Allow nunlable to booleans needed due NC 22 changes.
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
namespace OCA\QuickNotes\Db;
|
||||
|
||||
use JsonSerializable;
|
||||
|
||||
use OCP\AppFramework\Db\Entity;
|
||||
|
||||
class Note extends Entity implements JsonSerializable {
|
||||
|
||||
protected $description;
|
||||
protected $done;
|
||||
protected $ordering;
|
||||
protected $noteId;
|
||||
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'description' => $this->description,
|
||||
'done' => $this->done,
|
||||
'ordering' => $this->ordering,
|
||||
'noteId' => $this->noteId
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
namespace OCA\QuickNotes\Db;
|
||||
|
||||
use OCP\IDBConnection;
|
||||
use OCP\AppFramework\Db\Mapper;
|
||||
|
||||
class TaskMapper extends Mapper {
|
||||
|
||||
public function __construct(IDBConnection $db) {
|
||||
parent::__construct($db, 'quicknotes_tasks', '\OCA\QuickNotes\Db\Tasks');
|
||||
}
|
||||
|
||||
public function find($id, $noteId) {
|
||||
$sql = 'SELECT * FROM *PREFIX*quicknotes_tasks WHERE id = ? AND note_id = ?';
|
||||
return $this->findEntity($sql, [$id, $noteId]);
|
||||
}
|
||||
|
||||
public function findAll($noteId) {
|
||||
$sql = 'SELECT * FROM *PREFIX*quicknotes_tasks WHERE note_id = ?';
|
||||
return $this->findEntities($sql, [$noteId]);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user