Add design artifacts for view event feature (007)

Spec, research, data model, API contract, implementation plan, and
task breakdown for the public event detail page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 22:33:04 +01:00
parent 7efe932621
commit 80d79c3596
10 changed files with 638 additions and 11 deletions

View File

@@ -0,0 +1,56 @@
# Data Model: View Event Landing Page (007)
**Date**: 2026-03-06
## Entities
### Event (modified — adds `timezone` field)
| Field | Type | Required | Constraints | Notes |
|-----------------|------------------|----------|--------------------------|----------------------------------|
| id | Long | yes | BIGSERIAL, PK | Internal only, never exposed |
| eventToken | UUID | yes | UNIQUE, NOT NULL | Public identifier in URLs |
| organizerToken | UUID | yes | UNIQUE, NOT NULL | Secret, never in public API |
| title | String | yes | 1200 chars | |
| description | String | no | max 2000 chars | |
| dateTime | OffsetDateTime | yes | | Organizer's original offset |
| timezone | String | yes | IANA zone ID, max 64 | **NEW** — e.g. "Europe/Berlin" |
| location | String | no | max 500 chars | |
| expiryDate | LocalDate | yes | Must be future at create | Auto-deletion trigger |
| createdAt | OffsetDateTime | yes | Server-generated | |
**Validation rules**:
- `timezone` must be a valid IANA zone ID (`ZoneId.getAvailableZoneIds()`).
- `expiryDate` must be in the future at creation time (existing rule).
**State transitions**:
- Active → Expired: when `expiryDate < today` (computed, not stored).
- Active → Cancelled: future (US-18), adds `cancelledAt` + `cancellationMessage`.
### RSVP (future — not created in this feature)
Documented here for context only. Created when the RSVP feature (US-8+) is implemented.
| Field | Type | Required | Constraints |
|------------|---------|----------|------------------------------|
| id | Long | yes | BIGSERIAL, PK |
| eventId | Long | yes | FK → events.id |
| guestName | String | yes | 1100 chars |
| attending | Boolean | yes | true = attending |
| createdAt | OffsetDateTime | yes | Server-generated |
## Relationships
```
Event 1 ←── * RSVP (future)
```
## Type Mapping (full stack)
| Concept | Java | PostgreSQL | OpenAPI | TypeScript |
|--------------|-------------------|---------------|---------------------|------------|
| Event time | `OffsetDateTime` | `timestamptz` | `string` `date-time`| `string` |
| Timezone | `String` | `varchar(64)` | `string` | `string` |
| Expiry date | `LocalDate` | `date` | `string` `date` | `string` |
| Token | `UUID` | `uuid` | `string` `uuid` | `string` |
| Count | `int` | `integer` | `integer` | `number` |