1
0

SprintWorkerDay.php 925 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /*
  3. * Copyright 2026 Alessandro Chiapparini <sprint_planer_web@chiapparini.org>
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * See the LICENSE file in the project root for the full license text.
  9. */
  10. declare(strict_types=1);
  11. namespace App\Domain;
  12. final class SprintWorkerDay
  13. {
  14. public function __construct(
  15. public readonly int $id,
  16. public readonly int $sprintWorkerId,
  17. public readonly int $sprintWeekId,
  18. public readonly float $days,
  19. ) {
  20. }
  21. public function toAuditSnapshot(): array
  22. {
  23. return [
  24. 'id' => $this->id,
  25. 'sprint_worker_id' => $this->sprintWorkerId,
  26. 'sprint_week_id' => $this->sprintWeekId,
  27. 'days' => $this->days,
  28. ];
  29. }
  30. }