This commit is contained in:
Dennis Eichhorn 2017-10-05 19:15:49 +02:00
parent 1c4d463540
commit e693b8bba1
3 changed files with 14 additions and 0 deletions

View File

@ -49,6 +49,7 @@ class Installer extends InstallerAbstract
`task_desc` text NOT NULL,
`task_type` tinyint(1) NOT NULL,
`task_status` tinyint(1) NOT NULL,
`task_closable` tinyint(1) NOT NULL,
`task_priority` tinyint(1) NOT NULL,
`task_due` datetime NOT NULL,
`task_done` datetime DEFAULT NULL,

View File

@ -84,6 +84,8 @@ class Task implements \JsonSerializable
*/
protected $status = TaskStatus::OPEN;
protected $isClosable = true;
/**
* Due.
*
@ -133,6 +135,16 @@ class Task implements \JsonSerializable
$this->schedule = new Schedule();
}
public function setClosable(bool $closable) /* : void */
{
$this->isClosable = $closabe;
}
public function isClosable() : bool
{
return $this->isClosable;
}
/**
* Adding new task element.
*

View File

@ -47,6 +47,7 @@ class TaskMapper extends DataMapperAbstract
'task_desc' => ['name' => 'task_desc', 'type' => 'string', 'internal' => 'description'],
'task_type' => ['name' => 'task_type', 'type' => 'int', 'internal' => 'type'],
'task_status' => ['name' => 'task_status', 'type' => 'int', 'internal' => 'status'],
'task_closable' => ['name' => 'task_closable', 'type' => 'bool', 'internal' => 'isClosable'],
'task_priority' => ['name' => 'task_priority', 'type' => 'int', 'internal' => 'priority'],
'task_due' => ['name' => 'task_due', 'type' => 'DateTime', 'internal' => 'due'],
'task_done' => ['name' => 'task_done', 'type' => 'DateTime', 'internal' => 'done'],