Update models

This commit is contained in:
Yohann D'ANELLO 2020-02-29 07:26:47 +01:00
parent ce6a169259
commit 8e45f9df49

View File

@ -15,6 +15,9 @@ class Ticket(models.Model):
verbose_name=_("note")
)
def __str__(self):
return "" + str(self.number) + " : " + str(self.note)
class Reward(models.Model):
order = models.PositiveIntegerField(
@ -33,5 +36,10 @@ class Reward(models.Model):
rewarded_by = models.ForeignKey(
Ticket,
on_delete=models.PROTECT,
verbose_name=_("rewarded by")
null=True,
blank=True,
verbose_name=_("rewarded by"),
)
def __str__(self):
return str(self.order) + " - " + str(self.name)