package de.effigenix.domain.inventory;

import java.util.UUID;

public record StorageLocationId(String value) {

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

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

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