package com.aps.macroplanner.data;

import java.util.List;

/**
 * 供应规格 (SupplySpec) — 对应 Quintiq 中的 SupplySpecification
 * 定义某个供应规格的目标/最小/最大供应量
 */
public class SupplySpec {
    private final String name;
    private final double targetQuantity;
    private final double minQuantity;
    private final double maxQuantity;
    private final boolean hasMaxQuantity;
    private final List<Operation> operations;   // 该规格关联的操作

    public SupplySpec(String name, double targetQuantity, double minQuantity,
                      double maxQuantity, boolean hasMaxQuantity, List<Operation> operations) {
        this.name = name;
        this.targetQuantity = targetQuantity;
        this.minQuantity = minQuantity;
        this.maxQuantity = maxQuantity;
        this.hasMaxQuantity = hasMaxQuantity;
        this.operations = operations;
    }

    public String getName() { return name; }
    public double getTargetQuantity() { return targetQuantity; }
    public double getMinQuantity() { return minQuantity; }
    public double getMaxQuantity() { return maxQuantity; }
    public boolean hasMaxQuantity() { return hasMaxQuantity; }
    public List<Operation> getOperations() { return operations; }

    @Override
    public String toString() {
        return "SupplySpec[" + name + "] target=" + targetQuantity + " min=" + minQuantity + " max=" + maxQuantity;
    }
}