package de.effigenix.domain.masterdata.article;

import java.util.UUID;

public record ArticleId(String value) {

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

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

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