Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
backend ruleP1universalStack: universal
data-modellingcorrectnesstimestampsaggregation
Persist each record's own timestamp, not a batch-wide date
When processing many items in one run, write each item's real timestamp rather than a shared run/day-level date that loses time-of-day.
PR: vinify-backend · org-mining-deep-2026-06Created: Jun 17, 2026
Bad example
Old codetypescript
| 1 | for (const receipt of receipts) save({ date: previousDay }); // same midnight |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | for (const receipt of receipts) save({ date: receipt.timestamp }); |
Explanation (EN)
Objašnjenje (HR)