feat: add status column in tracking table

This commit is contained in:
Maël Gangloff
2025-01-01 22:40:38 +01:00
parent 18acd41b29
commit 3fc0faf7bf
3 changed files with 90 additions and 37 deletions

View File

@@ -122,7 +122,7 @@ class Domain
private ?bool $delegationSigned = null;
#[Groups(['domain:item', 'domain:list'])]
private ?int $expiresInDays = null;
protected ?int $expiresInDays = null;
private const IMPORTANT_EVENTS = [EventAction::Deletion->value, EventAction::Expiration->value];
private const IMPORTANT_STATUS = [
@@ -138,8 +138,6 @@ class Domain
'server hold',
];
private const DAY = 24 * 60 * 60;
public function __construct()
{
$this->events = new ArrayCollection();
@@ -463,6 +461,7 @@ class Domain
private static function daysBetween(\DateTimeImmutable $start, \DateTimeImmutable $end): int
{
$interval = $start->diff($end);
return $interval->invert ? -$interval->days : $interval->days;
}