X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/a7e41fefbf46ad5bfa2eb97dbd1cc11d3a28a354..f1143b5bcf508dcfe7f72e90faee72cf72a2392a:/src/messaging/states.py diff --git a/src/messaging/states.py b/src/messaging/states.py index 317be2170..36b5d05f1 100644 --- a/src/messaging/states.py +++ b/src/messaging/states.py @@ -41,10 +41,15 @@ class State: return ctx -class ClubMembershipExpiring(State): +class ClubSingle(State): + slug = 'club-single' + name = _('club one-time donors') + + +class ClubSingleExpired(State): slug = 'club-membership-expiring' allow_negative_offset = True - name = _('club membership expiring') + name = _('club one-time donors with donation expiring') def get_objects(self): from club.models import Schedule @@ -56,9 +61,10 @@ class ClubMembershipExpiring(State): def get_hashed_value(self, obj): return '%s:%s' % (obj.pk, obj.expires_at.isoformat()) -class ClubPaymentUnfinished(State): + +class ClubTried(State): slug = 'club-payment-unfinished' - name = _('club payment unfinished') + name = _('club would-be donors') def get_objects(self): from club.models import Schedule @@ -68,8 +74,31 @@ class ClubPaymentUnfinished(State): ) +class ClubRecurring(State): + slug = 'club-recurring' + name = _('club recurring donors') + + +class ClubRecurringExpired(State): + slug = 'club-recurring-payment-problem' + name = _('club recurring donors with donation expired') + + def get_objects(self): + from club.models import Schedule + return Schedule.objects.none() + + +class Cold(State): + slug = 'cold' + name = _('cold group') + + states = [ - ClubMembershipExpiring, - ClubPaymentUnfinished, + Cold, + ClubTried, + ClubSingle, + ClubSingleExpired, + ClubRecurring, + ClubRecurringExpired, ]