Files
int-layer/src.bak/main/java/com/example/dto/dialogflow/notification/NotificationSessionDTO.java
2026-02-20 08:42:45 +00:00

24 lines
1.2 KiB
Java

// src/main/java/com/example/dto/dialogflow/notification/NotificationSessionDTO.java
package com.example.dto.dialogflow.notification;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.time.Instant;
import java.util.List;
import java.util.Objects;
@JsonIgnoreProperties(ignoreUnknown = true)
public record NotificationSessionDTO(
String sessionId, // The unique session identifier (e.g., the phone number)
String telefono, // The phone number for this session
Instant fechaCreacion, // When the session was first created
Instant ultimaActualizacion, // When the session was last updated
List<NotificationDTO> notificaciones // List of individual notification events
) {
public NotificationSessionDTO {
Objects.requireNonNull(sessionId, "Session ID cannot be null.");
Objects.requireNonNull(telefono, "Phone number cannot be null.");
Objects.requireNonNull(fechaCreacion, "Creation timestamp cannot be null.");
Objects.requireNonNull(ultimaActualizacion, "Last updated timestamp cannot be null.");
Objects.requireNonNull(notificaciones, "Notifications list cannot be null.");
}
}