**Transformation Example:**
```typescript
// Backend Response
{
coverPhotoId: "uuid-123",
coverPhoto: {
id: "uuid-123",
s3Url: "https://s3.../image.jpg",
originalName: "photo.jpg"
}
}
// Frontend Needs
{
eventCoverPhoto: "https://s3.../image.jpg" // For backward compat
coverPhotoId: "uuid-123" // New field
}
Description
The dbFieldMapper.ts utility needs to handle the new field mappings between backendresponse and frontend types. The cover photo and document fields now return Media objects or UUIDs instead of direct URLs. Without this update, events won't display cover photos or documents correctly.
Components Affected:
Tasks
coverPhotoId↔eventCoverPhoto(backward compatibility)documentId↔eventDocument(backward compatibility)coverPhotoanddocumentMedia objects in responses3Urlfrom Media objects for display componentsnsc-events-nextjs/tests/unit/dbFieldMapper.test.tsxwith new testcases
Visual Aids
Expand ⬇️