# Generated by Django 3.2.5 on 2021-08-01 10:41

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Screen',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('screen_name', models.CharField(max_length=60)),
            ],
        ),
        migrations.CreateModel(
            name='Seat',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('seat_id', models.IntegerField()),
                ('booked', models.BooleanField(default=False)),
                ('screen', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tickets.screen')),
            ],
        ),
        migrations.CreateModel(
            name='Show',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('show_name', models.CharField(max_length=60)),
                ('start_time', models.DateTimeField()),
                ('end_time', models.DateTimeField()),
                ('ticket_price', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_created=True)),
                ('username', models.CharField(max_length=60)),
                ('ticket_no', models.IntegerField()),
                ('amount', models.FloatField()),
                ('expriry', models.DateTimeField()),
                ('seat', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='tickets.seat')),
                ('show', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='tickets.show')),
            ],
        ),
        migrations.CreateModel(
            name='ShowScreen',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('screen', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='tickets.screen')),
                ('show', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='tickets.show')),
            ],
        ),
    ]
