package de.effigenix.domain.inventory;

import java.util.UUID;

public record StockId(String value) {

    public StockId {
        if (value == null || value.isBlank()) {
            throw new IllegalArgumentException("StockId must not be blank");
        }
    }

    public static StockId generate() {
        return new StockId(UUID.randomUUID().toString());
    }

    public static StockId of(String value) {
        return new StockId(value);
    }
}
