mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-01-11 15:38:40 +00:00
Fix #110
This commit is contained in:
parent
1c4d463540
commit
e693b8bba1
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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'],
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user