X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/10b367c03d1e3a8ad6e365b02a7234bfd640e3f6..468c2e650c854ffa691afc73aa1f41ce61283cdb:/src/paypal/models.py diff --git a/src/paypal/models.py b/src/paypal/models.py new file mode 100644 index 000000000..527e80458 --- /dev/null +++ b/src/paypal/models.py @@ -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)