Persist distribution board setup
This commit is contained in:
@@ -181,7 +181,14 @@ returns HTTP `409` with `PROJECT_HISTORY_OPERATION_UNAVAILABLE`.
|
||||
### Distribution Board Setup
|
||||
|
||||
- `POST /projects/:projectId/distribution-boards`
|
||||
- atomically creates the distribution board, its circuit list and all default circuit sections
|
||||
- body: `{ "name": "UV-02", "expectedRevision": 12 }`
|
||||
- executes `distribution-board.insert` with stable ids for the distribution
|
||||
board, its circuit list and all four default circuit sections
|
||||
- response:
|
||||
`{ "distributionBoard": { ... }, "revision": { ... }, "history": { ... } }`
|
||||
- persistent Undo removes only the unchanged and still-empty generated
|
||||
structure; Redo restores the same ids
|
||||
- stale revisions return `409 PROJECT_REVISION_CONFLICT`
|
||||
|
||||
### Tree Endpoint
|
||||
|
||||
|
||||
@@ -191,6 +191,13 @@ gespeicherten Projekt ab und schreibt Werte, Revision und Historienstapel
|
||||
gemeinsam. `PUT /api/projects/:projectId` verlangt deshalb
|
||||
`expectedRevision`, liefert Projekt plus aktualisierten Historienstand und
|
||||
besitzt keinen separaten direkten Settings-Schreibweg mehr.
|
||||
`distribution-board.insert` versioniert die Anlage einer Verteilung als einen
|
||||
vollständigen Block aus Verteilung, Stromkreisliste und vier Standardbereichen.
|
||||
Alle UUIDs entstehen vor dem Command und bleiben über Undo/Redo stabil.
|
||||
`distribution-board.delete` ist die persistierte Inverse und entfernt nur den
|
||||
vollständig unveränderten, weiterhin stromkreislosen Block. Controller und
|
||||
Projektseite übergeben die erwartete Projektrevision; der frühere direkte
|
||||
Controller-Schreibweg ist entfernt.
|
||||
|
||||
## Projektgeräte
|
||||
|
||||
|
||||
@@ -266,6 +266,10 @@ Completed foundation:
|
||||
- `project.update-settings` persists both project voltage defaults, its exact
|
||||
inverse, revision and history transition atomically; the project page and
|
||||
existing PUT route require the current expected revision
|
||||
- `distribution-board.insert` persists the complete generated board, circuit
|
||||
list and default-section structure with stable ids; its delete inverse
|
||||
refuses changed or populated structures and the project-page POST tracks the
|
||||
returned revision
|
||||
|
||||
Remaining constraints before completing project version history:
|
||||
|
||||
|
||||
@@ -448,6 +448,9 @@ Implemented foundation:
|
||||
- project voltage settings use `project.update-settings`; both values, inverse,
|
||||
revision and history transition commit atomically and the former direct
|
||||
settings write is removed
|
||||
- distribution-board setup uses `distribution-board.insert` with a complete
|
||||
stable board/list/default-section snapshot; Undo removes only an unchanged
|
||||
empty setup and the former direct controller write is removed
|
||||
- revision metadata, change-set payloads and the project counter are committed
|
||||
in one SQLite transaction
|
||||
- a stale expected revision produces no history writes
|
||||
|
||||
Reference in New Issue
Block a user