mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-15 09:13:16 +01:00
move goal progress calculation out of the resources
This commit is contained in:
22
app/Service/Dto/GoalProgressDto.php
Normal file
22
app/Service/Dto/GoalProgressDto.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service\Dto;
|
||||
|
||||
use App\Enums\GoalStatus;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
readonly class GoalProgressDto
|
||||
{
|
||||
/**
|
||||
* @param Carbon $periodStart Start of the period in UTC (inclusive)
|
||||
* @param Carbon $periodEnd End of the period in UTC (exclusive)
|
||||
*/
|
||||
public function __construct(
|
||||
public Carbon $periodStart,
|
||||
public Carbon $periodEnd,
|
||||
public int $trackedSeconds,
|
||||
public GoalStatus $status,
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user