tickets: Add Booking model.
[matthijs/projects/dorestad-bookings.git] / tickets / models.py
1 from django.db import models
2
3 # Create your models here.
4
5 SHOW_CHOICES = [ ("vrijdag", "vrijdag 17 december, 20:00")
6                , ("zaterdag", "zaterdag 18 december, 20:00")
7                , ("zondag", "zondag 19 december, 13:00")
8                ]
9
10 TICKETS_CHOICES = [ (n, n) for n in range(1, 6)]
11
12 class Booking(models.Model):
13     name = models.CharField(max_length=100, verbose_name="Naam")
14     address1 = models.CharField(max_length=50, verbose_name="Adres")
15     address2 = models.CharField(max_length=50, verbose_name="")
16     email = models.EmailField(verbose_name="Email adres")
17     tickets = models.IntegerField(choices=TICKETS_CHOICES, verbose_name="Aantal kaarten")
18     show = models.CharField(max_length=50, choices=SHOW_CHOICES, verbose_name="Voorstelling")