using MongoDB.Bson; using MongoDB.Bson.Serialization.Attributes; namespace QuestionsApi.Models; public class UserRating { [BsonId] [BsonRepresentation(BsonType.ObjectId)] public string? Id { get; set; } public string UserId { get; set; } = ""; public int OverallElo { get; set; } = 1000; public Dictionary CategoryElos { get; set; } = []; public int RatedQuestionCount { get; set; } public int? HistoryBaselineElo { get; set; } public DateTime? HistoryStartedUtc { get; set; } public DateTime UpdatedUtc { get; set; } = DateTime.UtcNow; } public class QuestionRating { [BsonId] [BsonRepresentation(BsonType.ObjectId)] public string? Id { get; set; } public string QuestionExternalId { get; set; } = ""; public int Elo { get; set; } = 1000; public int AttemptCount { get; set; } public DateTime UpdatedUtc { get; set; } = DateTime.UtcNow; } public class RatingChangeResponse { public bool Rated { get; set; } public string Category { get; set; } = ""; public int UserOverallElo { get; set; } public int UserOverallDelta { get; set; } public int UserCategoryElo { get; set; } public int UserCategoryDelta { get; set; } public int QuestionElo { get; set; } public int QuestionEloDelta { get; set; } } public class RatingProfileResponse { public int OverallElo { get; set; } public int RatedQuestionCount { get; set; } public Dictionary CategoryElos { get; set; } = []; }