Define PauseNotificationCard data model
epic-pause-status-notifications-ui-task-001 — Define the Dart data model for the pause notification card, including fields for peer mentor name, effective date, optional reason text, and mentor profile deep-link URL. Ensure the model is immutable and equatable, and integrates cleanly with the existing in-app notification feed item interface.
Acceptance Criteria
Technical Requirements
Implementation Notes
Check whether the project already uses `equatable` or `freezed` for model classes — match the existing convention rather than introducing a new approach. If `freezed` is used project-wide, generate the model with `@freezed` and `@JsonSerializable`. The `notificationType` constant should be defined as a `static const String notificationTypeKey = 'pause_status'` on the class to avoid magic strings in the feed renderer. Keep the model in the `notifications` feature folder, not in a global models folder, to maintain feature-boundary discipline.
Testing Requirements
Unit tests in flutter_test covering: (1) `fromJson` with all fields populated, (2) `fromJson` with optional `reasonText` absent (null), (3) `toJson` round-trip equality, (4) `==` equality for two identical instances, (5) `==` inequality when any field differs, (6) `copyWith` produces a new instance with the specified field changed and all others unchanged. All tests synchronous, no mocking needed.
The existing notification feed component may expect a specific notification model shape that does not map cleanly to the pause notification payload structure, requiring either payload transformation or feed refactoring.
Mitigation & Contingency
Mitigation: Review the notification-list-item and notification-model contracts before building the card. Design the pause-notification-card to extend or wrap the existing list item pattern rather than replacing it.
Contingency: If the feed contract is incompatible, implement a lightweight adapter that maps the pause notification payload to the feed's expected model shape, keeping the adapter isolated from the core card widget.
The app's existing toast/banner infrastructure may not support the auto-dismiss timeout duration or dismissal animation required for the peer mentor confirmation banner, necessitating a custom implementation that diverges from the design system.
Mitigation & Contingency
Mitigation: Audit the existing banner and toast components (in-app-notification-banner, notification-list-item) for configurable dismiss timeout before starting implementation. Prefer configuration over custom code.
Contingency: If the existing infrastructure cannot be configured, implement the banner as a thin wrapper with a custom auto-dismiss timer while reusing all visual tokens (colours, spacing, typography) from the design system to maintain consistency.