diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-01-17 02:11:31 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-01-17 02:11:31 +0900 |
| commit | deacd0dfc195bca41af631114804d29937337cd8 (patch) | |
| tree | f1f83580e5bc892c0794ac41632bc0cce3498f65 /services/app/src/Models/TestcaseExecution.php | |
| parent | 38ddeb28ec846ee966d0fe6873585d697a9ef373 (diff) | |
| download | phperkaigi-2024-albatross-deacd0dfc195bca41af631114804d29937337cd8.tar.gz phperkaigi-2024-albatross-deacd0dfc195bca41af631114804d29937337cd8.tar.zst phperkaigi-2024-albatross-deacd0dfc195bca41af631114804d29937337cd8.zip | |
.
Diffstat (limited to 'services/app/src/Models/TestcaseExecution.php')
| -rw-r--r-- | services/app/src/Models/TestcaseExecution.php | 32 |
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, + ); + } +} |
