Domain: add timezone field to Event and CreateEventCommand. Ports: new GetEventUseCase inbound port. Service: implement getByEventToken, validate IANA timezone on create. Controller: map to GetEventResponse, compute expired flag via Clock. Persistence: timezone column in JPA entity and mapping. Tests: integration tests use DTOs + ObjectMapper instead of inline JSON, GET tests seed DB directly via JpaRepository for isolation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
11 lines
337 B
Java
11 lines
337 B
Java
package de.fete.application.service;
|
|
|
|
/** Thrown when an invalid IANA timezone ID is provided. */
|
|
public class InvalidTimezoneException extends RuntimeException {
|
|
|
|
/** Creates a new exception for the given invalid timezone. */
|
|
public InvalidTimezoneException(String timezone) {
|
|
super("Invalid IANA timezone: " + timezone);
|
|
}
|
|
}
|