fix: derive contingent change signal from the sync diff

This commit is contained in:
fromme committed 2026-09-11 19:34:29 +02:00
1 parent e863025fb1
commit 5f8a586385
8 files changed
+87 -73

No files matched your search

+3 -21
View File
@@ -11,8 +11,8 @@ use Doctrine\ORM\Mapping as ORM;
/**
* Bookkeeping for the scheduled contingent sync of a single accommodation.
*
* Holds the fingerprint of the stored contingent days, which is how the sync decides whether
* anything actually changed, and `changedAt` records when it last did.
* `changedAt` records when the sync last saw a day appear, vanish or switch status within the
* horizon it had already reached; `horizonTo` is how far that reach extends.
*/
#[ORM\Entity(repositoryClass: ContingentSyncStateRepository::class)]
#[ORM\Table(name: 'contingent_sync_state')]
@@ -28,13 +28,7 @@ class ContingentSyncState
private ?Accommodation $accommodation = null;
/**
* sha256 over the stored contingent days, contingent status only.
*/
#[ORM\Column(length: 64)]
private string $contentHash = '';
/**
* Last time the fingerprint actually changed. Kept for operators, not exposed via the API.
* Last time the stored snapshot actually changed. Kept for operators, not exposed via the API.
*/
#[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $changedAt = null;
@@ -76,18 +70,6 @@ class ContingentSyncState
return $this;
}
public function getContentHash(): string
{
return $this->contentHash;
}
public function setContentHash(string $contentHash): self
{
$this->contentHash = $contentHash;
return $this;
}
public function getChangedAt(): ?\DateTimeImmutable
{
return $this->changedAt;