feat(models): add status field to Topup model with choices for Pending, Paid, and Cancelled

This commit is contained in:
2025-07-05 17:37:04 +05:00
parent 6431d61d39
commit 081366f87f
3 changed files with 35 additions and 0 deletions

View File

@ -52,6 +52,15 @@ class Topup(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE, related_name="topups")
paid = models.BooleanField(default=False)
paid_at = models.DateTimeField(null=True, blank=True)
status = models.CharField(
max_length=20,
choices=[
("PENDING", "Pending"),
("PAID", "Paid"),
("CANCELLED", "Cancelled"),
],
default="PENDING",
)
mib_reference = models.CharField(default="", null=True, blank=True)
expires_at = models.DateTimeField(null=True, blank=True)
expiry_notification_sent = models.BooleanField(default=False)