add set scheduling api
This commit is contained in:
parent
bdb266746d
commit
98ae9bf088
20 changed files with 935 additions and 1 deletions
61
backend/app/Schedule/Schedule.php
Normal file
61
backend/app/Schedule/Schedule.php
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
namespace App\Schedule;
|
||||
|
||||
use App\Set\Set;
|
||||
use App\User\User;
|
||||
use DateTimeImmutable;
|
||||
|
||||
final readonly class Schedule
|
||||
{
|
||||
/**
|
||||
* @param list<ScheduleAssignment> $assignments
|
||||
*/
|
||||
public function __construct(
|
||||
private int $id,
|
||||
private User $user,
|
||||
private Set $set,
|
||||
private string $elementKind,
|
||||
private DateTimeImmutable $startDate,
|
||||
private DateTimeImmutable $targetDate,
|
||||
private array $assignments,
|
||||
) {}
|
||||
|
||||
public function getId(): int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getUser(): User
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
public function getSet(): Set
|
||||
{
|
||||
return $this->set;
|
||||
}
|
||||
|
||||
public function getElementKind(): string
|
||||
{
|
||||
return $this->elementKind;
|
||||
}
|
||||
|
||||
public function getStartDate(): DateTimeImmutable
|
||||
{
|
||||
return $this->startDate;
|
||||
}
|
||||
|
||||
public function getTargetDate(): DateTimeImmutable
|
||||
{
|
||||
return $this->targetDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<ScheduleAssignment>
|
||||
*/
|
||||
public function getAssignments(): array
|
||||
{
|
||||
return $this->assignments;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue