namespace PowderCoating.Core.Entities;

/// <summary>
/// One thumbs-up or thumbs-down vote per company per library formula.
/// Platform-level — no BaseEntity, no soft delete, no CompanyId tenant filter.
/// Unique constraint enforced at the DB level: (FormulaLibraryItemId, CompanyId).
/// </summary>
public class FormulaLibraryRating
{
    public int Id { get; set; }

    public int FormulaLibraryItemId { get; set; }

    /// <summary>The company casting the vote.</summary>
    public int CompanyId { get; set; }

    /// <summary>True = thumbs up, false = thumbs down.</summary>
    public bool IsPositive { get; set; }

    public DateTime RatedAt { get; set; } = DateTime.UtcNow;

    // Navigation
    public virtual FormulaLibraryItem FormulaLibraryItem { get; set; } = null!;
}
