feat(topup): add payment_type field and update AdminTopupCreateView to handle payment type
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 4m26s

This commit is contained in:
2025-07-27 12:17:12 +05:00
parent cdef5ed27c
commit 80fc27fd74
3 changed files with 37 additions and 6 deletions

View File

@@ -66,6 +66,14 @@ class Topup(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
amount = models.FloatField()
user = models.ForeignKey(user, on_delete=models.CASCADE, related_name="topups")
payment_type = models.CharField(
max_length=20,
choices=[
("CASH", "Cash"),
("TRANSFER", "Transfer"),
],
default="TRANSFER",
)
paid = models.BooleanField(default=False)
paid_at = models.DateTimeField(null=True, blank=True)
status = models.CharField(