Skip to content

Commit

Permalink
refactor: change payment id type to UUID
Browse files Browse the repository at this point in the history
  • Loading branch information
Adibov committed Nov 23, 2023
1 parent 77997b5 commit ca27576
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ class Migration(migrations.Migration):
name='status',
field=models.IntegerField(choices=[(0, 'Awaiting payment'), (1, 'Payment confirmed'), (2, 'Payment rejected')], default=0),
),
migrations.AlterField(
model_name='payment',
name='id',
field=models.UUIDField(primary_key=True, serialize=False),
),
]
2 changes: 1 addition & 1 deletion backend/backend_api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ class PaymentStatus(models.IntegerChoices):
PAYMENT_CONFIRMED = 1, _('Payment confirmed')
PAYMENT_REJECTED = 2, _('Payment rejected')

id = models.BigAutoField(primary_key=True)
id = models.UUIDField(primary_key=True)
amount = models.PositiveIntegerField()
user = models.ForeignKey(User, on_delete=models.CASCADE)
workshops = models.ManyToManyField(Workshop, blank=True)
Expand Down

0 comments on commit ca27576

Please sign in to comment.