Files
hamkadr/src/JobsMedical.Web/Models/Review.cs
T
soroush.asadi d87afb577c [Facilities] Public facility pages + ratings & reviews
New /Facilities/Details public page: verified badge, info, Neshan map + directions, the facility's open shifts & jobs, and a complaint form; facility cards on /Facilities link to it. Ratings & reviews: Review model (1-5 stars + comment, one per user/facility, unique index, migration); logged-in users rate/review on the facility page; average + count shown in the header and the review list; admins moderate (hide/delete) at /Admin/Reviews.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 07:44:25 +03:30

23 lines
768 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.ComponentModel.DataAnnotations;
namespace JobsMedical.Web.Models;
/// <summary>A کادر درمان's rating + review of a facility they worked with (15 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;
}