# Generated by Django 2.1.5 on 2019-03-28 05:06

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Creditcard',
            fields=[
                ('name', models.CharField(max_length=45)),
                ('cardnumber', models.CharField(blank=True, db_column='cardNumber', max_length=45, null=True)),
                ('verificationcode', models.CharField(blank=True, db_column='verificationCode', max_length=45, null=True)),
                ('expiration', models.DateField(blank=True, db_column='Expiration', null=True)),
                ('creditcardid', models.AutoField(db_column='CreditCardID', primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='Movie',
            fields=[
                ('movieid', models.AutoField(db_column='MovieID', primary_key=True, serialize=False)),
                ('movietitle', models.CharField(blank=True, db_column='MovieTitle', max_length=45, null=True)),
                ('movieruntime', models.IntegerField(blank=True, db_column='MovieRuntime', null=True)),
                ('movierating', models.CharField(blank=True, db_column='MovieRating', max_length=4, null=True)),
                ('moviereleasedate', models.DateField(blank=True, db_column='MovieReleaseDate', null=True)),
                ('moviecol', models.CharField(blank=True, db_column='Moviecol', max_length=45, null=True)),
                ('moviegenre', models.CharField(blank=True, db_column='MovieGenre', max_length=45, null=True)),
                ('moviedescription', models.CharField(blank=True, db_column='MovieDescription', max_length=500, null=True)),
                ('moviecol1', models.CharField(blank=True, db_column='Moviecol1', max_length=45, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('orderid', models.AutoField(db_column='OrderID', primary_key=True, serialize=False)),
                ('creditcard_creditcardid', models.ForeignKey(db_column='CreditCard_CreditCardID', on_delete=django.db.models.deletion.DO_NOTHING, to='ticketingApps.Creditcard')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('userid', models.AutoField(db_column='UserID', primary_key=True, serialize=False)),
                ('userphone', models.CharField(blank=True, db_column='UserPhone', max_length=45, null=True, verbose_name='phone')),
                ('isemployee', models.BooleanField(blank=True, db_column='isEmployee', null=True, verbose_name='employee?')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Room',
            fields=[
                ('roomnumber', models.IntegerField(db_column='RoomNumber', primary_key=True, serialize=False)),
                ('roomseatrows', models.IntegerField(blank=True, db_column='RoomSeatRows', null=True)),
                ('roomseatcolumns', models.IntegerField(blank=True, db_column='RoomSeatColumns', null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Theater',
            fields=[
                ('theaterid', models.AutoField(db_column='TheaterID', primary_key=True, serialize=False)),
                ('theatername', models.CharField(blank=True, db_column='TheaterName', max_length=45, null=True)),
                ('theaterstreet', models.CharField(blank=True, db_column='TheaterStreet', max_length=45, null=True)),
                ('theatercity', models.CharField(blank=True, db_column='TheaterCity', max_length=45, null=True)),
                ('theaterstate', models.CharField(blank=True, db_column='TheaterState', max_length=45, null=True)),
                ('theaterzip', models.CharField(blank=True, db_column='TheaterZip', max_length=45, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('ticketid', models.AutoField(db_column='TicketID', primary_key=True, serialize=False)),
                ('order_orderid', models.ForeignKey(db_column='Order_OrderID', on_delete=django.db.models.deletion.DO_NOTHING, to='ticketingApps.Order')),
                ('profile_userid', models.ForeignKey(db_column='Profile_UserID', on_delete=django.db.models.deletion.DO_NOTHING, to='ticketingApps.Profile')),
            ],
        ),
        migrations.CreateModel(
            name='Movieshowing',
            fields=[
                ('room_roomnumber', models.ForeignKey(db_column='Room_RoomNumber', on_delete=django.db.models.deletion.DO_NOTHING, primary_key=True, related_name='room_of', serialize=False, to='ticketingApps.Room')),
            ],
        ),
        migrations.CreateModel(
            name='Usertheater',
            fields=[
                ('theater_theaterid', models.ForeignKey(db_column='Theater_TheaterID', on_delete=django.db.models.deletion.DO_NOTHING, primary_key=True, serialize=False, to='ticketingApps.Theater')),
                ('profile_userid', models.ForeignKey(db_column='Profile_UserID', on_delete=django.db.models.deletion.DO_NOTHING, to='ticketingApps.Profile')),
            ],
        ),
        migrations.AddField(
            model_name='room',
            name='theater_theaterid',
            field=models.ForeignKey(db_column='Theater_TheaterID', on_delete=django.db.models.deletion.DO_NOTHING, to='ticketingApps.Theater'),
        ),
        migrations.AddField(
            model_name='order',
            name='profile_userid',
            field=models.ForeignKey(db_column='Profile_UserID', on_delete=django.db.models.deletion.DO_NOTHING, to='ticketingApps.Profile'),
        ),
        migrations.CreateModel(
            name='Seatsbought',
            fields=[
                ('seatnumber', models.CharField(db_column='SeatNumber', max_length=10)),
                ('movieshowing_room_roomnumber', models.ForeignKey(db_column='MovieShowing_Room_RoomNumber', on_delete=django.db.models.deletion.DO_NOTHING, primary_key=True, related_name='room_of', serialize=False, to='ticketingApps.Movieshowing')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='room',
            unique_together={('roomnumber', 'theater_theaterid')},
        ),
        migrations.AddField(
            model_name='movieshowing',
            name='movie_idmovie',
            field=models.ForeignKey(db_column='Movie_idMovie', on_delete=django.db.models.deletion.DO_NOTHING, to='ticketingApps.Movie'),
        ),
        migrations.AddField(
            model_name='movieshowing',
            name='room_theater_theaterid',
            field=models.ForeignKey(db_column='Room_Theater_TheaterID', on_delete=django.db.models.deletion.DO_NOTHING, related_name='theater_of', to='ticketingApps.Room'),
        ),
        migrations.AlterUniqueTogether(
            name='usertheater',
            unique_together={('theater_theaterid', 'profile_userid')},
        ),
        migrations.AddField(
            model_name='ticket',
            name='seatsbought_movieshowing_movie_idmovie',
            field=models.ForeignKey(db_column='SeatsBought_MovieShowing_Movie_idMovie', on_delete=django.db.models.deletion.DO_NOTHING, related_name='movie_of', to='ticketingApps.Seatsbought'),
        ),
        migrations.AddField(
            model_name='ticket',
            name='seatsbought_movieshowing_room_roomnumber',
            field=models.ForeignKey(db_column='SeatsBought_MovieShowing_Room_RoomNumber', on_delete=django.db.models.deletion.DO_NOTHING, related_name='room_of', to='ticketingApps.Seatsbought'),
        ),
        migrations.AddField(
            model_name='ticket',
            name='seatsbought_movieshowing_room_theater_theaterid',
            field=models.ForeignKey(db_column='SeatsBought_MovieShowing_Room_Theater_TheaterID', on_delete=django.db.models.deletion.DO_NOTHING, related_name='theater_of', to='ticketingApps.Seatsbought'),
        ),
        migrations.AddField(
            model_name='ticket',
            name='seatsbought_seatnumber',
            field=models.ForeignKey(db_column='SeatsBought_SeatNumber', on_delete=django.db.models.deletion.DO_NOTHING, related_name='seat_of', to='ticketingApps.Seatsbought'),
        ),
        migrations.AddField(
            model_name='seatsbought',
            name='movieshowing_movie_idmovie',
            field=models.ForeignKey(db_column='MovieShowing_Movie_idMovie', on_delete=django.db.models.deletion.DO_NOTHING, related_name='movie_of', to='ticketingApps.Movieshowing'),
        ),
        migrations.AddField(
            model_name='seatsbought',
            name='movieshowing_room_theater_theaterid',
            field=models.ForeignKey(db_column='MovieShowing_Room_Theater_TheaterID', on_delete=django.db.models.deletion.DO_NOTHING, related_name='theater_of', to='ticketingApps.Movieshowing'),
        ),
        migrations.AlterUniqueTogether(
            name='movieshowing',
            unique_together={('room_roomnumber', 'room_theater_theaterid', 'movie_idmovie')},
        ),
        migrations.AlterUniqueTogether(
            name='seatsbought',
            unique_together={('movieshowing_room_roomnumber', 'movieshowing_room_theater_theaterid', 'movieshowing_movie_idmovie', 'seatnumber')},
        ),
    ]
