package de.effigenix.domain.masterdata.productcategory;

import java.util.UUID;

public record ProductCategoryId(String value) {

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

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

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