Update models

This commit is contained in:
Yohann D'ANELLO 2020-02-29 07:26:47 +01:00
parent ce6a169259
commit 8e45f9df49
1 changed files with 9 additions and 1 deletions

View File

@ -15,6 +15,9 @@ class Ticket(models.Model):
verbose_name=_("note") verbose_name=_("note")
) )
def __str__(self):
return "" + str(self.number) + " : " + str(self.note)
class Reward(models.Model): class Reward(models.Model):
order = models.PositiveIntegerField( order = models.PositiveIntegerField(
@ -33,5 +36,10 @@ class Reward(models.Model):
rewarded_by = models.ForeignKey( rewarded_by = models.ForeignKey(
Ticket, Ticket,
on_delete=models.PROTECT, 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)