using Baya.Domain.Common;

namespace Baya.Domain.Entities.Reviews;

/// <summary>
/// The standardized review-tag vocabulary (e.g. <c>punctual</c>, <c>professional</c>) used to turn qualitative
/// feedback into quantitative rollups ("% punctual"). Reference data — seeded via <c>HasData</c>, toggled with
/// <see cref="IsActive"/>, ordered by <see cref="SortOrder"/>. Growing the vocabulary is an admin/seed insert,
/// not a schema change.
/// </summary>
public class ReviewTagMaster : BaseEntity<long>
{
    /// <summary>Stable machine code (UNIQUE), e.g. <c>punctual</c>.</summary>
    public string Code { get; set; } = string.Empty;

    public string LabelFa { get; set; } = string.Empty;
    public string LabelEn { get; set; } = string.Empty;

    public bool IsActive { get; set; } = true;
    public int SortOrder { get; set; }

    public ICollection<ReviewTagLink> Links { get; set; } = new List<ReviewTagLink>();
}

/// <summary>The starter tag vocabulary codes seeded with the migration.</summary>
public static class ReviewTagCodes
{
    public const string Punctual = "punctual";
    public const string Professional = "professional";
    public const string Clean = "clean";
    public const string Kind = "kind";
    public const string Communicative = "communicative";

    public static readonly IReadOnlyList<string> All = [Punctual, Professional, Clean, Kind, Communicative];
}
