package de.effigenix.domain.masterdata.article;

import java.util.UUID;

public record SalesUnitId(String value) {

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

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

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