diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2020-06-19 15:05:59 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2020-06-19 15:05:59 +0200 |
commit | 619e0e0f5263875b753334483d9b896194e9a61d (patch) | |
tree | 861b970de54b77ad715aa9d4177eaaad384c198a /client/models.py | |
parent | initial commit (diff) | |
download | scout-subs-619e0e0f5263875b753334483d9b896194e9a61d.tar.gz scout-subs-619e0e0f5263875b753334483d9b896194e9a61d.zip |
More data for users
Diffstat (limited to '')
-rw-r--r-- | client/models.py | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/client/models.py b/client/models.py index 970c489..d6e8578 100644 --- a/client/models.py +++ b/client/models.py @@ -1,5 +1,6 @@ from django.db import models from django.contrib.auth.models import User +from datetime import datetime # Create your models here. @@ -13,6 +14,34 @@ class Document(models.Model): ] -class UserCode(models.Model): +class YearSubscription(models.Model): + user = models.ForeignKey(User, default=None, on_delete=models.CASCADE) + group = models.CharField(default="", max_length=50) + compilation_date = models.DateTimeField(auto_now_add=True) + status = models.CharField(default="", max_length=50) code = models.IntegerField(default=0) + parent_name = models.CharField(default="", max_length=250) + via = models.CharField(default="", max_length=250) + cap = models.CharField(default="", max_length=250) + country = models.CharField(default="", max_length=250) + nationality = models.CharField(default="", max_length=250) + born_date = models.DateField(null=True, default=datetime.fromtimestamp(0)) + home_phone = models.CharField(default="", max_length=250) + phone = models.CharField(default="", max_length=250) + school = models.CharField(default="", max_length=250) + year = models.IntegerField(default=0) + + +class UserCode(models.Model): user = models.ForeignKey(User, default=None, on_delete=models.CASCADE) + code = models.IntegerField(default=0) + parent_name = models.CharField(default="", max_length=250) + via = models.CharField(default="", max_length=250) + cap = models.CharField(default="", max_length=250) + country = models.CharField(default="", max_length=250) + nationality = models.CharField(default="", max_length=250) + born_date = models.DateField(null=True, default=datetime.fromtimestamp(0)) + home_phone = models.CharField(default="", max_length=250) + phone = models.CharField(default="", max_length=250) + school = models.CharField(default="", max_length=250) + year = models.IntegerField(default=0) |