Start working on tasks feature

This commit is contained in:
Bernd Bestel
2018-09-22 22:01:32 +02:00
parent bcb359e317
commit 6fe0100927
13 changed files with 477 additions and 2 deletions

18
services/TasksService.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
namespace Grocy\Services;
class TasksService extends BaseService
{
public function GetCurrent()
{
$sql = 'SELECT * from tasks_current';
return $this->DatabaseService->ExecuteDbQuery($sql)->fetchAll(\PDO::FETCH_OBJ);
}
private function TaskExists($taskId)
{
$taskRow = $this->Database->tasks()->where('id = :1', $taskId)->fetch();
return $taskRow !== null;
}
}