feat: implement identity authentication, authorization policies, and MAUI platform support with Docker orchestration
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace NexusReader.Domain.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Tracks the result of an AI-generated quiz completed by a user.
|
||||
/// </summary>
|
||||
public class QuizResult
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
[Required]
|
||||
public string UserId { get; set; } = string.Empty;
|
||||
|
||||
[ForeignKey(nameof(UserId))]
|
||||
public NexusUser? User { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Topic { get; set; } = string.Empty;
|
||||
|
||||
public int Score { get; set; }
|
||||
|
||||
public int TotalQuestions { get; set; }
|
||||
|
||||
public double Percentage => TotalQuestions > 0 ? (double)Score / TotalQuestions * 100 : 0;
|
||||
|
||||
public DateTime CompletedDate { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
Reference in New Issue
Block a user