entity

Site Image

One site-visit photo for a field report. Create-only aggregate root; no lifecycle.

Entity(Aggregate Root)Status: Implemented in api-v1Aggregate Root

Purpose

A site image is one photo from a project site visit. It is not an image-number sequence (owned by existing Airtable numbering automation) and not a bulk batch aggregate.

Identity is SiteImageId. The aggregate references a construction project by ProjectId and does not create projects. Image numbering stays in Airtable automation.

ReportDate and SiteImageAttachment are value objects on this entity, not separate catalog entities.

Invariants

  • INV-1 — A site image belongs to a project (projectId required after trim; SiteImageProjectRequiredError).
  • INV-2 — A site image has a report date YYYY-MM-DD (SiteImageReportDateRequiredError / SiteImageReportDateInvalidError).
  • INV-3 — A site image has exactly one image attachment with a valid http or https URL (SiteImageAttachmentRequiredError / SiteImageAttachmentUrlInvalidError).
  • Create-only. There is no update/delete lifecycle on the aggregate.
  • OCC is omitted (glossary deviation): create-only Airtable records have no compare-and-set.

Domain Events

  • SiteImageRecorded — recorded by SiteImage.create. Payload: siteImageId, projectId, reportDate, imageUrl, filename.