using ColaFlow.Shared.Kernel.Common;

namespace ColaFlow.Modules.IssueManagement.Domain.ValueObjects;

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

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

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

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

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