package de.effigenix.domain.production;

import java.util.UUID;

public record ConsumptionId(String value) {

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

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

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