package de.effigenix.infrastructure.masterdata.web.dto;

import de.effigenix.domain.masterdata.customer.DeliveryRhythm;
import de.effigenix.domain.masterdata.Unit;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

public record SetFrameContractRequest(
        LocalDate validFrom,
        LocalDate validUntil,
        @NotNull DeliveryRhythm rhythm,
        @NotEmpty List<LineItem> lineItems
) {
    public record LineItem(
            @NotNull String articleId,
            @NotNull BigDecimal agreedPrice,
            BigDecimal agreedQuantity,
            Unit unit
    ) {}
}
