LixFile =
LixFileDescriptor& {data:Uint8Array;path:string; }
Complete file type combining the descriptor with materialized data.
Uses "Lix" prefix to avoid collision with JavaScript's built-in File type.
IMPORTANT: File views are projections over multiple entities, not just the file descriptor. However, they expose schema_key as 'lix_file_descriptor' to maintain foreign key integrity.
┌─────────────────────────────────────────────────────────────┐
│ File View │
│ (schema_key: 'lix_file_descriptor') │
│ │
│ ┌─────────────────────────┐ ┌─────────────────────────┐ │
│ │ File Descriptor │ │ Plugin Entities │ │
│ │ (lix_file_descriptor) │ │ │ │
│ ├─────────────────────────┤ ├─────────────────────────┤ │
│ │ • id │ │ • JSON properties │ │
│ │ • path │ + │ • Markdown blocks │ │
│ │ • metadata │ │ • CSV rows │ │
│ │ • hidden │ │ • Future: thumbnails │ │
│ └─────────────────────────┘ └─────────────────────────┘ │
│ ↓ ↓ │
│ ┌─────────────────────────────────┐ │
│ │ Materialized as LixFile │ │
│ │ • All descriptor fields │ │
│ │ • data: Uint8Array (from │ │
│ │ plugin entities) │ │
│ └─────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘This projection approach means:
data:
Uint8Array
path:
string