diff --git a/config/settings.py b/config/settings.py index cc617e0..bf42b85 100644 --- a/config/settings.py +++ b/config/settings.py @@ -31,6 +31,7 @@ ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ + 'schedule.apps.ScheduleConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', diff --git a/schedule/models.py b/schedule/models.py index 71a8362..fe7bcac 100644 --- a/schedule/models.py +++ b/schedule/models.py @@ -1,3 +1,23 @@ from django.db import models # Create your models here. + +class PickupDate(models.Model): + date = models.DateField('date of pickup') + +class Timeslot(models.Model): + start = models.TimeField('start of timeslot') + # open-ended for now + +class Member(models.Model): + member_number = models.PositiveIntegerField( + verbose_name='aoff member number', + unique=True, + blank=True, + null=True, + ) + +class Pickup(models.Model): + date = models.ForeignKey(PickupDate, on_delete=models.CASCADE) + time = models.ForeignKey(Timeslot, on_delete=models.CASCADE) + member = models.ForeignKey(Member, on_delete=models.CASCADE)