feat(resources): capacidad, ocupación y fuente oficial del punto - #436
Merged
Conversation
Añade 4 campos nuevos al agregado Resource (nullable), fijables al registrar y editables después, y expuestos en la vista pública: - capacity / occupancy (aforo y ocupación del refugio) - sourceOrganisation / sourceUrl (organismo oficial + enlace de la fuente, distinto de `provenance` que es para ingesta externa) Migración 0059. Vertical completa: dominio (register/edit/snapshot), DTOs (Register/Edit), vista pública (ResourceView/ResourceViewDto), repositorio (insert + upsert set + mapeadores) y api-client regenerado.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qué
Añade al agregado
Resourcecuatro campos nuevos (todos nullable), fijables al registrar y editables después víaPATCH /resources/:id, y expuestos en la vista pública:capacity/occupancy— aforo total y ocupación actual del refugio.sourceOrganisation/sourceUrl— organismo oficial que publica el dato y enlace a la fuente (distinto deprovenance, ingesta externa).Sale de la carga de refugios de los incendios: los MD de SITREM traían aforo, ocupación y fuente oficial que acababan como texto libre en
description.Cambios
0059_resource_capacity_source.sql.register/fromSnapshot/edit/toSnapshot; números sin trim, source con trim y vacío→null).register-resource/edit-resource(comandos + diff de auditoría).ingest-external-resources: preserva los 4 en update,nullen insert.RegisterResourceDto,EditResourceDto) y vista pública (ResourceView+ResourceViewDto).insertysetdel upsert.packages/api-client/src/schema.tsregenerado.Gate
nest build✅ · eslint/prettier ✅ · 1635 tests ✅.Nota
Reemplaza a #435 (se cerró sola al mergear #434 y borrarse su rama base). Ya rebasada sobre
main; el diff es solo el enriquecimiento.