update
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\DTO\Response;
|
||||
|
||||
class CategoryResponse
|
||||
{
|
||||
public function __construct(
|
||||
public readonly int $id,
|
||||
public readonly string $name,
|
||||
public readonly string $color,
|
||||
) {}
|
||||
}
|
||||
@@ -2,11 +2,15 @@
|
||||
|
||||
namespace App\DTO\Response;
|
||||
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
|
||||
class DayResponse
|
||||
{
|
||||
public function __construct(
|
||||
#[Groups(['task:read'])]
|
||||
public readonly string $date,
|
||||
/** @var TaskResponse[] */
|
||||
/** @var \App\Entity\Task[] */
|
||||
#[Groups(['task:read'])]
|
||||
public readonly array $tasks,
|
||||
) {}
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\DTO\Response;
|
||||
|
||||
class TaskResponse
|
||||
{
|
||||
public function __construct(
|
||||
public readonly int $schemaId,
|
||||
public readonly int $taskId,
|
||||
public readonly string $name,
|
||||
public readonly string $status,
|
||||
public readonly string $taskType,
|
||||
public readonly ?string $date,
|
||||
public readonly ?string $deadline,
|
||||
public readonly bool $isPast,
|
||||
public readonly ?CategoryResponse $category,
|
||||
) {}
|
||||
}
|
||||
@@ -2,12 +2,16 @@
|
||||
|
||||
namespace App\DTO\Response;
|
||||
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
|
||||
class WeekViewResponse
|
||||
{
|
||||
public function __construct(
|
||||
/** @var TaskResponse[] */
|
||||
/** @var \App\Entity\Task[] */
|
||||
#[Groups(['task:read'])]
|
||||
public readonly array $tasksWithoutDeadline,
|
||||
/** @var DayResponse[] */
|
||||
#[Groups(['task:read'])]
|
||||
public readonly array $days,
|
||||
) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user