package com.aps.macroplanner.data;

/**
 * 初始库存 — 定义某个产品在某个库存点的期初库存量。
 *
 * <p>替代之前用字符串 key ("productId_spId") 的 Map 方式, 更清晰。</p>
 */
public class InitialInventory {
    private final Product product;
    private final StockingPoint stockingPoint;
    private final double quantity;

    public InitialInventory(Product product, StockingPoint stockingPoint, double quantity) {
        this.product = product;
        this.stockingPoint = stockingPoint;
        this.quantity = quantity;
    }

    public Product getProduct() { return product; }
    public StockingPoint getStockingPoint() { return stockingPoint; }
    public double getQuantity() { return quantity; }

    @Override
    public String toString() {
        return product.getId() + "@" + stockingPoint.getId() + " = " + quantity;
    }
}