aboutsummaryrefslogtreecommitdiffhomepage
path: root/services/app/src/Models/TestcaseExecution.php
diff options
context:
space:
mode:
Diffstat (limited to 'services/app/src/Models/TestcaseExecution.php')
-rw-r--r--services/app/src/Models/TestcaseExecution.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/services/app/src/Models/TestcaseExecution.php b/services/app/src/Models/TestcaseExecution.php
new file mode 100644
index 0000000..63d2d6a
--- /dev/null
+++ b/services/app/src/Models/TestcaseExecution.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Nsfisis\Albatross\Models;
+
+final class TestcaseExecution
+{
+ public function __construct(
+ public readonly int $testcase_execution_id,
+ public readonly int $testcase_id,
+ public readonly int $answer_id,
+ public readonly ExecutionStatus $status,
+ public readonly ?string $stdout,
+ public readonly ?string $stderr,
+ ) {
+ }
+
+ public static function create(
+ int $testcase_id,
+ int $answer_id,
+ ): self {
+ return new self(
+ testcase_execution_id: 0,
+ testcase_id: $testcase_id,
+ answer_id: $answer_id,
+ status: ExecutionStatus::Pending,
+ stdout: null,
+ stderr: null,
+ );
+ }
+}