Teamprojekt-Lagersystem / Lagersystem-Backend

In this repository the backend of the warehouse application is being developed.
0 stars 0 forks source link

Expand exposed db by adding depot #15

Closed Neoyx closed 1 week ago

Neoyx commented 2 weeks ago

Add depot to the database which embeds different storages with spaces.

Neoyx commented 1 week ago

In the DepotEntity.toDepot() function, a depot is retrieved from a database depot object. I implemented a transaction, which fetches every storage where the depotId is equal to the id of the depot. These storages are then stored in a MutableList "storages" inside the depot.

Remark: Every storage of the depot is part of the list, not only the root storages. So also their childs are included. Is this as demanded?

Neoyx commented 1 week ago

==> Decided to replace depot by storage. The highest storage in the hierarchy with no parentId is then specified as the "depot".