package de.effigenix.domain.inventory;

import java.util.UUID;

public record AllocationId(String value) {

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

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

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