using System.ComponentModel.DataAnnotations;
namespace JobsMedical.Web.Models;
///
/// An anonymous visitor, identified by a cookie before they ever log in. This lets us track
/// interest and personalize from the very first visit; once the person logs in we link the
/// Visitor to their and keep all the behavioral history.
///
public class Visitor
{
[MaxLength(36)]
public string Id { get; set; } = ""; // GUID string stored in the hk_vid cookie
public int? UserId { get; set; } // set after login (history carries over)
public User? User { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime LastSeenAt { get; set; } = DateTime.UtcNow;
public UserPreferences? Preferences { get; set; }
public ICollection Events { get; set; } = new List();
}