using Butter.Dtos.Tag;
using Lactose.Models;

namespace Lactose.Mapper;

/// <summary>
/// Provides methods for mapping Tag objects to TagDto objects.
/// </summary>
public static class TagsMapper {
    /// <summary>
    /// Maps a Tag object to a TagDto object.
    /// </summary>
    /// <param name="tag">The Tag object to map.</param>
    /// <returns>A TagDto object.</returns>
    public static TagDto ToTagDto(Tag tag) {
        return new TagDto() {
            Id     = tag.Id,
            Name   = tag.Name,
            Parent = null
        };
    }
}