package de.effigenix.domain.inventory;

import java.util.UUID;

public record StockBatchId(String value) {

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

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

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