mirror of
https://github.com/s-frick/effigenix.git
synced 2026-03-28 18:49:59 +01:00
feat(inventory): StorageLocation Aggregate implementieren (#1)
Vertikaler Slice für Story 1.1 – Lagerort anlegen: Domain: StorageLocation Aggregate mit VOs (StorageLocationId, StorageLocationName, StorageType, TemperatureRange), StorageLocationError (sealed interface), Draft-Records und Repository Interface. Application: CreateStorageLocation UseCase mit Uniqueness-Check. Infrastructure: JPA Entity, Mapper, Repository, REST Controller (POST /api/inventory/storage-locations), Liquibase Migration (009), InventoryErrorHttpStatusMapper, InventoryUseCaseConfiguration. Tests: 28 Domain-Unit-Tests, 11 Integration-Tests. Closes #1
This commit is contained in:
parent
554185a012
commit
c474388f32
25 changed files with 1527 additions and 0 deletions
|
|
@ -0,0 +1,41 @@
|
|||
<?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="009-create-storage-locations-table" author="effigenix">
|
||||
<createTable tableName="storage_locations">
|
||||
<column name="id" type="VARCHAR(36)">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="name" type="VARCHAR(100)">
|
||||
<constraints nullable="false" unique="true"/>
|
||||
</column>
|
||||
<column name="storage_type" type="VARCHAR(30)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="min_temperature" type="DECIMAL(5,1)"/>
|
||||
<column name="max_temperature" type="DECIMAL(5,1)"/>
|
||||
<column name="active" type="BOOLEAN" defaultValueBoolean="true">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
<sql>
|
||||
ALTER TABLE storage_locations ADD CONSTRAINT chk_storage_type CHECK (storage_type IN (
|
||||
'COLD_ROOM', 'FREEZER', 'DRY_STORAGE', 'DISPLAY_COUNTER', 'PRODUCTION_AREA'
|
||||
));
|
||||
</sql>
|
||||
<createIndex tableName="storage_locations" indexName="idx_storage_locations_name">
|
||||
<column name="name"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="storage_locations" indexName="idx_storage_locations_type">
|
||||
<column name="storage_type"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="storage_locations" indexName="idx_storage_locations_active">
|
||||
<column name="active"/>
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
|
@ -13,5 +13,6 @@
|
|||
<include file="db/changelog/changes/006-create-supplier-schema.xml"/>
|
||||
<include file="db/changelog/changes/007-create-customer-schema.xml"/>
|
||||
<include file="db/changelog/changes/008-add-masterdata-permissions.xml"/>
|
||||
<include file="db/changelog/changes/009-create-storage-location-schema.xml"/>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue