# AppDbContextModelSnapshot

- File ID: file:1yttr8x:appdbcontextmodelsnapshot-cs
- Path: NexusReader.Data/Migrations/AppDbContextModelSnapshot.cs
- Role: database-config
- Layer: data

## Purpose

EF Core model snapshot that records the database model (entities, properties, indexes, relationships, and seed data) for AppDbContext so migrations can compare model changes at runtime.

## Key Details

Contains full schema mapping (properties, types, max lengths, indexes, relationships) plus seed data for SubscriptionPlan (4 entries). The snapshot enables migrations to detect model changes; it's a generated, data-layer artifact and not runtime business logic.

## Symbols

- AppDbContextModelSnapshot: EF Core model snapshot that records the database model (entities, properties, indexes, relationships, and seed data) for AppDbContext so migrations can compare model changes at runtime.
- BuildModel(): Populates the provided ModelBuilder with the full EF Core model: annotations, extensions, entity/property definitions, indexes, relationships, navigations, and seed data used by migrations.
- AppDbContextModelSnapshot: Generated EF Core ModelSnapshot class that captures the compiled model for AppDbContext used by the migrations system.

## Dependencies

- imports NexusReader.Data/Persistence/AppDbContext.cs
- imports NexusReader.Domain/Entities/Author.cs
- imports NexusReader.Domain/Entities/Ebook.cs
- imports NexusReader.Domain/Entities/KnowledgeUnit.cs
- imports NexusReader.Domain/Entities/KnowledgeUnitLink.cs
- imports NexusReader.Domain/Entities/NexusUser.cs
- imports NexusReader.Domain/Entities/QuizResult.cs
- imports NexusReader.Domain/Entities/SemanticKnowledgeCache.cs
- imports NexusReader.Domain/Entities/SubscriptionPlan.cs

## Calls

- No resolved calls.

## Coverage

- Symbols: 3
- Executable symbols: 1
- Executable symbols with control flow: 1
- Grounded edges: 12
- 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

- BuildModel: 31 nodes, 30 edges, 0 jumps, 0 unsupported constructs

## Diagrams

### AppDbContextModelSnapshot Neighborhood

_Warnings: diagram file_1yttr8x_appdbcontextmodelsnapshot_cs_neighborhood_view exceeds preferred complexity thresholds (13 nodes, 9 edges)._

```mermaid
---
config:
  flowchart:
    defaultRenderer: "elk"
---
flowchart LR
    class_1v2rkom_appdbcontextmodelsnapshot("AppDbContextModelSnapshot")
    file_1yttr8x_appdbcontextmodelsnapshot_cs("AppDbContextModelSnapshot")
    method_1nrn8uy_buildmodel[["BuildModel()"]]
    file_1b03oou_subscriptionplan_cs[/"SubscriptionPlan"/]
    file_1d4ycw2_semanticknowledgecache_cs[/"SemanticKnowledgeCache"/]
    file_1m6x5qy_knowledgeunitlink_cs[/"KnowledgeUnitLink"/]
    file_1pacvtg_appdbcontext_cs[/"AppDbContext"/]
    file_1wyr0y8_quizresult_cs[/"QuizResult"/]
    file_1y56eud_author_cs[/"Author"/]
    file_h6a0xu_knowledgeunit_cs[/"KnowledgeUnit"/]
    file_lcvwj6_ebook_cs[/"Ebook"/]
    file_xcxh5w_nexususer_cs[/"NexusUser"/]
    type_11t8gjy_appdbcontextmodelsnapshot[/"AppDbContextModelSnapshot"/]
    file_1yttr8x_appdbcontextmodelsnapshot_cs -->|SubscriptionPlan| file_1b03oou_subscriptionplan_cs
    file_1yttr8x_appdbcontextmodelsnapshot_cs -->|SemanticKnowledgeCache| file_1d4ycw2_semanticknowledgecache_cs
    file_1yttr8x_appdbcontextmodelsnapshot_cs -->|KnowledgeUnitLink| file_1m6x5qy_knowledgeunitlink_cs
    file_1yttr8x_appdbcontextmodelsnapshot_cs -->|AppDbContext| file_1pacvtg_appdbcontext_cs
    file_1yttr8x_appdbcontextmodelsnapshot_cs -->|QuizResult| file_1wyr0y8_quizresult_cs
    file_1yttr8x_appdbcontextmodelsnapshot_cs -->|Author| file_1y56eud_author_cs
    file_1yttr8x_appdbcontextmodelsnapshot_cs -->|KnowledgeUnit| file_h6a0xu_knowledgeunit_cs
    file_1yttr8x_appdbcontextmodelsnapshot_cs -->|Ebook| file_lcvwj6_ebook_cs
    file_1yttr8x_appdbcontextmodelsnapshot_cs -->|NexusUser| file_xcxh5w_nexususer_cs
```

### AppDbContextModelSnapshot Execution Overview

```mermaid
flowchart TD
    class_1v2rkom_appdbcontextmodelsnapshot("AppDbContextModelSnapshot")
    method_1nrn8uy_buildmodel[["BuildModel()"]]
    class_1v2rkom_appdbcontextmodelsnapshot -->|contains| method_1nrn8uy_buildmodel
```

## Diagram Validation

- Status: warn
- Warning: neighborhood-view: diagram file_1yttr8x_appdbcontextmodelsnapshot_cs_neighborhood_view exceeds preferred complexity thresholds (13 nodes, 9 edges).
