- key = models.CharField(_('key'), max_length=255, unique=True)
- email = models.EmailField(_('email'))
- membership = models.ForeignKey('Membership', verbose_name=_('membership'), null=True, blank=True, on_delete=models.PROTECT)
- amount = models.DecimalField(_('amount'), max_digits=10, decimal_places=2)
- monthly = models.BooleanField(_('monthly'), default=True)
- yearly = models.BooleanField(_('yearly'), default=False)
-
- is_cancelled = models.BooleanField(_('cancelled'), default=False)
- payed_at = models.DateTimeField(_('payed at'), null=True, blank=True)
- started_at = models.DateTimeField(_('started at'), auto_now_add=True)
- expires_at = models.DateTimeField(_('expires_at'), null=True, blank=True)
+ key = models.CharField('klucz', max_length=255, unique=True)
+ email = models.EmailField('e-mail')
+ membership = models.ForeignKey(
+ 'Membership', verbose_name='członkostwo',
+ null=True, blank=True, on_delete=models.SET_NULL)
+ amount = models.DecimalField('kwota', max_digits=10, decimal_places=2)
+ method = models.CharField('metoda płatności', max_length=32, choices=[
+ (m.slug, m.name) for m in methods
+ ])
+ monthly = models.BooleanField('miesięcznie', default=True)
+ yearly = models.BooleanField('rocznie', default=False)
+
+ source = models.CharField('źródło', max_length=255, blank=True)
+
+ is_cancelled = models.BooleanField('anulowany', default=False)
+ payed_at = models.DateTimeField('opłacona', null=True, blank=True)
+ started_at = models.DateTimeField('start', auto_now_add=True)
+ expires_at = models.DateTimeField('wygasa', null=True, blank=True)