using MongoDB.Bson.Serialization.Attributes; namespace BCards.Web.Models; public class PageAnalytics { [BsonElement("totalViews")] public int TotalViews { get; set; } = 0; [BsonElement("totalClicks")] public int TotalClicks { get; set; } = 0; [BsonElement("lastViewedAt")] public DateTime? LastViewedAt { get; set; } [BsonElement("monthlyViews")] public Dictionary MonthlyViews { get; set; } = new(); // "2024-01" -> count [BsonElement("monthlyClicks")] public Dictionary MonthlyClicks { get; set; } = new(); [BsonElement("topReferrers")] public Dictionary TopReferrers { get; set; } = new(); [BsonElement("deviceStats")] public Dictionary DeviceStats { get; set; } = new(); // mobile, desktop, tablet [BsonElement("countryStats")] public Dictionary CountryStats { get; set; } = new(); }