{"path":"NexusReader.Domain/Entities/KnowledgeUnit.cs","purpose":"Defines the domain entity KnowledgeUnit representing a unit of extracted/ingested knowledge (content, type, metadata, links) stored per tenant with EF Core mapping attributes.","classification":{"role":"entity","layer":"domain","confidence":0.9,"evidence":["Domain/entity pattern","Domain path heuristic","Namespace NexusReader.Domain.Entities","Class decorated with [Key], [Required], [ForeignKey] attributes","Contains navigation properties (Ebook, IncomingLinks, OutgoingLinks)"]},"className":"KnowledgeUnit","methods":[],"types":[{"name":"KnowledgeUnit","kind":"entity","line":7,"purpose":"Represents a stored piece of knowledge (content + type + metadata) with tenant scoping and links to other KnowledgeUnits and an optional Ebook.","fields":[{"name":"Id","type":"string","required":true,"line":9,"description":"Primary key; max length 128. Comment: Hash(Source + Content + Version). Initialized to empty string."},{"name":"EbookId","type":"Guid?","required":false,"line":13,"description":"Optional FK to an Ebook entity (nullable GUID)."},{"name":"Ebook","type":"Ebook?","required":false,"line":15,"description":"Virtual navigation property for the related Ebook (ForeignKey on EbookId)."},{"name":"Version","type":"string","required":true,"line":18,"description":"Version string (Required, MaxLength 50). Default '1.0'."},{"name":"Type","type":"KnowledgeUnitType","required":true,"line":22,"description":"Required enum indicating the kind of knowledge unit (referenced from NexusReader.Domain.Enums)."},{"name":"Content","type":"string","required":true,"line":25,"description":"Required textual content of the knowledge unit."},{"name":"MetadataJson","type":"string?","required":false,"line":28,"description":"Optional JSON blob for extra metadata (e.g. { \"page\": 1, \"path\": \"Chapter 1 > Intro\" })."},{"name":"TenantId","type":"string","required":true,"line":30,"description":"Tenant identifier (Required, MaxLength 128)."},{"name":"CreatedAt","type":"DateTime","required":true,"line":34,"description":"Timestamp of creation; defaulted to DateTime.UtcNow."},{"name":"OutgoingLinks","type":"ICollection<KnowledgeUnitLink>","required":true,"line":37,"description":"Navigation collection of outgoing KnowledgeUnitLink relationships; initialized to empty List."},{"name":"IncomingLinks","type":"ICollection<KnowledgeUnitLink>","required":true,"line":38,"description":"Navigation collection of incoming KnowledgeUnitLink relationships; initialized to empty List."}]}],"serviceRegistrations":[],"startupActions":[],"dependencies":["NexusReader.Domain/Entities/Ebook.cs","NexusReader.Domain/Entities/KnowledgeUnitLink.cs","NexusReader.Domain/Enums/KnowledgeUnitType.cs"],"patterns":["Entity","EF Core (Data Annotations)","Navigation Properties"],"domainConcepts":["KnowledgeUnit","Ebook","KnowledgeUnitLink","Tenant"],"keyDetails":"Primary key Id is intended as a content hash (comment). CreatedAt defaults to UTC now. Uses EF Core data annotations for schema (Key, Required, MaxLength, ForeignKey). Navigation properties are initialized to avoid null collections.","orchestrationMethods":[],"typedContracts":[{"name":"KnowledgeUnit","kind":"entity","line":7,"fieldCount":11,"evidencePaths":["NexusReader.Domain/Entities/KnowledgeUnit.cs"]}],"persistenceInteractions":[],"externalInteractions":[],"evidenceAnchors":[{"kind":"typed-contract","label":"KnowledgeUnit","line":7,"summary":"entity with 11 fields.","confidence":0.8,"evidencePaths":["NexusReader.Domain/Entities/KnowledgeUnit.cs"]}],"cacheMetadata":{"schemaVersion":2,"analysisVersion":"2026-05-23.cache-v1","contentChecksum":"77eaacf204f8463e27f597c5ce709a15a2d3cc062d4032bdeb359d6b3d96d0f9","sourceByteSize":1186,"analyzedAt":"2026-05-23T16:20:18.493Z","technology":"dotnet"}}