The usage should not only be a simple integer field that displays how many times a code has been used, but should also include a transactional log. It makes it possible to keep track on how codes are used, when they are used and other useful data.
I imagine that the data that would be logged could be something like
log_id, message, coupon_id, order_id, change
records in the transaction log could be something like:
1, "Code used by rule FOO on checkout", 1, 1, +1
...
14, "Reset usage count for special promotion deal", 1, NULL, -13
Comments
Comment #1
bojanz commentedUsage needs to be rewritten completely in any case...
Comment #2
bojanz commentedWe now have the Commerce 2.x implementation (PromotionUsage) that we can backport.