package de.effigenix.domain.production;

import java.util.UUID;

public record RecipeId(String value) {

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

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

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