feat(purchase/): add purchase app

This commit is contained in:
2026-03-20 12:03:57 +01:00
parent e46f034d9e
commit 84a6c4cf5e
8 changed files with 51 additions and 0 deletions

9
purchase/models.py Normal file
View File

@@ -0,0 +1,9 @@
from django.db import models
from django.conf import settings
class CoursePurchase(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
course = models.ForeignKey("home.CoursePage", on_delete=models.CASCADE)
purchased_at = models.DateTimeField(auto_now_add=True)
refunded = models.BooleanField(default=False)