using ColaFlow.Shared.Kernel.Common;

namespace ColaFlow.Modules.IssueManagement.Domain.ValueObjects;

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

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

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

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

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