<!-- Parent: ../AGENTS.md -->
<!-- Generated: 2026-07-02 | Updated: 2026-07-02 -->

# Enum

## Purpose
String-backed PHP enums used as Doctrine column types and for French display labels. They centralize all status/type vocabularies for orders, products, deliveries, payments, and users.

## Key Files
| File | Values / Role |
|------|---------------|
| `CommandeState.php` | Order lifecycle: `received`, `shipped`, `waiting`, `delivered`, `canceled`, `refused`, `pending` (added later for awaiting-payment). Has `label()` → French text |
| `PaymentCommandeStatus.php` | Payment status of an order |
| `ProductState.php` | Product internal state |
| `ProductStateShop.php` | Product shop-facing (visibility) state |
| `ProductType.php` | Product type classification |
| `ProductVariante.php` | Product variant |
| `LivraisonType.php` | Delivery method/type |
| `LivraisonVisibility.php` | Delivery option visibility |
| `AdminStatus.php` | Admin account status |
| `UserStatus.php` | Client account status (e.g. active/pending activation) |

## For AI Agents

### Working In This Directory
- These are **string-backed enums** (`enum X: string`). The backing value is persisted to the DB — do not rename existing case values without a data migration.
- Add new statuses as new cases and extend the `match` in `label()` (PHP will error on a non-exhaustive match, which is the intended safety net).
- `CommandeState` order transitions are enforced in controllers, not in the enum — see `src/Controller/`.

### Common Patterns
- `label(): string` returns French UI text via `match($this)`.

## Dependencies

### Internal
- Consumed by `src/Entity/` (column types), `src/Controller/` (transitions), and templates (labels).

<!-- MANUAL: -->
