package gc.mda.signal_batch.domain.vessel.dto;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import gc.mda.signal_batch.global.config.FlexibleLocalDateTimeDeserializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Builder;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "선박별 항적 조회 요청")
public class VesselTracksRequest {

    @Schema(
        description = """
            조회 시작 시간.
            지원 형식: ISO 8601 (2026-01-20T12:00:00), UTC (2026-01-20T12:00:00Z),
            표준 형식 (2026-01-20 12:00:00), 압축 형식 (20260120120000)
            """,
        example = "2026-01-20T12:00:00",
        required = true
    )
    @JsonDeserialize(using = FlexibleLocalDateTimeDeserializer.class)
    private LocalDateTime startTime;

    @Schema(
        description = """
            조회 종료 시간.
            지원 형식: ISO 8601 (2026-01-20T12:10:00), UTC (2026-01-20T12:10:00Z),
            표준 형식 (2026-01-20 12:10:00), 압축 형식 (20260120121000)
            """,
        example = "2026-01-20T12:10:00",
        required = true
    )
    @JsonDeserialize(using = FlexibleLocalDateTimeDeserializer.class)
    private LocalDateTime endTime;

    @Schema(description = "조회할 선박 MMSI 목록", required = true)
    private List<String> vessels;
}
