paypal subscriptions - stub
[wolnelektury.git] / src / paypal / models.py
diff --git a/src/paypal/models.py b/src/paypal/models.py
new file mode 100644 (file)
index 0000000..527e804
--- /dev/null
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
+# from django.contrib.auth import get_user_model
+from django.contrib.auth.models import User
+from django.db import models
+
+
+class BillingPlan(models.Model):
+    plan_id = models.CharField(max_length=32)
+    amount = models.IntegerField(db_index=True, unique=True)
+
+
+class BillingAgreement(models.Model):
+    agreement_id = models.CharField(max_length=32)
+    user = models.ForeignKey(User)
+    plan = models.ForeignKey(BillingPlan)
+    active = models.BooleanField(max_length=32)
+    token = models.CharField(max_length=32)