16 lines
No EOL
639 B
Python
16 lines
No EOL
639 B
Python
from django.db import models
|
|
|
|
from buyer.models import Card
|
|
|
|
# Create your models here.
|
|
|
|
class Payment(models.Model):
|
|
description = models.CharField("Payment description", max_length=128)
|
|
amount = models.DecimalField("Payment amount", max_digits=15, decimal_places=2)
|
|
date = models.DateTimeField("Date of payment", auto_now_add=True)
|
|
repayment = models.DateTimeField("Date of repayment", default=None, null=True, blank=True)
|
|
card = models.ForeignKey(Card, models.SET_NULL, null=True, blank=True)
|
|
attachment = models.FileField("uploads", null=True, blank=True)
|
|
|
|
def __str__(self):
|
|
return self.description |