namespace ColaFlow.Modules.ProjectManagement.Domain.ValueObjects;

/// <summary>
/// Sprint ID Value Object
/// </summary>
public sealed record SprintId
{
    public Guid Value { get; init; }

    private SprintId(Guid value)
    {
        if (value == Guid.Empty)
            throw new ArgumentException("SprintId cannot be empty", nameof(value));

        Value = value;
    }

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

    public static SprintId From(Guid value) => new(value);

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

    public static implicit operator Guid(SprintId sprintId) => sprintId.Value;
}
