Files
step3/api/QuestionsApi/Models/DashboardModels.cs
T

96 lines
3.5 KiB
C#

namespace QuestionsApi.Models;
public sealed class DashboardResponse
{
public int QuestionBankRating { get; set; } = 1000;
public int RatedQuestionCount { get; set; }
public int CcsRating { get; set; } = 1000;
public int RatedCcsCaseCount { get; set; }
public int QuestionsCompleted { get; set; }
public int CcsCasesCompleted { get; set; }
public int FirstAttemptAccuracy { get; set; }
public int AccuracySampleSize { get; set; }
public int? AccuracyDeltaVsPreviousSample { get; set; }
public int? QuestionBankRatingDeltaThisWeek { get; set; }
public int? QuestionBankPercentile { get; set; }
public int? CcsRatingDeltaThisWeek { get; set; }
public int? CcsPercentile { get; set; }
public string? ExamReadinessLabel { get; set; }
public int? ExamReadinessProjectedPassPercent { get; set; }
public int QuestionsThisWeek { get; set; }
public int StudyTimeSecondsThisWeek { get; set; }
public int CurrentStreak { get; set; }
public int MissedQuestionCount { get; set; }
public int DynamicReviewsDue { get; set; }
public int BookmarkCount { get; set; }
public int NoteCount { get; set; }
public int FlashcardsDue { get; set; }
public int FlashcardsNewAvailable { get; set; }
public int FlashcardsReviewedThisWeek { get; set; }
public List<DashboardTrendPoint> PerformanceTrend { get; set; } = [];
public List<DashboardSystemPerformance> Systems { get; set; } = [];
public List<DashboardActivityDay> WeeklyActivity { get; set; } = [];
public List<DashboardRecentActivity> RecentActivity { get; set; } = [];
}
public sealed class DashboardTrendPoint
{
public DateTime DateUtc { get; set; }
public int Correct { get; set; }
public int Total { get; set; }
public int Accuracy { get; set; }
public int? QuestionBankRating { get; set; }
public int? CcsRating { get; set; }
}
public sealed class DashboardSystemPerformance
{
public string System { get; set; } = "General";
public int Correct { get; set; }
public int Total { get; set; }
public int Accuracy { get; set; }
public int MasteryScore { get; set; }
public string MasteryState { get; set; } = MasteryStates.Unseen;
public int DistinctQuestions { get; set; }
public int Difficulty4PlusSuccessful { get; set; }
public int PendingReviews { get; set; }
public DateTime? LastEvidenceUtc { get; set; }
public bool RefreshDue { get; set; }
public DashboardMasteryAction RecommendedAction { get; set; } = new();
}
public static class MasteryStates
{
public const string Unseen = "unseen";
public const string Learning = "learning";
public const string Practicing = "practicing";
public const string Strong = "strong";
public const string Mastered = "mastered";
}
public sealed class DashboardMasteryAction
{
public string Type { get; set; } = "practice";
public string Label { get; set; } = "Start learning";
public int QuestionCount { get; set; } = 10;
public int? DifficultyMin { get; set; }
public int? DifficultyMax { get; set; }
}
public sealed class DashboardActivityDay
{
public DateTime DateUtc { get; set; }
public int Questions { get; set; }
public int CcsCases { get; set; }
public int StudyTimeSeconds { get; set; }
}
public sealed class DashboardRecentActivity
{
public string Type { get; set; } = "question";
public string Title { get; set; } = "";
public string Detail { get; set; } = "";
public DateTime OccurredUtc { get; set; }
public string Route { get; set; } = "";
}