package space.nstart.pcp.pcp_types_lib.dto.requests.slots

import jakarta.validation.constraints.DecimalMax
import jakarta.validation.constraints.DecimalMin
import space.nstart.pcp.pcp_types_lib.dto.ballistics.RevolutionSign
import java.time.LocalDateTime

data class SlotCoverageBatchRequestDTO(
    val items: List<SlotCoverageTargetDTO> = emptyList(),
    val timeStart: LocalDateTime,
    val timeStop: LocalDateTime,
    val revSign: RevolutionSign? = null,
    val cov: Boolean? = null,
    val satellites: List<Long>? = null,
    val occupiedIntervals: List<OccupiedIntervalDTO> = emptyList(),
    @field:DecimalMin(value = "-90.0", message = "sun must be between -90 and 90 degrees")
    @field:DecimalMax(value = "90.0", message = "sun must be between -90 and 90 degrees")
    val sun: Double? = null,
    val coverageStrategy: SlotCoverageStrategy? = SlotCoverageStrategy.GREEDY
)

enum class SlotCoverageStrategy {
    GREEDY,
    CONTINUOUS
}

data class SlotCoverageTargetDTO(
    val targetId: Long = 0,
    val wkt: String = ""
)

data class SlotCoverageBatchResponseDTO(
    val targetId: Long = 0,
    val slots: List<SlotDTO> = emptyList()
)
