add basketitem model

This commit is contained in:
Frédéric Péters 2015-02-08 15:34:49 +01:00
parent 7337f37005
commit 626d142145
1 changed files with 14 additions and 0 deletions

View File

@ -17,6 +17,7 @@
import eopayment
from jsonfield import JSONField
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
@ -50,3 +51,16 @@ class Regie(models.Model):
return {'slug': self.slug,
'label': self.label,
'description': self.description}
class BasketItem(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL)
regie = models.ForeignKey(Regie)
subject = models.CharField(verbose_name=_('Subject'), max_length=64)
source_url = models.URLField(_('Source URL'))
details = models.TextField(verbose_name=_('Details'), blank=True)
amount = models.DecimalField(verbose_name=_('Amount'),
decimal_places=2, max_digits=8)
creation_date = models.DateTimeField(auto_now_add=True)
cancellation_date = models.DateTimeField(null=True)
payment_date = models.DateTimeField(null=True)