feat: implement identity authentication, authorization policies, and MAUI platform support with Docker orchestration
This commit is contained in:
@@ -31,4 +31,9 @@ public class NexusUser : IdentityUser
|
||||
/// Collection of e-books owned by the user.
|
||||
/// </summary>
|
||||
public ICollection<Ebook> Ebooks { get; set; } = new List<Ebook>();
|
||||
|
||||
/// <summary>
|
||||
/// Collection of quiz results completed by the user.
|
||||
/// </summary>
|
||||
public ICollection<QuizResult> QuizResults { get; set; } = new List<QuizResult>();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -5,7 +5,7 @@ namespace NexusReader.Domain.Entities;
|
||||
public class SemanticKnowledgeCache
|
||||
{
|
||||
[Key]
|
||||
[MaxLength(64)]
|
||||
[MaxLength(128)]
|
||||
public string ContentHash { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user