package de.effigenix.domain.production;

import java.util.UUID;

public record IngredientId(String value) {

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

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

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