package com.aps.macroplanner.data;

/**
 * 产品→库存点映射 — 定义一个产品存放在哪个库存点。
 *
 * <p>替代之前用 Map<String, List<StockingPoint>> 的 productSpMap 方式,
 * 声明式地定义产品与库存点的关系。</p>
 *
 * <p>一个产品可以在多个库存点存放 (通过多个 ProductSpMapping 记录)。</p>
 */
public class ProductSpMapping {
    private final Product product;
    private final StockingPoint stockingPoint;

    public ProductSpMapping(Product product, StockingPoint stockingPoint) {
        this.product = product;
        this.stockingPoint = stockingPoint;
    }

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

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