Simplify transaction model

This commit is contained in:
Alexandre Iooss 2019-07-19 10:12:46 +02:00
parent d6791d8d5e
commit d957e643c9
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
1 changed files with 4 additions and 2 deletions

View File

@ -55,8 +55,9 @@ class Transaction(models.Model):
verbose_name=_('created at'),
default=timezone.now,
)
quantity = models.PositiveSmallIntegerField(
quantity = models.PositiveIntegerField(
verbose_name=_('quantity'),
default=1,
)
amount = models.PositiveIntegerField(
verbose_name=_('amount'),
@ -69,8 +70,9 @@ class Transaction(models.Model):
verbose_name=_('reason'),
max_length=255,
)
valid = models.NullBooleanField(
valid = models.BooleanField(
verbose_name=_('valid'),
default=True,
)
class Meta: