first commit
This commit is contained in:
24
libs/api/shared/domain/README.md
Normal file
24
libs/api/shared/domain/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# api-shared-domain
|
||||
|
||||
Piezas de dominio comunes a todos los contextos de la API.
|
||||
|
||||
- **Import**: `@task-stream/api/shared/domain`
|
||||
- **Capa**: `domain` · **Tags**: `scope:api-shared`, `type:domain`
|
||||
|
||||
## Contenido
|
||||
|
||||
- `VersionedAggregateRoot`: extiende el `AggregateRoot` de `@nestjs/cqrs` con la versión (`loadFromHistory`, `commitAndWait`, `trackCommit`).
|
||||
- `Version`, `SerializableEvent`, `DomainEvent` (actor, fecha y `aggregateVersion`), `newId()`.
|
||||
- `EventClsRegistry` y `@AutowiredEvent`: registro de las clases de evento para deserializarlas.
|
||||
- Errores de dominio: `NotFoundError`, `ForbiddenError`, `ValidationError`, `BusinessRuleError`, `ConcurrencyError` y `assertThat`.
|
||||
|
||||
Event sourcing: [Arquitectura](../../../../docs/02-arquitectura.md#escritura-event-sourcing-en-postgresql).
|
||||
|
||||
## Comandos
|
||||
|
||||
```sh
|
||||
npx nx lint api-shared-domain
|
||||
npx nx test api-shared-domain # Jest
|
||||
```
|
||||
|
||||
Reglas de dependencia entre capas: [Arquitectura](../../../../docs/02-arquitectura.md#21-capas-hexagonales).
|
||||
Reference in New Issue
Block a user