# Generated by Django 2.0.6 on 2018-06-16 19:44

from django.db import migrations, models
import django.db.models.deletion
import tickets.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('events', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='MultiPurchase',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.CharField(max_length=200, unique=True, verbose_name='order')),
                ('order_tpv', models.CharField(blank=True, max_length=12, null=True, verbose_name='order TPV')),
                ('tpv_error', models.CharField(blank=True, max_length=200, null=True, verbose_name='error TPV')),
                ('tpv_error_info', models.CharField(blank=True, max_length=200, null=True, verbose_name='error TPV info')),
                ('payment_method', models.CharField(blank=True, choices=[('tpv', 'TPV'), ('paypal', 'Paypal'), ('stripe', 'Stripe'), ('twcash', 'Cash, Ticket Window'), ('twtpv', 'TPV, Ticket Window')], max_length=10, null=True, verbose_name='payment method')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
                ('confirmed_date', models.DateTimeField(blank=True, null=True, verbose_name='confirmed at')),
                ('confirmed', models.BooleanField(default=False, verbose_name='confirmed')),
                ('confirm_sent', models.BooleanField(default=False, verbose_name='confirmation sent')),
                ('email', models.EmailField(max_length=254, verbose_name='email')),
                ('extra_data', models.TextField(blank=True, null=True, verbose_name='extra data')),
                ('discount', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='mps', to='events.Discount', verbose_name='discount')),
                ('ev', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='mps', to='events.Event', verbose_name='event')),
            ],
            options={
                'verbose_name': 'multipurchase',
                'verbose_name_plural': 'multipurchases',
                'ordering': ['-created'],
            },
            bases=(models.Model, tickets.models.BaseTicketMixing, tickets.models.BaseExtraData),
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.CharField(max_length=200, unique=True, verbose_name='order')),
                ('order_tpv', models.CharField(blank=True, max_length=12, null=True, verbose_name='order TPV')),
                ('tpv_error', models.CharField(blank=True, max_length=200, null=True, verbose_name='error TPV')),
                ('tpv_error_info', models.CharField(blank=True, max_length=200, null=True, verbose_name='error TPV info')),
                ('payment_method', models.CharField(blank=True, choices=[('tpv', 'TPV'), ('paypal', 'Paypal'), ('stripe', 'Stripe'), ('twcash', 'Cash, Ticket Window'), ('twtpv', 'TPV, Ticket Window')], max_length=10, null=True, verbose_name='payment method')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
                ('confirmed_date', models.DateTimeField(blank=True, null=True, verbose_name='confirmed at')),
                ('confirmed', models.BooleanField(default=False, verbose_name='confirmed')),
                ('confirm_sent', models.BooleanField(default=False, verbose_name='confirmation sent')),
                ('sold_in_window', models.BooleanField(default=False, verbose_name='sold in window')),
                ('seat', models.CharField(blank=True, max_length=20, null=True, verbose_name='seat')),
                ('email', models.EmailField(max_length=254, verbose_name='email')),
                ('extra_data', models.TextField(blank=True, null=True, verbose_name='extra data')),
                ('session_name', models.CharField(blank=True, max_length=200, null=True, verbose_name='session name')),
                ('space_name', models.CharField(blank=True, max_length=200, null=True, verbose_name='space name')),
                ('event_name', models.CharField(blank=True, max_length=200, null=True, verbose_name='event name')),
                ('price', models.FloatField(null=True, verbose_name='price')),
                ('tax', models.IntegerField(null=True, verbose_name='tax')),
                ('start', models.DateTimeField(null=True, verbose_name='start date')),
                ('end', models.DateTimeField(null=True, verbose_name='end date')),
                ('seat_layout_name', models.CharField(blank=True, max_length=200, null=True, verbose_name='seat layout name')),
                ('gate_name', models.CharField(blank=True, max_length=100, null=True, verbose_name='gate name')),
                ('used', models.BooleanField(default=False, verbose_name='used')),
                ('used_date', models.DateTimeField(blank=True, null=True, verbose_name='ticket used date')),
                ('inv', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='events.InvCode', verbose_name='invitation code')),
                ('mp', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tickets', to='tickets.MultiPurchase', verbose_name='multipurchase')),
                ('seat_layout', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='events.SeatLayout', verbose_name='seat layout')),
                ('session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tickets', to='events.Session', verbose_name='event')),
            ],
            options={
                'verbose_name': 'ticket',
                'verbose_name_plural': 'tickets',
                'ordering': ['-created'],
            },
            bases=(models.Model, tickets.models.BaseTicketMixing, tickets.models.BaseExtraData),
        ),
        migrations.CreateModel(
            name='TicketSeatHold',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('client', models.CharField(max_length=20, verbose_name='client')),
                ('seat', models.CharField(help_text='row-col', max_length=20, verbose_name='seat')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('type', models.CharField(choices=[('H', 'Holded'), ('C', 'Confirming'), ('P', 'Paying'), ('R', 'Reserved')], default='H', max_length=2, verbose_name='type')),
                ('layout', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='events.SeatLayout', verbose_name='layout')),
                ('session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='seat_holds', to='events.Session', verbose_name='session')),
            ],
            options={
                'verbose_name': 'ticket seat hold',
                'verbose_name_plural': 'ticket seat holds',
            },
        ),
        migrations.CreateModel(
            name='TicketWarning',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('message', models.TextField(verbose_name='message')),
                ('type', models.CharField(choices=[('req', 'Required')], default='req', max_length=10, verbose_name='type')),
                ('ev', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='warnings', to='events.Event', verbose_name='event')),
                ('sessions1', models.ManyToManyField(related_name='warnings1', to='events.Session', verbose_name='sessions1')),
                ('sessions2', models.ManyToManyField(related_name='warnings2', to='events.Session', verbose_name='sessions2')),
            ],
            options={
                'verbose_name': 'ticket warning',
                'verbose_name_plural': 'ticket warnings',
            },
        ),
    ]
