omnivore/packages/api-nest/src/label
Timothy Atapagra 1ca8d2a448 feat(api): ARC-008 Labels System - backend entities and migrations
Add comprehensive label system with entities, migrations and denormalized label_names column:

**Database Changes:**
- Migration 0191: Fix labels.updated_at default to NOW()
- Add Label and EntityLabel entities for label management
- Add denormalized label_names array column to library_item for efficient filtering

**Entity Updates:**
- LibraryItemEntity: Add label_names column (PostgreSQL array type)
- Label entity: User labels with name, color, description
- EntityLabel entity: Junction table for library_item ↔ label relationship

**Architecture:**
- Dual-column approach: junction table for relationships + denormalized array for fast filtering
- PostgreSQL array overlap operator (&&) enables efficient label-based queries
- Automatic sync of label_names when labels are attached/detached

Implements ARC-008 Labels System (backend foundation)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 13:10:32 -04:00
..
dto feat(api): ARC-008 Labels System - backend entities and migrations 2025-10-09 13:10:32 -04:00
entities feat(api): ARC-008 Labels System - backend entities and migrations 2025-10-09 13:10:32 -04:00
label.module.ts feat(api): ARC-008 Labels System - backend entities and migrations 2025-10-09 13:10:32 -04:00
label.resolver.ts feat(api): ARC-008 Labels System - backend entities and migrations 2025-10-09 13:10:32 -04:00
label.service.ts feat(api): ARC-008 Labels System - backend entities and migrations 2025-10-09 13:10:32 -04:00