package de.effigenix.domain.masterdata.supplier;

import java.util.UUID;

public record SupplierId(String value) {

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

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

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