mirror of
https://github.com/s-frick/effigenix.git
synced 2026-03-28 18:49:59 +01:00
feat(production): Produktionsschritte zum Rezept verwalten + AuthorizationPort
Erweitert das Recipe-Aggregate um ProductionStep-Child-Entities (Add/Remove) mit vollständiger DDD-Konformität. Führt AuthorizationPort-Prüfung in allen Production Use Cases ein (analog zum usermanagement-Referenz-BC). Fixes: Request-Validierung (Size, Min/Max), Error-Code-Konsistenz, Defense-in-Depth für durationMinutes und temperatureCelsius.
This commit is contained in:
parent
c26d72fbe7
commit
cf93b847e5
27 changed files with 978 additions and 18 deletions
|
|
@ -0,0 +1,39 @@
|
|||
<?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="012-create-recipe-production-steps-table" author="effigenix">
|
||||
<createTable tableName="recipe_production_steps">
|
||||
<column name="id" type="VARCHAR(36)">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="recipe_id" type="VARCHAR(36)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="step_number" type="INT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="description" type="VARCHAR(500)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="duration_minutes" type="INT"/>
|
||||
<column name="temperature_celsius" type="INT"/>
|
||||
</createTable>
|
||||
|
||||
<addForeignKeyConstraint baseTableName="recipe_production_steps" baseColumnNames="recipe_id"
|
||||
referencedTableName="recipes" referencedColumnNames="id"
|
||||
constraintName="fk_recipe_production_steps_recipe"
|
||||
onDelete="CASCADE"/>
|
||||
|
||||
<addUniqueConstraint tableName="recipe_production_steps" columnNames="recipe_id, step_number"
|
||||
constraintName="uq_recipe_step_number"/>
|
||||
|
||||
<createIndex tableName="recipe_production_steps" indexName="idx_recipe_production_steps_recipe_id">
|
||||
<column name="recipe_id"/>
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
|
@ -16,5 +16,6 @@
|
|||
<include file="db/changelog/changes/009-create-storage-location-schema.xml"/>
|
||||
<include file="db/changelog/changes/010-create-recipe-schema.xml"/>
|
||||
<include file="db/changelog/changes/011-create-recipe-ingredients-table.xml"/>
|
||||
<include file="db/changelog/changes/012-create-recipe-production-steps-table.xml"/>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue