feat: cli command to anonymize local database
This commit is contained in:
@@ -164,6 +164,20 @@ class BookingEditDraft
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces the form data without touching timestamps.
|
||||
*
|
||||
* Used by anonymization tooling that must not alter audit dates.
|
||||
*
|
||||
* @param array<string, mixed> $formData
|
||||
*/
|
||||
public function replaceFormData(array $formData): static
|
||||
{
|
||||
$this->formData = $formData;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCreatedAt(): \DateTimeImmutable
|
||||
{
|
||||
return $this->createdAt;
|
||||
|
||||
@@ -65,6 +65,11 @@ class NewsletterConsent
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
public function setEmail(string $email): void
|
||||
{
|
||||
$this->email = mb_strtolower(trim($email));
|
||||
}
|
||||
|
||||
public function getMailjetListId(): int
|
||||
{
|
||||
return $this->mailjetListId;
|
||||
@@ -90,6 +95,16 @@ class NewsletterConsent
|
||||
return $this->lastName;
|
||||
}
|
||||
|
||||
public function getCreatedAt(): \DateTimeImmutable
|
||||
{
|
||||
return $this->createdAt;
|
||||
}
|
||||
|
||||
public function getUpdatedAt(): \DateTimeImmutable
|
||||
{
|
||||
return $this->updatedAt;
|
||||
}
|
||||
|
||||
public function isConfirmed(): bool
|
||||
{
|
||||
return null !== $this->confirmedAt && null === $this->revokedAt;
|
||||
|
||||
@@ -76,6 +76,11 @@ class NewsletterOptInRequest
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
public function setEmail(string $email): void
|
||||
{
|
||||
$this->email = mb_strtolower(trim($email));
|
||||
}
|
||||
|
||||
public function getTokenHash(): string
|
||||
{
|
||||
return $this->tokenHash;
|
||||
|
||||
Reference in New Issue
Block a user