UPDATE 12-ago-2025
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
// 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.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user