end of day
This commit is contained in:
parent
8f206269fa
commit
3d55d4eba3
1 changed files with 4 additions and 4 deletions
|
|
@ -15,10 +15,8 @@ class EventQuerySet(models.QuerySet):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class Event(BaseModel):
|
class Event(BaseModel):
|
||||||
actor = None
|
label = models.CharField(max_length=255, db_index=True)
|
||||||
target = None
|
details = models.JSONField() # from to amount application user etc
|
||||||
label = None
|
|
||||||
details = {}
|
|
||||||
|
|
||||||
objects = EventQuerySet.as_manager()
|
objects = EventQuerySet.as_manager()
|
||||||
|
|
||||||
|
|
@ -28,6 +26,8 @@ class Event(BaseModel):
|
||||||
|
|
||||||
|
|
||||||
class PlanQuerySet(models.QuerySet):
|
class PlanQuerySet(models.QuerySet):
|
||||||
|
|
||||||
|
# this is for list of discount code for example
|
||||||
def calculate(self, user, application=None):
|
def calculate(self, user, application=None):
|
||||||
for plan in self.filter(application=application)[:10]:
|
for plan in self.filter(application=application)[:10]:
|
||||||
if not Promotion.objects.used(user):
|
if not Promotion.objects.used(user):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue