# 20260429080302_AddQuizResults.Designer

- File ID: file:1j2onoi:20260429080302-addquizresults-designer-cs
- Path: NexusReader.Data/Migrations/20260429080302_AddQuizResults.Designer.cs
- Role: database-config
- Layer: data

## Purpose

EF Core migration designer that defines the target database model (tables, columns, keys, indices, and relationships) for the AddQuizResults migration.

## Key Details

This auto-generated EF Core migration designer defines the QuizResults table and wiring to NexusUser, plus other identity and application tables; it configures columns, PKs, indices, and cascade-delete foreign keys for the PostgreSQL provider.

## Symbols

- AddQuizResults: EF Core migration designer that defines the target database model (tables, columns, keys, indices, and relationships) for the AddQuizResults migration.
- BuildTargetModel(): Constructs the EF Core model for the migration: declares entities, columns, keys, indexes, relationships, and Npgsql identity config.
- Ebook (entity mapping): Represents e-book metadata persisted in Ebooks table and linked to a NexusUser.
- NexusUser (entity mapping): Application user (extends IdentityUser) persisted in AspNetUsers with authentication/tenant and AI token tracking fields.
- QuizResult (entity mapping): Represents a completed quiz result persisted in QuizResults and linked to a NexusUser.
- SemanticKnowledgeCache (entity mapping): Caches semantic knowledge artifacts keyed by content hash for reuse (stored as JSON), persisted in SemanticKnowledgeCache.

## Dependencies

- imports NexusReader.Data/Persistence/AppDbContext.cs
- imports NexusReader.Domain/Entities/Ebook.cs
- imports NexusReader.Domain/Entities/NexusUser.cs
- imports NexusReader.Domain/Entities/QuizResult.cs
- imports NexusReader.Domain/Entities/SemanticKnowledgeCache.cs

## Calls

- No resolved calls.

## Coverage

- Symbols: 6
- Executable symbols: 1
- Executable symbols with control flow: 1
- Grounded edges: 11
- Unresolved references: 0
- Control-flow fragments: 1
- Unresolved jumps: 0
- Unsupported constructs: 0
- Control-flow coverage: 100%
- Required diagrams: 2
- Generated diagrams: 2

## Control Flow Fragments

- BuildTargetModel: 21 nodes, 20 edges, 0 jumps, 0 unsupported constructs

## Diagrams

### 20260429080302_AddQuizResults.Designer Neighborhood

```mermaid
flowchart LR
    class_9ftatg_addquizresults("AddQuizResults")
    file_1j2onoi_20260429080302_addquizresults_designer_cs("20260429080302_AddQuizResults.Designer")
    method_eacfb6_buildtargetmodel[["BuildTargetModel()"]]
    file_1d4ycw2_semanticknowledgecache_cs[/"SemanticKnowledgeCache"/]
    file_1pacvtg_appdbcontext_cs[/"AppDbContext"/]
    file_1wyr0y8_quizresult_cs[/"QuizResult"/]
    file_lcvwj6_ebook_cs[/"Ebook"/]
    file_xcxh5w_nexususer_cs[/"NexusUser"/]
    type_1agxbak_semanticknowledgecache_entity_mapping[/"SemanticKnowledgeCache (entity mapping)"/]
    type_1dtv9c0_nexususer_entity_mapping[/"NexusUser (entity mapping)"/]
    type_exuypx_ebook_entity_mapping[/"Ebook (entity mapping)"/]
    type_ffgofm_quizresult_entity_mapping[/"QuizResult (entity mapping)"/]
    file_1j2onoi_20260429080302_addquizresults_designer_cs -->|SemanticKnowledgeCache| file_1d4ycw2_semanticknowledgecache_cs
    file_1j2onoi_20260429080302_addquizresults_designer_cs -->|AppDbContext| file_1pacvtg_appdbcontext_cs
    file_1j2onoi_20260429080302_addquizresults_designer_cs -->|QuizResult| file_1wyr0y8_quizresult_cs
    file_1j2onoi_20260429080302_addquizresults_designer_cs -->|Ebook| file_lcvwj6_ebook_cs
    file_1j2onoi_20260429080302_addquizresults_designer_cs -->|NexusUser| file_xcxh5w_nexususer_cs
```

### 20260429080302_AddQuizResults.Designer Execution Overview

```mermaid
flowchart TD
    class_9ftatg_addquizresults("AddQuizResults")
    method_eacfb6_buildtargetmodel[["BuildTargetModel()"]]
    class_9ftatg_addquizresults -->|contains| method_eacfb6_buildtargetmodel
```

## Diagram Validation

- Status: pass
