using ColaFlow.Domain.Common;

namespace ColaFlow.Domain.ValueObjects;

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

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

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

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

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