using ColaFlow.Shared.Kernel.Common;

namespace ColaFlow.Modules.ProjectManagement.Domain.ValueObjects;

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

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

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

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

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