# Labeling BC - Detailliertes Domain Model

**Bounded Context:** Labeling
**Domain Type:** CORE
**Verantwortung:** Automatische Berechnung von Nährwerten/Allergenen, Etikettengenerierung

## Aggregates

### ProductLabel (Aggregate Root)

```
ProductLabel
├── ProductLabelId
├── ArticleId - Reference to Master Data
├── RecipeId - Reference to Production BC (for auto-calculation)
├── ProductName
├── Manufacturer
├── Ingredients[] (Entity) - From Recipe, sorted descending by weight
├── Allergens[] (VO) - Auto-calculated from ingredients
├── TraceDeclarations[] (VO) - "May contain traces of..."
├── NutritionFacts (Entity) - Auto-calculated from recipe
│   ├── EnergyKJ, EnergyKcal, Fat, SaturatedFat, Carbs, Sugars, Protein, Salt
│   └── CalculationBase (PER_100G | PER_PORTION)
├── QualityLabels[] (VO) - Bio, Regional, Animal Welfare
├── OriginLabeling (VO)
└── LabelVersion

Invariants:
- All EU allergens must be declared
- Ingredients sorted by quantity (highest first) - EU regulation
- Nutrition facts must sum correctly from recipe
- If BIO label, all ingredients must be BIO-certified
- Allergens automatically inherited from ingredients (no manual override!)
```

## Use Cases

```java
GenerateLabelFromRecipe - Calculates nutrition & allergens from recipe
PrintLabelAtScale - Sends label to scale for printing with current weight
UpdateAllergenMatrix - Regenerates allergen matrix for all products
```
