susioma/buyer/models.py

11 lines
No EOL
378 B
Python

from django.db import models
# Create your models here.
class Card(models.Model):
number = models.IntegerField("Card number", primary_key=True)
purchased = models.DateTimeField("Card purchased", auto_now_add=True)
delivered = models.DateTimeField("Card delivered to Oma", default=None, null=True, blank=True)
def __str__(self):
return str(self.number)