package de.avatic.lcc.dto.calculation.create;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.Valid;
import jakarta.validation.constraints.Min;
import org.springframework.validation.annotation.Validated;

import java.util.List;

public class CreatePremiseDTO {

    @Valid
    @JsonProperty("material")
    private List<@Min(1) Integer> materialIds;

    @Valid
    @JsonProperty("supplier")
    private List<@Min(1) Integer> supplierIds;

    @Valid
    @JsonProperty("user_supplier")
    private List<@Min(1) Integer> userSupplierIds;

    @JsonProperty("from_scratch")
    private boolean createEmpty;

    public List<Integer> getMaterialIds() {
        return materialIds;
    }

    public void setMaterialIds(List<Integer> materialIds) {
        this.materialIds = materialIds;
    }

    public List<Integer> getSupplierIds() {
        return supplierIds;
    }

    public void setSupplierIds(List<Integer> supplierIds) {
        this.supplierIds = supplierIds;
    }

    public List<Integer> getUserSupplierIds() {
        return userSupplierIds;
    }

    public void setUserSupplierIds(List<Integer> userSupplierIds) {
        this.userSupplierIds = userSupplierIds;
    }

    @JsonIgnore
    public boolean createEmpty() {
        return this.createEmpty;
    }

    @JsonIgnore
    public void setCreateEmpty(boolean createEmpty) {
        this.createEmpty = createEmpty;
    }
}
