Nick SzaunigandClaude Sonnet 5 b208f52fd1 fix: reject negative weights/quantities and out-of-range percentages
None of these numeric business fields had a lower bound, so a
negative honey weight, jar count, feeding amount, mite count, or
stock quantity was silently accepted - each would corrupt whatever
total or statistic it later feeds into. Added @Min(0):

- Harvest: honeySuperCount, grossWeight, netWeight
- HoneyBatch: amount (+ @Max(100) on waterContent, a percentage)
- HoneyMeasurement: waterContent (+ @Max(100))
- Feeding: amount
- Extraction: amount (+ @Max(100) on waterContent)
- StockItem: quantity, minThreshold
- VarroaMeasurement: durationMinutes, miteCount, calculatedValue

Left temperature fields alone (extraction, inspection) - genuinely
can be negative (winter inspections, outdoor storage) and no
confident domain bound exists to apply instead. Update DTOs for these
entities all extend PartialType(PickType(Create...Dto, [...])) from
@nestjs/swagger, which preserves validation decorators, so no
separate change was needed there.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-09 11:05:13 +02:00
2026-08-27 08:32:47 +02:00
2026-08-27 08:32:47 +02:00
S
Description
ApiCore - Imkereidokumentationssoftware
https://apicore.encry.de/
7.6 MiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 98.5%
JavaScript 0.8%
Python 0.3%
CSS 0.2%
PLpgSQL 0.1%