namespace JobsMedical.Web.Models;

/// <summary>
/// A logged-in user's «پسندیدن» of a listing (shift / job / talent). One row per (user, listing);
/// toggling removes it. Polymorphic by <see cref="TargetType"/> + <see cref="TargetId"/> so one table
/// covers all three listing kinds. The count of rows for a target is the public "likes" number.
/// </summary>
public class Like
{
    public int Id { get; set; }

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

    public LikeTargetType TargetType { get; set; }
    public int TargetId { get; set; }

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