using System.ComponentModel.DataAnnotations;

namespace JobsMedical.Web.Models;

/// <summary>A کادر درمان's rating + review of a facility they worked with (1–5 stars + comment).
/// One review per user per facility. Shown immediately; an admin can hide/delete.</summary>
public class Review
{
    public int Id { get; set; }

    public int FacilityId { get; set; }
    public Facility Facility { get; set; } = null!;

    public int UserId { get; set; }
    public User User { get; set; } = null!;

    public int Stars { get; set; }                  // 1..5
    [MaxLength(1000)] public string? Comment { get; set; }

    public bool IsApproved { get; set; } = true;     // admin can hide
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}
