using ColaFlow.Shared.Kernel.Common;

namespace ColaFlow.Modules.ProjectManagement.Domain.ValueObjects;

/// <summary>
/// TenantId Value Object (strongly-typed ID)
/// </summary>
public sealed class TenantId : ValueObject
{
    public Guid Value { get; private set; }

    private TenantId(Guid value)
    {
        if (value == Guid.Empty)
            throw new ArgumentException("TenantId cannot be empty", nameof(value));

        Value = value;
    }

    public static TenantId Create(Guid value) => new TenantId(value);
    public static TenantId From(Guid value) => new TenantId(value);

    protected override IEnumerable<object> GetAtomicValues()
    {
        yield return Value;
    }

    public override string ToString() => Value.ToString();
}
