1
0
Fork 0
mirror of https://github.com/s-frick/effigenix.git synced 2026-03-28 16:19:35 +01:00

feat(production): Charge abschließen (CompleteBatch)

Batch.complete() mit Ist-Menge, Ausschuss und Bemerkungen.
Invarianten: nur IN_PRODUCTION→COMPLETED, mind. eine Consumption,
ActualQuantity > 0, Waste >= 0. Full Vertical Slice mit Domain Event
Stub (BatchCompleted), REST POST /api/batches/{id}/complete und
Liquibase-Migration für die neuen Spalten.
This commit is contained in:
Sebastian Frick 2026-02-23 13:35:30 +01:00
parent f63790c058
commit a08e4194ab
23 changed files with 1138 additions and 9 deletions

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<changeSet id="021-add-completion-fields-to-batches" author="effigenix">
<addColumn tableName="batches">
<column name="actual_quantity_amount" type="DECIMAL(19,6)"/>
<column name="actual_quantity_unit" type="VARCHAR(10)"/>
<column name="waste_amount" type="DECIMAL(19,6)"/>
<column name="waste_unit" type="VARCHAR(10)"/>
<column name="remarks" type="VARCHAR(500)"/>
<column name="completed_at" type="TIMESTAMPTZ"/>
</addColumn>
</changeSet>
</databaseChangeLog>

View file

@ -25,5 +25,6 @@
<include file="db/changelog/changes/018-add-article-id-to-recipes.xml"/>
<include file="db/changelog/changes/019-create-batch-consumptions-table.xml"/>
<include file="db/changelog/changes/020-add-version-to-batches.xml"/>
<include file="db/changelog/changes/021-add-completion-fields-to-batches.xml"/>
</databaseChangeLog>