I'm creating an application in which people meet certain criteria to receive a payout at certain milestones. In order to earn these milestones, users will record activity in a log, and when they have recorded a certain number of activities, an administrator user is notified to confirm and authorize their payout.
Currently, we're planning to create a record associating a person to a milestone whenever someone saves the qualifying activity, and take it away on a change to that total.
I've got about 100 or so of these milestones. Their requirements are always X number of Y activity.
Since i have such a large number of milestones, what's the best way to approach checking each of these without a massive For loop or nest of 'if' statements?