package de.avatic.lcc.dto.calculation.edit.destination;

import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;

import java.util.List;

public class DestinationCreateDTO {

    @NotEmpty (message = "At least one premise must be selected")
    @NotNull (message = "At least one premise must be selected")
    @JsonProperty("premise_id")
    List<@Min(value = 1, message = "Invalid premise id") Integer> premiseId;

    @Min(value = 1, message = "Invalid destination node id")
    @NotNull (message = "Destination node id must be provided")
    @JsonProperty("destination_node_id")
    Integer destinationNodeId;

    public List<Integer> getPremiseId() {
        return premiseId;
    }

    public void setPremiseId(List<Integer> premiseId) {
        this.premiseId = premiseId;
    }

    public Integer getDestinationNodeId() {
        return destinationNodeId;
    }

    public void setDestinationNodeId(Integer destinationNodeId) {
        this.destinationNodeId = destinationNodeId;
    }
}
