io7m-com / cardant

Inventory system
https://www.io7m.com/software/cardant
ISC License
0 stars 0 forks source link

Stock API #109

Open io7m opened 3 weeks ago

io7m commented 3 weeks ago

The Item structure contains count values, one of which is unused.

Provide better APIs to ask questions about which items are in a location. We already have all the database functionality, and many existing types that can answer these questions, but the API isn't really there.

Stock queries:

sealed interface StockOccurrence record StockOccurrenceSet(Location location, ItemSummary item, long count) record StockOccurrenceSerial(Location location, ItemSummary item, String serial)

enum StockOccurrenceKind { SET, SERIAL } anyOccurrence :: Set anyOccurrence = Set(SET, SERIAL)

stockInLocationsCount : LocationMatch -> ItemMatch -> Set -> Long stockInLocations : LocationMatch -> ItemMatch -> Set -> List<Page>



Item repositing would be moved to stock repositing.
io7m commented 2 weeks ago

Wants #111