aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/TextProcessing/Db/Task.php
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2023-11-13 10:49:14 +0100
committerGitHub <noreply@github.com>2023-11-13 10:49:14 +0100
commit0feb55ee93b579bfcba30410325ca0c28f501779 (patch)
tree57f0752858983b0ba52344ca32c7c9a905b1c126 /lib/private/TextProcessing/Db/Task.php
parent36d370b2163ac2a98dbecf2400eb1300025b79b2 (diff)
parent2031fe17b4f6b48d3b72fee520285dde37488afb (diff)
downloadnextcloud-server-0feb55ee93b579bfcba30410325ca0c28f501779.tar.gz
nextcloud-server-0feb55ee93b579bfcba30410325ca0c28f501779.zip
Merge pull request #41271 from nextcloud/enh/text-processing-iprovider2
enh(TextProcessing): Add two new provider interfaces
Diffstat (limited to 'lib/private/TextProcessing/Db/Task.php')
-rw-r--r--lib/private/TextProcessing/Db/Task.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/TextProcessing/Db/Task.php b/lib/private/TextProcessing/Db/Task.php
index 9c6f16d11ae..5f362d429f3 100644
--- a/lib/private/TextProcessing/Db/Task.php
+++ b/lib/private/TextProcessing/Db/Task.php
@@ -45,6 +45,8 @@ use OCP\TextProcessing\Task as OCPTask;
* @method string getAppId()
* @method setIdentifier(string $identifier)
* @method string getIdentifier()
+ * @method setCompletionExpectedAt(null|\DateTime $completionExpectedAt)
+ * @method null|\DateTime getCompletionExpectedAt()
*/
class Task extends Entity {
protected $lastUpdated;
@@ -55,16 +57,17 @@ class Task extends Entity {
protected $userId;
protected $appId;
protected $identifier;
+ protected $completionExpectedAt;
/**
* @var string[]
*/
- public static array $columns = ['id', 'last_updated', 'type', 'input', 'output', 'status', 'user_id', 'app_id', 'identifier'];
+ public static array $columns = ['id', 'last_updated', 'type', 'input', 'output', 'status', 'user_id', 'app_id', 'identifier', 'completion_expected_at'];
/**
* @var string[]
*/
- public static array $fields = ['id', 'lastUpdated', 'type', 'input', 'output', 'status', 'userId', 'appId', 'identifier'];
+ public static array $fields = ['id', 'lastUpdated', 'type', 'input', 'output', 'status', 'userId', 'appId', 'identifier', 'completionExpectedAt'];
public function __construct() {
@@ -78,6 +81,7 @@ class Task extends Entity {
$this->addType('userId', 'string');
$this->addType('appId', 'string');
$this->addType('identifier', 'string');
+ $this->addType('completionExpectedAt', 'datetime');
}
public function toRow(): array {
@@ -98,6 +102,7 @@ class Task extends Entity {
'userId' => $task->getUserId(),
'appId' => $task->getAppId(),
'identifier' => $task->getIdentifier(),
+ 'completionExpectedAt' => $task->getCompletionExpectedAt(),
]);
return $task;
}
@@ -107,6 +112,7 @@ class Task extends Entity {
$task->setId($this->getId());
$task->setStatus($this->getStatus());
$task->setOutput($this->getOutput());
+ $task->setCompletionExpectedAt($this->getCompletionExpectedAt());
return $task;
}
}