using ColaFlow.Shared.Kernel.Common;

namespace ColaFlow.Modules.ProjectManagement.Domain.ValueObjects;

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

    private UserId(Guid value)
    {
        Value = value;
    }

    public static UserId Create() => new UserId(Guid.NewGuid());
    public static UserId Create(Guid value) => new UserId(value);
    public static UserId From(Guid value) => new UserId(value);

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

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